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:
@@ -53,9 +53,7 @@ if (!$subwiki = wiki_get_subwiki($page->subwikiid)) {
|
||||
if (!$cm = get_coursemodule_from_instance("wiki", $subwiki->wikiid)) {
|
||||
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 (!$wiki = wiki_get_wiki($subwiki->wikiid)) {
|
||||
print_error('incorrectwikiid', 'wiki');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user