notes MDL-24495 Set default course id for notes
authorSam Hemelryk <sam@moodle.com>
Sun, 3 Oct 2010 12:14:54 +0000 (12:14 +0000)
committerSam Hemelryk <sam@moodle.com>
Sun, 3 Oct 2010 12:14:54 +0000 (12:14 +0000)
notes/index.php

index 0059449..a9d9d92 100644 (file)
@@ -34,6 +34,10 @@ switch($filtertype) {
         break;
 }
 
+if (empty($courseid)) {
+    $courseid = SITEID;
+}
+
 /// locate course information
 $course = $DB->get_record('course', array('id'=>$courseid), '*', MUST_EXIST);