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
@ -934,14 +934,29 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//It was homework. Ask if we want to submit it.
|
if (!WhatFrom.IsGraded)
|
||||||
DialogResult answer = MessageBox.Show(NB.Translate("N_PromptToSubmit"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
|
||||||
|
|
||||||
if (answer == DialogResult.Yes)
|
|
||||||
{
|
{
|
||||||
KillAllExtraWindows(true);
|
//It was homework. Ask if we want to submit it.
|
||||||
BuilderWindow BW = NB.GetBuilderWin();
|
DialogResult answer = MessageBox.Show(NB.Translate("N_PromptToSubmit"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||||
BW.SubmitHomework();
|
|
||||||
|
if (answer == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
KillAllExtraWindows(true);
|
||||||
|
BuilderWindow BW = NB.GetBuilderWin();
|
||||||
|
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;
|
myNetwork.WhatFrom.IsGraded = true;
|
||||||
|
|
||||||
PersonProfileForm PPF = new PersonProfileForm(CurrentUser);
|
ReturnToProfile();
|
||||||
PPF.Edit();
|
|
||||||
UpdateMenu();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void markAsGradedToolStripMenuItem_Click(object sender, EventArgs e)
|
private void markAsGradedToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
@ -2108,6 +2106,14 @@ namespace EduNetworkBuilder
|
|||||||
MarkAsGraded();
|
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)
|
private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (CurrentUser == null) return; //Nobody to logout
|
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>
|
<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>
|
<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>
|
||||||
|
<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>
|
</root>
|
Loading…
Reference in New Issue
Block a user