diff --git a/EduNetworkBuilder/NetworkBuilder.Designer.cs b/EduNetworkBuilder/NetworkBuilder.Designer.cs
index ac81abf..8a26f59 100644
--- a/EduNetworkBuilder/NetworkBuilder.Designer.cs
+++ b/EduNetworkBuilder/NetworkBuilder.Designer.cs
@@ -85,6 +85,7 @@
this.myProgressBar = new System.Windows.Forms.ProgressBar();
this.updateClassworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.submitHomeworkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.markAsGradedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.msMainMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbNetworkView)).BeginInit();
this.HelpPanel.SuspendLayout();
@@ -166,7 +167,8 @@
this.profileToolStripMenuItem,
this.addToClassworkToolStripMenuItem,
this.updateClassworkToolStripMenuItem,
- this.submitHomeworkToolStripMenuItem});
+ this.submitHomeworkToolStripMenuItem,
+ this.markAsGradedToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(47, 24);
this.editToolStripMenuItem.Text = "Edit";
@@ -598,6 +600,13 @@
this.submitHomeworkToolStripMenuItem.Text = "Submit Homework";
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
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
@@ -690,6 +699,7 @@
private System.Windows.Forms.ToolStripMenuItem addToClassworkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem updateClassworkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem submitHomeworkToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem markAsGradedToolStripMenuItem;
}
}
diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs
index 571695f..88a1384 100644
--- a/EduNetworkBuilder/NetworkBuilder.cs
+++ b/EduNetworkBuilder/NetworkBuilder.cs
@@ -161,6 +161,7 @@ namespace EduNetworkBuilder
changeLanguageToolStripMenuItem.Text = NB.Translate("NB_changeLanguageToolStripMenuItem", OurSettings);
submitHomeworkToolStripMenuItem.Text = NB.Translate("NB_SubmitClasswork");
updateClassworkToolStripMenuItem.Text = NB.Translate("NB_UpdateClasswork");
+ markAsGradedToolStripMenuItem.Text = NB.Translate("NB_MarkGraded");
Text = NB.Translate("NB_Form", OurSettings);
}
@@ -409,6 +410,7 @@ namespace EduNetworkBuilder
submitHomeworkToolStripMenuItem.Visible = false;
updateClassworkToolStripMenuItem.Visible = false;
}
+ markAsGradedToolStripMenuItem.Visible = false;
if(CurrentUser != null)
{
if (CurrentUser.isAdmin)
@@ -422,9 +424,16 @@ namespace EduNetworkBuilder
}
else
{
- //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;
+ if (!myNetwork.WhatFrom.IsSumbitted)
+ {
+ //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
@@ -1999,5 +2008,10 @@ namespace EduNetworkBuilder
CurrentUser = PPF.SubmitSchoolwork(myNetwork);
UpdateMenu();
}
+
+ private void markAsGradedToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ NB.NotImplimentedMessage();
+ }
}
}
\ No newline at end of file
diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx
index 20642de..3591d67 100644
--- a/EduNetworkBuilder/Resources/languages/edustrings.resx
+++ b/EduNetworkBuilder/Resources/languages/edustrings.resx
@@ -1849,6 +1849,10 @@
User File Directory
PPF_UserDirectory
+
+ Mark As Graded
+ NB_MarkGraded = Mark As Graded
+
Save
_Save = Save
diff --git a/EduNetworkBuilder/SchoolworkClass.cs b/EduNetworkBuilder/SchoolworkClass.cs
index dbc21ed..cff2f4b 100644
--- a/EduNetworkBuilder/SchoolworkClass.cs
+++ b/EduNetworkBuilder/SchoolworkClass.cs
@@ -40,6 +40,7 @@ namespace EduNetworkBuilder
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 IsGraded = false;
public DateTime SaveDate; //The date this file was saved.
public UInt64 ThisID { get; protected set; }
@@ -83,6 +84,7 @@ namespace EduNetworkBuilder
dest.Name = source.Name;
dest.SaveDate = source.SaveDate;
dest.theProject = source.theProject.Clone();
+ dest.IsGraded = source.IsGraded;
}
#region Load and Save
@@ -133,6 +135,9 @@ namespace EduNetworkBuilder
case "ismaster":
bool.TryParse(Individual.InnerText, out isMaster);
break;
+ case "isgraded":
+ bool.TryParse(Individual.InnerText, out IsGraded);
+ break;
case "issubmitted":
bool.TryParse(Individual.InnerText, out IsSumbitted);
break;
@@ -176,6 +181,7 @@ namespace EduNetworkBuilder
writer.WriteElementString("DueDate", DueDate.ToString());
writer.WriteElementString("SaveDate", SaveDate.ToString());
writer.WriteElementString("IsMaster", isMaster.ToString());
+ writer.WriteElementString("IsGraded", IsGraded.ToString());
writer.WriteElementString("IsSubmitted", IsSumbitted.ToString());
if (theProject != null) theProject.Save(writer);
writer.WriteEndElement();