new function get_coursemodule_from_id() is now used for obtaining of valid $cm from coursemodule id SC#283
This commit is contained in:
+1
-1
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user