Experimenting with a new event type to accommodate teacher-marked questions. This is work in progress.

This commit is contained in:
gustav_delius 2006-02-23 19:12:46 +00:00
parent cb06a092dc
commit 602d778b1f
2 changed files with 4 additions and 2 deletions

View file

@ -74,6 +74,7 @@ define('QUIZ_EVENTGRADE', '3');
define('QUIZ_EVENTDUPLICATEGRADE', '4');
define('QUIZ_EVENTVALIDATE', '5');
define('QUIZ_EVENTCLOSE', '6');
define('QUIZ_EVENTSUBMIT', '7');
/**#@-*/
/**#@+

View file

@ -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