If teacher opens a homework that is already graded. Do not prompt to grade it again
This commit is contained in:
parent
61aa50044e
commit
6a51ed058a
@ -933,6 +933,8 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!WhatFrom.IsGraded)
|
||||
{
|
||||
//It was homework. Ask if we want to submit it.
|
||||
DialogResult answer = MessageBox.Show(NB.Translate("N_PromptToSubmit"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||
@ -944,6 +946,19 @@ namespace EduNetworkBuilder
|
||||
BW.SubmitHomework();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//It was homework. Ask if we want to submit it.
|
||||
DialogResult answer = MessageBox.Show(NB.Translate("N_SolvedAlreadyGraded"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||
if (answer == DialogResult.Yes)
|
||||
{
|
||||
KillAllExtraWindows(true);
|
||||
BuilderWindow BW = NB.GetBuilderWin();
|
||||
BW.ReturnToProfile();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2098,9 +2098,7 @@ namespace EduNetworkBuilder
|
||||
|
||||
myNetwork.WhatFrom.IsGraded = true;
|
||||
|
||||
PersonProfileForm PPF = new PersonProfileForm(CurrentUser);
|
||||
PPF.Edit();
|
||||
UpdateMenu();
|
||||
ReturnToProfile();
|
||||
}
|
||||
|
||||
private void markAsGradedToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@ -2108,6 +2106,14 @@ namespace EduNetworkBuilder
|
||||
MarkAsGraded();
|
||||
}
|
||||
|
||||
public void ReturnToProfile()
|
||||
{
|
||||
if (CurrentUser == null) return; //We need to have a user or we will blow up
|
||||
PersonProfileForm PPF = new PersonProfileForm(CurrentUser);
|
||||
PPF.Edit();
|
||||
UpdateMenu();
|
||||
}
|
||||
|
||||
private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CurrentUser == null) return; //Nobody to logout
|
||||
|
@ -1909,4 +1909,8 @@
|
||||
<value>You have completed the homework. Would you like to submit it? If you want to clean it up and submit later, click No. Go to "Edit" -> "Submit" when you want to submit it.</value>
|
||||
<comment>N_PromptToSubmit = You have completed the homework. Would you like to submit it? If you want to clean it up and submit later, click No. Go to "Edit" -> "Submit" when you want to submit it.</comment>
|
||||
</data>
|
||||
<data name="N_SolvedAlreadyGraded" xml:space="preserve">
|
||||
<value>The homework passed all the tests, but is already graded. Would you like to return to the Profile?</value>
|
||||
<comment>N_SolvedAlreadyGraded = The homework passed all the tests, but is already graded. Would you like to return to the Profile?</comment>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user