MDL-5241 "When manually grading, identity questions by their number within the quiz as well as by question name"
Also added a drop down box to select question to mark instead of the viewquestions table. The drop down box is available at the top of every page, but only if there is more than one manually gradeable question in the quiz. If there is only one question it is automatically selected for marking. Also added a new constant QUESTION_EVENTS_GRADED during a general refactoring of UI code in grading report and some improvements to efficiency of SQL in report.
This commit is contained in:
+6
-3
@@ -33,6 +33,10 @@ define('QUESTION_EVENTCLOSEANDGRADE', '6'); // Moodle has graded the responses.
|
||||
define('QUESTION_EVENTSUBMIT', '7'); // The student response has been submitted but it has not yet been marked
|
||||
define('QUESTION_EVENTCLOSE', '8'); // The response has been submitted and the session has been closed, either because the student requested it or because Moodle did it (e.g. because of a timelimit). The responses have not been graded.
|
||||
define('QUESTION_EVENTMANUALGRADE', '9'); // Grade was entered by teacher
|
||||
|
||||
define('QUESTION_EVENTS_GRADED', QUESTION_EVENTGRADE.','.
|
||||
QUESTION_EVENTCLOSEANDGRADE.','.
|
||||
QUESTION_EVENTMANUALGRADE);
|
||||
/**#@-*/
|
||||
|
||||
/**#@+
|
||||
@@ -1024,9 +1028,8 @@ function save_question_session(&$question, &$state) {
|
||||
* @param object $state
|
||||
*/
|
||||
function question_state_is_graded($state) {
|
||||
return ($state->event == QUESTION_EVENTGRADE
|
||||
or $state->event == QUESTION_EVENTCLOSEANDGRADE
|
||||
or $state->event == QUESTION_EVENTMANUALGRADE);
|
||||
$gradedevents = explode(',', QUESTION_EVENTS_GRADED);
|
||||
return (in_array($state->event, $gradedevents));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user