Hide generate file and import user buttons if not teacher

This commit is contained in:
Tim Young 2017-08-02 14:39:37 -05:00
parent 217371a96f
commit bbbb62ab14

View File

@ -232,6 +232,10 @@ namespace EduNetworkBuilder
private void UpdateAdminFormFromUser() private void UpdateAdminFormFromUser()
{ {
btnGenerateStudentFiles.Visible = true;
btnImportStudents.Visible = true;
TreeNode Node; TreeNode Node;
//We have a class tree //We have a class tree
Node = new TreeNode(NB.Translate("PPF_Class")); Node = new TreeNode(NB.Translate("PPF_Class"));
@ -262,6 +266,8 @@ namespace EduNetworkBuilder
private void UpdateStudentFormFromUser() private void UpdateStudentFormFromUser()
{ {
if (CurrentUser == null) return; if (CurrentUser == null) return;
btnGenerateStudentFiles.Visible = false;
btnImportStudents.Visible = false;
TreeNode Top = CurrentUser.WorkTree(); TreeNode Top = CurrentUser.WorkTree();
if (Top != null) if (Top != null)
tvClasswork.Nodes.Add(Top); tvClasswork.Nodes.Add(Top);