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
@@ -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');
}