mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Experimenting with a new event type to accommodate teacher-marked questions. This is work in progress.
This commit is contained in:
parent
cb06a092dc
commit
602d778b1f
2 changed files with 4 additions and 2 deletions
|
@ -74,6 +74,7 @@ define('QUIZ_EVENTGRADE', '3');
|
|||
define('QUIZ_EVENTDUPLICATEGRADE', '4');
|
||||
define('QUIZ_EVENTVALIDATE', '5');
|
||||
define('QUIZ_EVENTCLOSE', '6');
|
||||
define('QUIZ_EVENTSUBMIT', '7');
|
||||
/**#@-*/
|
||||
|
||||
/**#@+
|
||||
|
|
|
@ -167,6 +167,7 @@ class quiz_essay_qtype extends quiz_default_questiontype {
|
|||
quiz_print_comment("<p align=\"right\">$answer->feedback</p>");
|
||||
}
|
||||
}
|
||||
$this->print_question_submit_buttons($question, $state, $cmoptions, $options);
|
||||
}
|
||||
|
||||
function grade_responses(&$question, &$state, $cmoptions) {
|
||||
|
@ -175,9 +176,9 @@ class quiz_essay_qtype extends quiz_default_questiontype {
|
|||
if (isset($state->responses['fraction'])) {
|
||||
$state->raw_grade = $state->responses['fraction'];
|
||||
$state->options->graded = 1;
|
||||
}
|
||||
if (empty($state->raw_grade)) {
|
||||
} else {
|
||||
$state->raw_grade = 0;
|
||||
$state->event = QUIZ_EVENTSUBMIT;
|
||||
}
|
||||
|
||||
// Make sure we don't assign negative or too high marks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue