Mark items needing attention as bold. Students see un-submitted homeworks bolded. Teachers see ungraded homework bolded
This commit is contained in:
parent
405d45e164
commit
b1c415c686
@ -432,6 +432,12 @@ namespace EduNetworkBuilder
|
||||
return myWin;
|
||||
}
|
||||
|
||||
public static PersonProfileForm GetProfileWin()
|
||||
{
|
||||
PersonProfileForm myWin = (PersonProfileForm)Application.OpenForms["PersonProfileForm"];
|
||||
if (myWin == null) return null;
|
||||
return myWin;
|
||||
}
|
||||
public static PersonClass GetUser()
|
||||
{
|
||||
BuilderWindow BW = GetBuilderWin();
|
||||
@ -1083,6 +1089,13 @@ namespace EduNetworkBuilder
|
||||
return Combined;
|
||||
}
|
||||
|
||||
public static Font GetFont()
|
||||
{
|
||||
PersonProfileForm PPF = GetProfileWin();
|
||||
if (PPF != null) return PPF.GetFont();
|
||||
return new Font(FontFamily.GenericSansSerif, 10.0F, FontStyle.Bold);
|
||||
}
|
||||
|
||||
public static void NotImplimentedMessage()
|
||||
{
|
||||
MessageBox.Show(Translate("NB_NotImplimented"));
|
||||
|
@ -1841,6 +1841,11 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
}
|
||||
|
||||
public Font GetFont()
|
||||
{
|
||||
return Font;
|
||||
}
|
||||
|
||||
public void OpenNetHelpWindow()
|
||||
{
|
||||
RTFWindow rtwin = (RTFWindow)Application.OpenForms["RTFWindow"];
|
||||
|
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
|
||||
namespace EduNetworkBuilder
|
||||
{
|
||||
@ -359,7 +360,7 @@ namespace EduNetworkBuilder
|
||||
/// Organize the projects into a nice project tree.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public TreeNode WorkTree(TreeNode theTop=null)
|
||||
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));
|
||||
@ -393,6 +394,7 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
foreach(SchoolworkClass MasterSW in MasterList)
|
||||
{
|
||||
int count = 0;
|
||||
Master = new TreeNode(MasterSW.Name);
|
||||
Master.Tag = MasterSW;
|
||||
|
||||
@ -403,8 +405,19 @@ namespace EduNetworkBuilder
|
||||
Node = new TreeNode(DrawFrom[i].Name);
|
||||
Node.Tag = DrawFrom[i];
|
||||
Master.Nodes.Add(Node);
|
||||
if (isAdmin && !DrawFrom[i].IsGraded) //Bold ungraded homework
|
||||
{
|
||||
Font tFont = NB.GetFont();
|
||||
Node.NodeFont = new Font(tFont.FontFamily, tFont.Size, FontStyle.Bold);
|
||||
}
|
||||
count++; //How many submitted versions are there
|
||||
}
|
||||
}
|
||||
if(!isAdmin && count ==0) //bold homework that has not yet been submitted
|
||||
{
|
||||
Font tFont = NB.GetFont();
|
||||
Master.NodeFont = new Font(tFont.FontFamily, tFont.Size, FontStyle.Bold);
|
||||
}
|
||||
Top.Nodes.Add(Master);
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
Node = new TreeNode(PC.UserName);
|
||||
Node.Tag = PC;
|
||||
PC.WorkTree(Node);
|
||||
PC.WorkTree(Node, true);
|
||||
Top.Nodes.Add(Node);
|
||||
}
|
||||
}
|
||||
@ -374,6 +374,15 @@ namespace EduNetworkBuilder
|
||||
CurrentUser.ChangePassword(Password1);
|
||||
}
|
||||
|
||||
public Font GetFont()
|
||||
{
|
||||
if(tvClasswork.Font != null) return tvClasswork.Font;
|
||||
if (Font != null) return Font;
|
||||
BuilderWindow BW = NB.GetBuilderWin();
|
||||
if (BW != null) return BW.GetFont();
|
||||
return new Font(FontFamily.GenericSansSerif, 10.0F, FontStyle.Bold);
|
||||
}
|
||||
|
||||
private void ChangeTreeDataTab(TreeDataTab WhatTo)
|
||||
{
|
||||
foreach (TreeDataTab one in Enum.GetValues(typeof(TreeDataTab)))
|
||||
|
Loading…
Reference in New Issue
Block a user