we do not need any new api for fetching of course record - we have DML with MUST_EXIST flag which is the right way now; we should not include course/lib.php on each page anyway
This commit is contained in:
+1
-3
@@ -60,9 +60,7 @@ if (!$cm = get_coursemodule_from_instance('wiki', $wiki->id)) {
|
||||
print_error('invalidcoursemodule');
|
||||
}
|
||||
|
||||
if (!$course = get_course_by_id($cm->course)) {
|
||||
print_error('coursemisconf');
|
||||
}
|
||||
$course = $DB->get_record('course', array('id'=>$cm->course), '*', MUST_EXIST);
|
||||
|
||||
if ($compare >= $comparewith) {
|
||||
print_error("A page version can only be compared with an older version.");
|
||||
|
||||
Reference in New Issue
Block a user