Permalink
Browse files

MDL-29678 navigation: Navigation AJAX require_login calls no longer s…

…et wantsurl or redirect
  • Loading branch information...
1 parent 58db57a commit 431c68a86719749b452926157cbd82f59242bfc8 Sam Hemelryk committed Mar 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/navigationlib.php
View
6 lib/navigationlib.php
@@ -2551,7 +2551,7 @@ public function initialise() {
break;
case self::TYPE_COURSE :
$course = $DB->get_record('course', array('id' => $this->instanceid), '*', MUST_EXIST);
- require_course_login($course);
+ require_course_login($course, true, null, false, true);
$this->page->set_context(get_context_instance(CONTEXT_COURSE, $course->id));
$coursenode = $this->add_course($course);
$this->add_course_essentials($coursenode, $course);
@@ -2565,7 +2565,7 @@ public function initialise() {
LEFT JOIN {course_sections} cs ON cs.course = c.id
WHERE cs.id = ?';
$course = $DB->get_record_sql($sql, array($this->instanceid), MUST_EXIST);
- require_course_login($course);
+ require_course_login($course, true, null, false, true);
$this->page->set_context(get_context_instance(CONTEXT_COURSE, $course->id));
$coursenode = $this->add_course($course);
$this->add_course_essentials($coursenode, $course);
@@ -2582,7 +2582,7 @@ public function initialise() {
$course = $DB->get_record_sql($sql, $params, MUST_EXIST);
$modinfo = get_fast_modinfo($course);
$cm = $modinfo->get_cm($this->instanceid);
- require_course_login($course, true, $cm);
+ require_course_login($course, true, $cm, false, true);
$this->page->set_context(get_context_instance(CONTEXT_MODULE, $cm->id));
$coursenode = $this->load_course($course);
if ($course->id == SITEID) {

0 comments on commit 431c68a

Please sign in to comment.