From: mjollnir_ Date: Mon, 1 Jun 2009 18:53:54 +0000 (+0000) Subject: portfolio: MDL-19358 added $cm to require_login check. this will have to change as... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=780de011da141eb6e5ffd17e31e1804f0fd3b353;p=moodle.git portfolio: MDL-19358 added $cm to require_login check. this will have to change as soon as we implement portfolio exporting for something other than a course module (eg, a blog, blog post, etc) --- diff --git a/portfolio/add.php b/portfolio/add.php index 1b1942e306..856af462be 100644 --- a/portfolio/add.php +++ b/portfolio/add.php @@ -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);