We cannot delete or give submitted homework

This commit is contained in:
Tim Young 2017-08-10 15:42:41 -05:00
parent 15e0092699
commit ed48b943aa
1 changed files with 9 additions and 0 deletions

View File

@ -501,6 +501,10 @@ namespace EduNetworkBuilder
} }
private void UpdateFormFromSchoolwork() private void UpdateFormFromSchoolwork()
{ {
bool OnStudentTree = false;
TreeNode Node = tvClasswork.SelectedNode;
if (Node != null && Node.FullPath.StartsWith("Student"))
OnStudentTree = true;
if (ViewedSchoolwork == null) if (ViewedSchoolwork == null)
{ {
tbHWClass.Text = ""; tbHWClass.Text = "";
@ -547,6 +551,11 @@ namespace EduNetworkBuilder
btnHWGive.Visible = false; btnHWGive.Visible = false;
btnHWSave.Visible = false; btnHWSave.Visible = false;
} }
if(OnStudentTree)
{ //We cannot give or delete submitted stuff
btnHWDelete.Visible = false;
btnHWGive.Visible = false;
}
btnLaunch.Visible = true; btnLaunch.Visible = true;
} }