Permalink
Browse files

Merge branch 'wip-MDL-31197-m22' of git://github.com/samhemelryk/mood…

…le into MOODLE_22_STABLE
  • Loading branch information...
2 parents 6badc27 + 135de8d commit acef9e8a7f2ac3133aefc806c47db35cfc114cc5 @stronk7 stronk7 committed Jan 31, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/moodlelib.php
View
@@ -2740,6 +2740,10 @@ function require_login($courseorid = NULL, $autologinguest = true, $cm = NULL, $
if ($preventredirect) {
throw new require_login_exception('Course is hidden');
}
+ // We need to override the navigation URL as the course won't have
+ // been added to the navigation and thus the navigation will mess up
+ // when trying to find it.
+ navigation_node::override_active_url(new moodle_url('/'));
notice(get_string('coursehidden'), $CFG->wwwroot .'/');
}
}

0 comments on commit acef9e8

Please sign in to comment.