From 88a15caf882db6a0533a07939cab35a86fbb3569 Mon Sep 17 00:00:00 2001
From: Tim Young <tim.young@lightsys.org>
Date: Wed, 9 Aug 2017 17:01:30 -0500
Subject: [PATCH] Get encryption working for teacher

---
 EduNetworkBuilder/PersonClass.cs       | 2 +-
 EduNetworkBuilder/PersonProfileForm.cs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/EduNetworkBuilder/PersonClass.cs b/EduNetworkBuilder/PersonClass.cs
index d5ef087..649f082 100644
--- a/EduNetworkBuilder/PersonClass.cs
+++ b/EduNetworkBuilder/PersonClass.cs
@@ -39,7 +39,7 @@ namespace EduNetworkBuilder
         /// The AltPassword is mainly used to hold the admin decrypting password.  The student account will
         /// use this to encrypt the student password, so the admin can open their file.
         /// </summary>
-        string AltPassword = "";
+        public string AltPassword = "";
         /// <summary>
         /// Used to determine if the user we are working with is the admin account.
         /// </summary>
diff --git a/EduNetworkBuilder/PersonProfileForm.cs b/EduNetworkBuilder/PersonProfileForm.cs
index ed14575..3e35917 100644
--- a/EduNetworkBuilder/PersonProfileForm.cs
+++ b/EduNetworkBuilder/PersonProfileForm.cs
@@ -921,7 +921,7 @@ namespace EduNetworkBuilder
                     if (File.Exists(FullName))
                     {
                         //   make temp person record
-                        PersonClass tempStudent = new PersonClass(FullName);
+                        PersonClass tempStudent = PersonClass.TryLoad(FullName, storedStudent.AltPassword);
                         //   loop through all networks
                         foreach (SchoolworkClass SWC in tempStudent.Projects)
                         {