MDL-20926 fixed fetching of cm

This commit is contained in:
Petr Skoda
2009-11-21 23:08:37 +00:00
parent 1e7e0e1df6
commit c3671c1291
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
$type = optional_param('type', 'xls', PARAM_ALPHA);
$group = optional_param('group', 0, PARAM_INT);
if (! $cm = get_record("course_modules", "id", $id)) {
if (! $cm = get_coursemodule_from_id('survey', $id)) {
error("Course Module ID was incorrect");
}
+1 -1
View File
@@ -7,7 +7,7 @@
$id = required_param('id', PARAM_INT); // CM ID
if (! $cm = get_record("course_modules", "id", $id)) {
if (! $cm = get_coursemodule_from_id('workshop', $id)) {
error("Course Module ID was incorrect");
}
if (! $course = get_record("course", "id", $cm->course)) {