Browse files

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

…le into MOODLE_21_STABLE
  • Loading branch information...
2 parents a607db6 + 9d2e41a commit 5acb97c505dd144f552341252c9262af044c4af7 @stronk7 stronk7 committed Jan 31, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/moodlelib.php
View
4 lib/moodlelib.php
@@ -2499,6 +2499,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 5acb97c

Please sign in to comment.