button calls function to try one for testing
This commit is contained in:
parent
eac09a2d80
commit
8c600642b6
@ -1776,12 +1776,16 @@ namespace EduNetworkBuilder
|
||||
/// This func tries to non-visually process all the tests, seeing if the network is
|
||||
/// "solved." This is for homework that is "submitted."
|
||||
/// </summary>
|
||||
public void CheckThatHomeworkIsSolved()
|
||||
public HomeworkSolvedStatus CheckThatHomeworkIsSolved()
|
||||
{
|
||||
bool HadIssues = false;
|
||||
foreach(NetTest NT in NetTests)
|
||||
{
|
||||
|
||||
}
|
||||
if(HadIssues)
|
||||
return HomeworkSolvedStatus.CheckedFailed;
|
||||
return HomeworkSolvedStatus.CheckedSucceeded;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -994,16 +994,21 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
if (CurrentUser == null) return;
|
||||
//Test all student's homework that is ungraded.
|
||||
bool didone = false;
|
||||
foreach(PersonClass student in CurrentUser.Students)
|
||||
{
|
||||
foreach(SchoolworkClass homework in student.Projects)
|
||||
{
|
||||
if(homework.IsSumbitted && !homework.IsGraded && homework.theProject.HomeworkStatus == HomeworkSolvedStatus.NeverChecked)
|
||||
if(homework.IsSumbitted && !homework.IsGraded && homework.HomeworkStatus == HomeworkSolvedStatus.NeverChecked)
|
||||
{
|
||||
//We only need to test homework that is submitted and not graded.
|
||||
|
||||
}
|
||||
}
|
||||
homework.CheckThatHomeworkIsSolved(); //Process it
|
||||
didone = true;
|
||||
break; //for now, just do one. For testing purposes
|
||||
}
|
||||
}
|
||||
if(didone)
|
||||
break; //For now, just do one.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -249,6 +249,15 @@ namespace EduNetworkBuilder
|
||||
ThisID = WhoFor.UserSettings.IssueID();
|
||||
}
|
||||
|
||||
public HomeworkSolvedStatus CheckThatHomeworkIsSolved()
|
||||
{
|
||||
if(theProject != null)
|
||||
{
|
||||
HomeworkStatus = theProject.CheckThatHomeworkIsSolved();
|
||||
}
|
||||
return HomeworkStatus;
|
||||
}
|
||||
|
||||
public void Save(XmlWriter writer)
|
||||
{
|
||||
//Save the language name
|
||||
|
Loading…
Reference in New Issue
Block a user