NOBUG: Fix notice (and something more?). Like MDL-12961 but in data module; merged from 19_STABLE

This commit is contained in:
Eloy Lafuente 2010-01-13 16:50:27 +00:00
parent 07e1428995
commit 1fb0e43005

View File

@ -17,6 +17,8 @@ if (!$course = $DB->get_record('course', array('id'=>$data->course))) {
if (!$cm = get_coursemodule_from_instance('data', $data->id)) {
print_error('invalidcoursemodule');
} else {
$data->cmidnumber = $cm->id; //MDL-12961
}
require_login($course, false, $cm);