Add foundation for tracking which items have been graded.

This commit is contained in:
Tim Young 2017-08-02 17:04:15 -05:00
parent d5f58e2878
commit 55ceeecac1
4 changed files with 38 additions and 4 deletions

View File

@ -85,6 +85,7 @@
this.myProgressBar = new System.Windows.Forms.ProgressBar(); this.myProgressBar = new System.Windows.Forms.ProgressBar();
this.updateClassworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.updateClassworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.submitHomeworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.submitHomeworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.markAsGradedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.msMainMenuStrip.SuspendLayout(); this.msMainMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbNetworkView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbNetworkView)).BeginInit();
this.HelpPanel.SuspendLayout(); this.HelpPanel.SuspendLayout();
@ -166,7 +167,8 @@
this.profileToolStripMenuItem, this.profileToolStripMenuItem,
this.addToClassworkToolStripMenuItem, this.addToClassworkToolStripMenuItem,
this.updateClassworkToolStripMenuItem, this.updateClassworkToolStripMenuItem,
this.submitHomeworkToolStripMenuItem}); this.submitHomeworkToolStripMenuItem,
this.markAsGradedToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem"; this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(47, 24); this.editToolStripMenuItem.Size = new System.Drawing.Size(47, 24);
this.editToolStripMenuItem.Text = "Edit"; this.editToolStripMenuItem.Text = "Edit";
@ -598,6 +600,13 @@
this.submitHomeworkToolStripMenuItem.Text = "Submit Homework"; this.submitHomeworkToolStripMenuItem.Text = "Submit Homework";
this.submitHomeworkToolStripMenuItem.Click += new System.EventHandler(this.submitHomeworkToolStripMenuItem_Click); this.submitHomeworkToolStripMenuItem.Click += new System.EventHandler(this.submitHomeworkToolStripMenuItem_Click);
// //
// markAsGradedToolStripMenuItem
//
this.markAsGradedToolStripMenuItem.Name = "markAsGradedToolStripMenuItem";
this.markAsGradedToolStripMenuItem.Size = new System.Drawing.Size(208, 26);
this.markAsGradedToolStripMenuItem.Text = "Mark As Graded";
this.markAsGradedToolStripMenuItem.Click += new System.EventHandler(this.markAsGradedToolStripMenuItem_Click);
//
// BuilderWindow // BuilderWindow
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
@ -690,6 +699,7 @@
private System.Windows.Forms.ToolStripMenuItem addToClassworkToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem addToClassworkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem updateClassworkToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem updateClassworkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem submitHomeworkToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem submitHomeworkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem markAsGradedToolStripMenuItem;
} }
} }

View File

@ -161,6 +161,7 @@ namespace EduNetworkBuilder
changeLanguageToolStripMenuItem.Text = NB.Translate("NB_changeLanguageToolStripMenuItem", OurSettings); changeLanguageToolStripMenuItem.Text = NB.Translate("NB_changeLanguageToolStripMenuItem", OurSettings);
submitHomeworkToolStripMenuItem.Text = NB.Translate("NB_SubmitClasswork"); submitHomeworkToolStripMenuItem.Text = NB.Translate("NB_SubmitClasswork");
updateClassworkToolStripMenuItem.Text = NB.Translate("NB_UpdateClasswork"); updateClassworkToolStripMenuItem.Text = NB.Translate("NB_UpdateClasswork");
markAsGradedToolStripMenuItem.Text = NB.Translate("NB_MarkGraded");
Text = NB.Translate("NB_Form", OurSettings); Text = NB.Translate("NB_Form", OurSettings);
} }
@ -409,6 +410,7 @@ namespace EduNetworkBuilder
submitHomeworkToolStripMenuItem.Visible = false; submitHomeworkToolStripMenuItem.Visible = false;
updateClassworkToolStripMenuItem.Visible = false; updateClassworkToolStripMenuItem.Visible = false;
} }
markAsGradedToolStripMenuItem.Visible = false;
if(CurrentUser != null) if(CurrentUser != null)
{ {
if (CurrentUser.isAdmin) if (CurrentUser.isAdmin)
@ -422,9 +424,16 @@ namespace EduNetworkBuilder
} }
else else
{ {
//If this is homework, we can update it if (!myNetwork.WhatFrom.IsSumbitted)
addToClassworkToolStripMenuItem.Visible = true; //We can create a new homework if we have changed it {
updateClassworkToolStripMenuItem.Visible = true; //If this is homework, we can update it
addToClassworkToolStripMenuItem.Visible = true; //We can create a new homework if we have changed it
updateClassworkToolStripMenuItem.Visible = true;
}
else
{
markAsGradedToolStripMenuItem.Visible = true;
}
} }
} }
else if (myNetwork.WhatFrom != null) //we are a student doing homework else if (myNetwork.WhatFrom != null) //we are a student doing homework
@ -1999,5 +2008,10 @@ namespace EduNetworkBuilder
CurrentUser = PPF.SubmitSchoolwork(myNetwork); CurrentUser = PPF.SubmitSchoolwork(myNetwork);
UpdateMenu(); UpdateMenu();
} }
private void markAsGradedToolStripMenuItem_Click(object sender, EventArgs e)
{
NB.NotImplimentedMessage();
}
} }
} }

