Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6b4ec2
)
MDL-31197 navigation: Fixed issue withing require_login for courses that are hidden...
author
Sam Hemelryk
<sam@moodle.com>
Fri, 20 Jan 2012 04:51:24 +0000
(12:51 +0800)
committer
Sam Hemelryk
<sam@moodle.com>
Fri, 20 Jan 2012 04:51:24 +0000
(12:51 +0800)
lib/moodlelib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/moodlelib.php
b/lib/moodlelib.php
index
5582758
..
618d391
100644
(file)
--- a/
lib/moodlelib.php
+++ b/
lib/moodlelib.php
@@
-2744,6
+2744,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 .'/');
}
}