Move homework test status to schoolwork class
This commit is contained in:
parent
c07247bb66
commit
eac09a2d80
@ -66,8 +66,6 @@ namespace EduNetworkBuilder
|
|||||||
private List<Image> PacketImages = new List<Image>();
|
private List<Image> PacketImages = new List<Image>();
|
||||||
private List<PingTestStatus> PingTestStats = new List<PingTestStatus>();
|
private List<PingTestStatus> PingTestStats = new List<PingTestStatus>();
|
||||||
|
|
||||||
public HomeworkSolvedStatus HomeworkStatus = HomeworkSolvedStatus.NeverChecked;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// WhatFrom: If we are launched from a homework, we remember it here.
|
/// WhatFrom: If we are launched from a homework, we remember it here.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -245,9 +243,6 @@ namespace EduNetworkBuilder
|
|||||||
case "sortorder":
|
case "sortorder":
|
||||||
double.TryParse(Individual.InnerText, out SortOrder);
|
double.TryParse(Individual.InnerText, out SortOrder);
|
||||||
break;
|
break;
|
||||||
case "homeworkstatus":
|
|
||||||
HomeworkStatus = NB.ParseEnum<HomeworkSolvedStatus>(Individual.InnerText);
|
|
||||||
break;
|
|
||||||
case "startinghelplevel":
|
case "startinghelplevel":
|
||||||
StartingHelpLevel = NB.ParseEnum<NetTestVerbosity>(Individual.InnerText);
|
StartingHelpLevel = NB.ParseEnum<NetTestVerbosity>(Individual.InnerText);
|
||||||
HintsToDisplay = StartingHelpLevel;
|
HintsToDisplay = StartingHelpLevel;
|
||||||
@ -362,8 +357,6 @@ namespace EduNetworkBuilder
|
|||||||
writer.WriteElementString("startinghelplevel", StartingHelpLevel.ToString());
|
writer.WriteElementString("startinghelplevel", StartingHelpLevel.ToString());
|
||||||
writer.WriteElementString("vlansenabled", VLANsEnabled.ToString());
|
writer.WriteElementString("vlansenabled", VLANsEnabled.ToString());
|
||||||
writer.WriteElementString("VLANPacketColors", VLANPacketColors.ToString());
|
writer.WriteElementString("VLANPacketColors", VLANPacketColors.ToString());
|
||||||
if(HomeworkStatus != HomeworkSolvedStatus.NeverChecked)
|
|
||||||
writer.WriteElementString("HomeworkStatus", HomeworkStatus.ToString());
|
|
||||||
if (!StraightToFile)
|
if (!StraightToFile)
|
||||||
writer.WriteElementString("PuzzleName", PuzzleName);
|
writer.WriteElementString("PuzzleName", PuzzleName);
|
||||||
//Save all the devices
|
//Save all the devices
|
||||||
|
@ -998,7 +998,7 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
foreach(SchoolworkClass homework in student.Projects)
|
foreach(SchoolworkClass homework in student.Projects)
|
||||||
{
|
{
|
||||||
if(homework.IsSumbitted && !homework.IsGraded)
|
if(homework.IsSumbitted && !homework.IsGraded && homework.theProject.HomeworkStatus == HomeworkSolvedStatus.NeverChecked)
|
||||||
{
|
{
|
||||||
//We only need to test homework that is submitted and not graded.
|
//We only need to test homework that is submitted and not graded.
|
||||||
|
|
||||||
|
@ -45,6 +45,9 @@ namespace EduNetworkBuilder
|
|||||||
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; }
|
||||||
|
|
||||||
|
public HomeworkSolvedStatus HomeworkStatus = HomeworkSolvedStatus.NeverChecked;
|
||||||
|
|
||||||
|
|
||||||
protected SchoolworkClass() { }
|
protected SchoolworkClass() { }
|
||||||
|
|
||||||
public SchoolworkClass(XmlNode TheNode)
|
public SchoolworkClass(XmlNode TheNode)
|
||||||
@ -177,6 +180,9 @@ namespace EduNetworkBuilder
|
|||||||
case "savedate":
|
case "savedate":
|
||||||
DateTime.TryParse(Individual.InnerText, out currentOne.SaveDate);
|
DateTime.TryParse(Individual.InnerText, out currentOne.SaveDate);
|
||||||
break;
|
break;
|
||||||
|
case "homeworkstatus":
|
||||||
|
currentOne.HomeworkStatus = NB.ParseEnum<HomeworkSolvedStatus>(Individual.InnerText);
|
||||||
|
break;
|
||||||
case "ismaster":
|
case "ismaster":
|
||||||
bool.TryParse(Individual.InnerText, out currentOne.isMaster);
|
bool.TryParse(Individual.InnerText, out currentOne.isMaster);
|
||||||
break;
|
break;
|
||||||
@ -257,6 +263,8 @@ namespace EduNetworkBuilder
|
|||||||
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("IsGraded", IsGraded.ToString());
|
||||||
|
if (HomeworkStatus != HomeworkSolvedStatus.NeverChecked)
|
||||||
|
writer.WriteElementString("HomeworkStatus", HomeworkStatus.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();
|
||||||
|
Loading…
Reference in New Issue
Block a user