better importing of student information when we read in the homework.

This commit is contained in:
Tim Young 2017-08-11 10:16:49 -05:00
parent 217ac4dbd7
commit ed6c37194c

View File

@ -932,6 +932,18 @@ namespace EduNetworkBuilder
{ {
// make temp person record // make temp person record
PersonClass tempStudent = PersonClass.TryLoad(FullName, storedStudent.AltPassword); PersonClass tempStudent = PersonClass.TryLoad(FullName, storedStudent.AltPassword);
if(tempStudent == null)
{
NumErrorFiles++;
continue; //Do not try to load in the data
}
//Retrieve all the stored settings, in case we need to re-write their file
storedStudent.UserSettings = tempStudent.UserSettings;
//Pull out their password, in case we want to retrieve it. (sigh)
storedStudent.Password = tempStudent.Password;
// loop through all networks // loop through all networks
foreach (SchoolworkClass SWC in tempStudent.Projects) foreach (SchoolworkClass SWC in tempStudent.Projects)
{ {