Add a button for generating student files
This commit is contained in:
parent
1675a000a1
commit
b1e015e624
@ -11,6 +11,7 @@ namespace EduNetworkBuilder
|
||||
public class PersonClass
|
||||
{
|
||||
public string filepath=""; //the path of the file. We use the username as the file-name.
|
||||
public string StudentFilePath = "";//If admin, this is used to store the path of the directory where student files are stored.
|
||||
|
||||
string _UserName="";
|
||||
/// <summary>
|
||||
@ -123,6 +124,9 @@ namespace EduNetworkBuilder
|
||||
case "altpassword":
|
||||
AltPassword = Individual.InnerText;
|
||||
break;
|
||||
case "studentfilepath":
|
||||
StudentFilePath = Individual.InnerText;
|
||||
break;
|
||||
case "isadmin":
|
||||
bool isadmin = false;
|
||||
bool.TryParse(Individual.InnerText, out isadmin);
|
||||
@ -190,6 +194,8 @@ namespace EduNetworkBuilder
|
||||
writer.WriteElementString("UserName", UserName);
|
||||
writer.WriteElementString("FullName", FullName);
|
||||
writer.WriteElementString("PasswordHint", PasswordHint);
|
||||
if(isAdmin) //only admins have students, so they are the only ones who need to store this path
|
||||
writer.WriteElementString("StudentFilePath", StudentFilePath);
|
||||
writer.WriteElementString("AltPassword", AltPassword);
|
||||
writer.WriteElementString("IsAdmin", isAdmin.ToString());
|
||||
writer.WriteElementString("ChangePasswordAtLogin", ChangePassAtFirstLogin.ToString());
|
||||
|
181
EduNetworkBuilder/PersonProfileForm.Designer.cs
generated
181
EduNetworkBuilder/PersonProfileForm.Designer.cs
generated
@ -38,6 +38,7 @@
|
||||
this.TabClasswork = new System.Windows.Forms.TabPage();
|
||||
this.tcTreeData = new System.Windows.Forms.TabControl();
|
||||
this.tabClass = new System.Windows.Forms.TabPage();
|
||||
this.btnImportStudents = new System.Windows.Forms.Button();
|
||||
this.TabHomework = new System.Windows.Forms.TabPage();
|
||||
this.btnLaunch = new System.Windows.Forms.Button();
|
||||
this.btnHWDelete = new System.Windows.Forms.Button();
|
||||
@ -52,16 +53,16 @@
|
||||
this.tbHWName = new System.Windows.Forms.TextBox();
|
||||
this.tbHWClass = new System.Windows.Forms.TextBox();
|
||||
this.TabStudents = new System.Windows.Forms.TabPage();
|
||||
this.TabStudent = new System.Windows.Forms.TabPage();
|
||||
this.btnStudentUpdateFile = new System.Windows.Forms.Button();
|
||||
this.btnStudentChangePassword = new System.Windows.Forms.Button();
|
||||
this.lblStudentFullName = new System.Windows.Forms.Label();
|
||||
this.tbStudentFullName = new System.Windows.Forms.TextBox();
|
||||
this.lblStudentUserName = new System.Windows.Forms.Label();
|
||||
this.tbStudentUsername = new System.Windows.Forms.TextBox();
|
||||
this.tvClasswork = new System.Windows.Forms.TreeView();
|
||||
this.btnExit = new System.Windows.Forms.Button();
|
||||
this.TabStudent = new System.Windows.Forms.TabPage();
|
||||
this.tbStudentUsername = new System.Windows.Forms.TextBox();
|
||||
this.lblStudentUserName = new System.Windows.Forms.Label();
|
||||
this.tbStudentFullName = new System.Windows.Forms.TextBox();
|
||||
this.lblStudentFullName = new System.Windows.Forms.Label();
|
||||
this.btnStudentChangePassword = new System.Windows.Forms.Button();
|
||||
this.btnStudentUpdateFile = new System.Windows.Forms.Button();
|
||||
this.btnImportStudents = new System.Windows.Forms.Button();
|
||||
this.btnGenerateStudentFiles = new System.Windows.Forms.Button();
|
||||
this.tcTabControl.SuspendLayout();
|
||||
this.TabProfile.SuspendLayout();
|
||||
this.TabClasswork.SuspendLayout();
|
||||
@ -169,6 +170,7 @@
|
||||
//
|
||||
// tabClass
|
||||
//
|
||||
this.tabClass.Controls.Add(this.btnGenerateStudentFiles);
|
||||
this.tabClass.Controls.Add(this.btnImportStudents);
|
||||
this.tabClass.Location = new System.Drawing.Point(4, 25);
|
||||
this.tabClass.Name = "tabClass";
|
||||
@ -178,6 +180,16 @@
|
||||
this.tabClass.Text = "Class";
|
||||
this.tabClass.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnImportStudents
|
||||
//
|
||||
this.btnImportStudents.Location = new System.Drawing.Point(6, 6);
|
||||
this.btnImportStudents.Name = "btnImportStudents";
|
||||
this.btnImportStudents.Size = new System.Drawing.Size(152, 23);
|
||||
this.btnImportStudents.TabIndex = 2;
|
||||
this.btnImportStudents.Text = "Import Students";
|
||||
this.btnImportStudents.UseVisualStyleBackColor = true;
|
||||
this.btnImportStudents.Click += new System.EventHandler(this.btnImportStudents_Click);
|
||||
//
|
||||
// TabHomework
|
||||
//
|
||||
this.TabHomework.Controls.Add(this.btnLaunch);
|
||||
@ -311,6 +323,74 @@
|
||||
this.TabStudents.Text = "Students";
|
||||
this.TabStudents.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// TabStudent
|
||||
//
|
||||
this.TabStudent.Controls.Add(this.btnStudentUpdateFile);
|
||||
this.TabStudent.Controls.Add(this.btnStudentChangePassword);
|
||||
this.TabStudent.Controls.Add(this.lblStudentFullName);
|
||||
this.TabStudent.Controls.Add(this.tbStudentFullName);
|
||||
this.TabStudent.Controls.Add(this.lblStudentUserName);
|
||||
this.TabStudent.Controls.Add(this.tbStudentUsername);
|
||||
this.TabStudent.Location = new System.Drawing.Point(4, 25);
|
||||
this.TabStudent.Name = "TabStudent";
|
||||
this.TabStudent.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.TabStudent.Size = new System.Drawing.Size(256, 206);
|
||||
this.TabStudent.TabIndex = 3;
|
||||
this.TabStudent.Text = "Student";
|
||||
this.TabStudent.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnStudentUpdateFile
|
||||
//
|
||||
this.btnStudentUpdateFile.Location = new System.Drawing.Point(54, 158);
|
||||
this.btnStudentUpdateFile.Name = "btnStudentUpdateFile";
|
||||
this.btnStudentUpdateFile.Size = new System.Drawing.Size(96, 42);
|
||||
this.btnStudentUpdateFile.TabIndex = 6;
|
||||
this.btnStudentUpdateFile.Text = "Update File";
|
||||
this.btnStudentUpdateFile.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnStudentChangePassword
|
||||
//
|
||||
this.btnStudentChangePassword.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnStudentChangePassword.Location = new System.Drawing.Point(156, 158);
|
||||
this.btnStudentChangePassword.Name = "btnStudentChangePassword";
|
||||
this.btnStudentChangePassword.Size = new System.Drawing.Size(94, 42);
|
||||
this.btnStudentChangePassword.TabIndex = 5;
|
||||
this.btnStudentChangePassword.Text = "Change Password";
|
||||
this.btnStudentChangePassword.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblStudentFullName
|
||||
//
|
||||
this.lblStudentFullName.AutoSize = true;
|
||||
this.lblStudentFullName.Location = new System.Drawing.Point(17, 37);
|
||||
this.lblStudentFullName.Name = "lblStudentFullName";
|
||||
this.lblStudentFullName.Size = new System.Drawing.Size(71, 17);
|
||||
this.lblStudentFullName.TabIndex = 3;
|
||||
this.lblStudentFullName.Text = "Full Name";
|
||||
//
|
||||
// tbStudentFullName
|
||||
//
|
||||
this.tbStudentFullName.Location = new System.Drawing.Point(107, 34);
|
||||
this.tbStudentFullName.Name = "tbStudentFullName";
|
||||
this.tbStudentFullName.Size = new System.Drawing.Size(134, 22);
|
||||
this.tbStudentFullName.TabIndex = 2;
|
||||
//
|
||||
// lblStudentUserName
|
||||
//
|
||||
this.lblStudentUserName.AutoSize = true;
|
||||
this.lblStudentUserName.Location = new System.Drawing.Point(17, 9);
|
||||
this.lblStudentUserName.Name = "lblStudentUserName";
|
||||
this.lblStudentUserName.Size = new System.Drawing.Size(79, 17);
|
||||
this.lblStudentUserName.TabIndex = 1;
|
||||
this.lblStudentUserName.Text = "User Name";
|
||||
//
|
||||
// tbStudentUsername
|
||||
//
|
||||
this.tbStudentUsername.Enabled = false;
|
||||
this.tbStudentUsername.Location = new System.Drawing.Point(107, 6);
|
||||
this.tbStudentUsername.Name = "tbStudentUsername";
|
||||
this.tbStudentUsername.Size = new System.Drawing.Size(134, 22);
|
||||
this.tbStudentUsername.TabIndex = 0;
|
||||
//
|
||||
// tvClasswork
|
||||
//
|
||||
this.tvClasswork.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
@ -332,83 +412,15 @@
|
||||
this.btnExit.UseVisualStyleBackColor = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// TabStudent
|
||||
// btnGenerateStudentFiles
|
||||
//
|
||||
this.TabStudent.Controls.Add(this.btnStudentUpdateFile);
|
||||
this.TabStudent.Controls.Add(this.btnStudentChangePassword);
|
||||
this.TabStudent.Controls.Add(this.lblStudentFullName);
|
||||
this.TabStudent.Controls.Add(this.tbStudentFullName);
|
||||
this.TabStudent.Controls.Add(this.lblStudentUserName);
|
||||
this.TabStudent.Controls.Add(this.tbStudentUsername);
|
||||
this.TabStudent.Location = new System.Drawing.Point(4, 25);
|
||||
this.TabStudent.Name = "TabStudent";
|
||||
this.TabStudent.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.TabStudent.Size = new System.Drawing.Size(256, 206);
|
||||
this.TabStudent.TabIndex = 3;
|
||||
this.TabStudent.Text = "Student";
|
||||
this.TabStudent.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tbStudentUsername
|
||||
//
|
||||
this.tbStudentUsername.Enabled = false;
|
||||
this.tbStudentUsername.Location = new System.Drawing.Point(107, 6);
|
||||
this.tbStudentUsername.Name = "tbStudentUsername";
|
||||
this.tbStudentUsername.Size = new System.Drawing.Size(134, 22);
|
||||
this.tbStudentUsername.TabIndex = 0;
|
||||
//
|
||||
// lblStudentUserName
|
||||
//
|
||||
this.lblStudentUserName.AutoSize = true;
|
||||
this.lblStudentUserName.Location = new System.Drawing.Point(17, 9);
|
||||
this.lblStudentUserName.Name = "lblStudentUserName";
|
||||
this.lblStudentUserName.Size = new System.Drawing.Size(79, 17);
|
||||
this.lblStudentUserName.TabIndex = 1;
|
||||
this.lblStudentUserName.Text = "User Name";
|
||||
//
|
||||
// tbStudentFullName
|
||||
//
|
||||
this.tbStudentFullName.Location = new System.Drawing.Point(107, 34);
|
||||
this.tbStudentFullName.Name = "tbStudentFullName";
|
||||
this.tbStudentFullName.Size = new System.Drawing.Size(134, 22);
|
||||
this.tbStudentFullName.TabIndex = 2;
|
||||
//
|
||||
// lblStudentFullName
|
||||
//
|
||||
this.lblStudentFullName.AutoSize = true;
|
||||
this.lblStudentFullName.Location = new System.Drawing.Point(17, 37);
|
||||
this.lblStudentFullName.Name = "lblStudentFullName";
|
||||
this.lblStudentFullName.Size = new System.Drawing.Size(71, 17);
|
||||
this.lblStudentFullName.TabIndex = 3;
|
||||
this.lblStudentFullName.Text = "Full Name";
|
||||
//
|
||||
// btnStudentChangePassword
|
||||
//
|
||||
this.btnStudentChangePassword.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnStudentChangePassword.Location = new System.Drawing.Point(156, 158);
|
||||
this.btnStudentChangePassword.Name = "btnStudentChangePassword";
|
||||
this.btnStudentChangePassword.Size = new System.Drawing.Size(94, 42);
|
||||
this.btnStudentChangePassword.TabIndex = 5;
|
||||
this.btnStudentChangePassword.Text = "Change Password";
|
||||
this.btnStudentChangePassword.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnStudentUpdateFile
|
||||
//
|
||||
this.btnStudentUpdateFile.Location = new System.Drawing.Point(54, 158);
|
||||
this.btnStudentUpdateFile.Name = "btnStudentUpdateFile";
|
||||
this.btnStudentUpdateFile.Size = new System.Drawing.Size(96, 42);
|
||||
this.btnStudentUpdateFile.TabIndex = 6;
|
||||
this.btnStudentUpdateFile.Text = "Update File";
|
||||
this.btnStudentUpdateFile.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnImportStudents
|
||||
//
|
||||
this.btnImportStudents.Location = new System.Drawing.Point(6, 6);
|
||||
this.btnImportStudents.Name = "btnImportStudents";
|
||||
this.btnImportStudents.Size = new System.Drawing.Size(152, 23);
|
||||
this.btnImportStudents.TabIndex = 2;
|
||||
this.btnImportStudents.Text = "Import Students";
|
||||
this.btnImportStudents.UseVisualStyleBackColor = true;
|
||||
this.btnImportStudents.Click += new System.EventHandler(this.btnImportStudents_Click);
|
||||
this.btnGenerateStudentFiles.Location = new System.Drawing.Point(6, 35);
|
||||
this.btnGenerateStudentFiles.Name = "btnGenerateStudentFiles";
|
||||
this.btnGenerateStudentFiles.Size = new System.Drawing.Size(152, 23);
|
||||
this.btnGenerateStudentFiles.TabIndex = 3;
|
||||
this.btnGenerateStudentFiles.Text = "Generate Files";
|
||||
this.btnGenerateStudentFiles.UseVisualStyleBackColor = true;
|
||||
this.btnGenerateStudentFiles.Click += new System.EventHandler(this.btnGenerateStudentFiles_Click);
|
||||
//
|
||||
// PersonProfileForm
|
||||
//
|
||||
@ -470,5 +482,6 @@
|
||||
private System.Windows.Forms.Button btnStudentUpdateFile;
|
||||
private System.Windows.Forms.Button btnStudentChangePassword;
|
||||
private System.Windows.Forms.Button btnImportStudents;
|
||||
private System.Windows.Forms.Button btnGenerateStudentFiles;
|
||||
}
|
||||
}
|
@ -71,6 +71,7 @@ namespace EduNetworkBuilder
|
||||
btnHWDelete.Text = NB.Translate("_Delete");
|
||||
btnImportStudents.Text = NB.Translate("PPF_ImportStudents");
|
||||
btnLaunch.Text = NB.Translate("PPF_Launch");
|
||||
btnGenerateStudentFiles.Text = NB.Translate("PPF_GenerateFiles");
|
||||
}
|
||||
|
||||
private void LocalSetup()
|
||||
@ -653,6 +654,10 @@ namespace EduNetworkBuilder
|
||||
message += "\n" + one;
|
||||
MessageBox.Show(message);
|
||||
}
|
||||
|
||||
|
||||
private void btnGenerateStudentFiles_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1789,6 +1789,10 @@
|
||||
<value>Change password at first login</value>
|
||||
<comment>PPF_ForcePWChange = Change password at first login</comment>
|
||||
</data>
|
||||
<data name="PPF_GenerateFiles" xml:space="preserve">
|
||||
<value>Generate Files</value>
|
||||
<comment>PPF_GenerateFiles = Generate Files</comment>
|
||||
</data>
|
||||
<data name="PPF_ImportSettings" xml:space="preserve">
|
||||
<value>Specify Import Settings</value>
|
||||
<comment>PPF_ImportSettings = Specify Import Settings</comment>
|
||||
|
Loading…
Reference in New Issue
Block a user