Permalink
Browse files

MDL-20926 fixed fetching of cm

  • Loading branch information...
1 parent 64da683 commit 84971b914dcd74c1fe1be0c16e7e60d383aeb181 @skodak skodak committed Nov 21, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 mod/survey/download.php
  2. +1 −1 mod/workshop/upload.php
View
@@ -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");
}
View
@@ -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)) {

0 comments on commit 84971b9

Please sign in to comment.