new function get_coursemodule_from_id() is now used for obtaining of valid $cm from coursemodule id SC#283

This commit is contained in:
skodak
2006-08-08 22:09:55 +00:00
parent 9c642ecacb
commit f9d5371b28
85 changed files with 1037 additions and 1012 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
$mode ='addtemplate'; //define the mode for this page, only 1 mode available
if ($id) {
if (! $cm = get_record('course_modules', 'id', $id)) {
if (! $cm = get_coursemodule_from_id('data', $id)) {
error('Course Module ID was incorrect');
}
if (! $course = get_record('course', 'id', $cm->course)) {