From ed6c37194c037c659712ee448e3c1b5bb978e59f Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 11 Aug 2017 10:16:49 -0500 Subject: [PATCH] better importing of student information when we read in the homework. --- EduNetworkBuilder/PersonProfileForm.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/EduNetworkBuilder/PersonProfileForm.cs b/EduNetworkBuilder/PersonProfileForm.cs index ab7c1e5..aaf8da4 100644 --- a/EduNetworkBuilder/PersonProfileForm.cs +++ b/EduNetworkBuilder/PersonProfileForm.cs @@ -932,6 +932,18 @@ namespace EduNetworkBuilder { // make temp person record 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 foreach (SchoolworkClass SWC in tempStudent.Projects) {