MDL-29662 quiz overrides: use proper course value (was php notice).

This commit is contained in:
Eloy Lafuente (stronk7) 2012-09-05 18:01:24 +02:00
parent 130eddd24c
commit 393cadf205

View File

@ -1153,7 +1153,7 @@ function quiz_update_events($quiz, $override = null) {
if (!empty($quiz->coursemodule)) {
$cmid = $quiz->coursemodule;
} else {
$cmid = get_coursemodule_from_instance('quiz', $quiz->id, $courseid)->id;
$cmid = get_coursemodule_from_instance('quiz', $quiz->id, $quiz->course)->id;
}
$event = new stdClass();