]> git.mjollnir.org Git - moodle.git/commitdiff
portfolio: MDL-19358 added $cm to require_login check. this will have to change as...
authormjollnir_ <mjollnir_>
Mon, 1 Jun 2009 18:53:54 +0000 (18:53 +0000)
committermjollnir_ <mjollnir_>
Mon, 1 Jun 2009 18:53:54 +0000 (18:53 +0000)
portfolio/add.php

index 1b1942e30688eb271da571e76ef07a0537d715d7..856af462be1b79b34782b068454637425a18ec8d 100644 (file)
@@ -165,10 +165,12 @@ if (!empty($dataid)) {
     // set up the course so that build_navigation works nice
     $PAGE->set_course($course);
 
-    // and now we know the course for sure, call require_login with it
-    require_login($course);
-
     list($extranav, $cm) = $caller->get_navigation();
+
+    // and now we know the course for sure and maybe the cm, call require_login with it
+    // todo this will have to change when we have things exporting content outside the course context (eg blogs)
+    require_login($course, false, $cm);
+
     $extranav[] = array('type' => 'title', 'name' => get_string('exporting', 'portfolio'));
     $navigation = build_navigation($extranav, $cm);