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:
Petr Skoda
2010-06-17 22:50:25 +00:00
parent 42885485fa
commit 1b048629bc
16 changed files with 24 additions and 71 deletions
+1 -3
View File
@@ -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.");