View File

@ -1849,6 +1849,10 @@
<value>User File Directory</value> <value>User File Directory</value>
<comment>PPF_UserDirectory</comment> <comment>PPF_UserDirectory</comment>
</data> </data>
<data name="String1" xml:space="preserve">
<value>Mark As Graded</value>
<comment>NB_MarkGraded = Mark As Graded</comment>
</data>
<data name="_Save" xml:space="preserve"> <data name="_Save" xml:space="preserve">
<value>Save</value> <value>Save</value>
<comment>_Save = Save</comment> <comment>_Save = Save</comment>

View File

@ -40,6 +40,7 @@ namespace EduNetworkBuilder
public bool isMaster = false; //Is this the original project? If so, we never replace it. public bool isMaster = false; //Is this the original project? If so, we never replace it.
public bool IsSumbitted = false; //Is the student submitting this? If so, date-stamp it and lock it. public bool IsSumbitted = false; //Is the student submitting this? If so, date-stamp it and lock it.
public bool IsGraded = false;
public DateTime SaveDate; //The date this file was saved. public DateTime SaveDate; //The date this file was saved.
public UInt64 ThisID { get; protected set; } public UInt64 ThisID { get; protected set; }
@ -83,6 +84,7 @@ namespace EduNetworkBuilder
dest.Name = source.Name; dest.Name = source.Name;
dest.SaveDate = source.SaveDate; dest.SaveDate = source.SaveDate;
dest.theProject = source.theProject.Clone(); dest.theProject = source.theProject.Clone();
dest.IsGraded = source.IsGraded;
} }
#region Load and Save #region Load and Save
@ -133,6 +135,9 @@ namespace EduNetworkBuilder
case "ismaster": case "ismaster":
bool.TryParse(Individual.InnerText, out isMaster); bool.TryParse(Individual.InnerText, out isMaster);
break; break;
case "isgraded":
bool.TryParse(Individual.InnerText, out IsGraded);
break;
case "issubmitted": case "issubmitted":
bool.TryParse(Individual.InnerText, out IsSumbitted); bool.TryParse(Individual.InnerText, out IsSumbitted);
break; break;
@ -176,6 +181,7 @@ namespace EduNetworkBuilder
writer.WriteElementString("DueDate", DueDate.ToString()); writer.WriteElementString("DueDate", DueDate.ToString());
writer.WriteElementString("SaveDate", SaveDate.ToString()); writer.WriteElementString("SaveDate", SaveDate.ToString());
writer.WriteElementString("IsMaster", isMaster.ToString()); writer.WriteElementString("IsMaster", isMaster.ToString());
writer.WriteElementString("IsGraded", IsGraded.ToString());
writer.WriteElementString("IsSubmitted", IsSumbitted.ToString()); writer.WriteElementString("IsSubmitted", IsSumbitted.ToString());
if (theProject != null) theProject.Save(writer); if (theProject != null) theProject.Save(writer);
writer.WriteEndElement(); writer.WriteEndElement();