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