Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

Commit

Permalink
Tutors can now give grades even if tests did not finish running (for
Browse files Browse the repository at this point in the history
whatever reasons).
  • Loading branch information
keyraphi committed Apr 25, 2019
1 parent d6ac0b5 commit 9f33122
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/Pages/SubmissionGradingEditor.elm
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,6 @@ viewTask sharedState model task grade feedback =

( _, _ ) ->
let
testDoneButtonState =
if String.isEmpty feedback then
CE.PbbDisabled "You need to write Feedback"

else
CE.PbbActive "Benoten" (SendGrade grade.id)

submissionAvailable =
(grade.file_url /= Just "")
&& (grade.file_url /= Nothing)
Expand All @@ -399,14 +392,25 @@ viewTask sharedState model task grade feedback =
== Finished
&& grade.public_execution_state
== Finished

testDoneButtonState =
if String.isEmpty feedback then
CE.PbbDisabled "You need to write Feedback"

else if
not testFinished
&& submissionAvailable
then
CE.PbbActive "Benoten (Achtung: Test nicht vollständig)"
(SendGrade grade.id)

else
CE.PbbActive "Benoten" (SendGrade grade.id)
in
CE.PbbButton <|
if not submissionAvailable then
testDoneButtonState

else if not testFinished && submissionAvailable then
CE.PbbDisabled "The test results are not completed!"

else
testDoneButtonState
]
Expand Down

0 comments on commit 9f33122

Please sign in to comment.