From 765789226e8e1d188cf9aa393da7fd6952ab5c43 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 11 Aug 2017 15:01:09 -0500 Subject: [PATCH] Reverse the sort for the admin. The list is traversed in reverse elsewhere. This makes them sort the same --- EduNetworkBuilder/PersonClass.cs | 3 +-- EduNetworkBuilder/PersonProfileForm.cs | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/EduNetworkBuilder/PersonClass.cs b/EduNetworkBuilder/PersonClass.cs index 8b45c7a..213910f 100644 --- a/EduNetworkBuilder/PersonClass.cs +++ b/EduNetworkBuilder/PersonClass.cs @@ -511,8 +511,7 @@ namespace EduNetworkBuilder /// public TreeNode WorkTree(TreeNode theTop=null, bool ForTeacher = false) { - //Sort by due date, and within the due dates, sort by save date - //Projects.Sort((q, p) => p.DueDate == q.DueDate ? p.SaveDate.CompareTo(q.SaveDate) : p.DueDate.CompareTo(q.DueDate)); + //Sort by due date, and within the due dates, sort by save date Projects.Sort((q, p) => p.Compare(q)); List DrawFrom = new List(); diff --git a/EduNetworkBuilder/PersonProfileForm.cs b/EduNetworkBuilder/PersonProfileForm.cs index d17a90f..82fc1ce 100644 --- a/EduNetworkBuilder/PersonProfileForm.cs +++ b/EduNetworkBuilder/PersonProfileForm.cs @@ -292,7 +292,10 @@ namespace EduNetworkBuilder Node.Tag = "Class"; //Do not translate this TreeNode Top = Node; tvClasswork.Nodes.Add(Node); - CurrentUser.Projects.Sort((q, p) => p.Compare(q)); + + //This is sorted reverse from what happens in PersonClass.WorkTree. + //In PersonClass.WorkTree, we traverse it backwards. + CurrentUser.Projects.Sort((p, q) => p.Compare(q)); foreach (SchoolworkClass SWC in CurrentUser.Projects) { Node = new TreeNode(SWC.Name);