Created
August 29, 2017 22:46
-
-
Save ostearn/3482c1cdea015f475945f632f364b7cc to your computer and use it in GitHub Desktop.
Moodle login/index.php modification (redirect to last enrolled course)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this should be added after $SESSION->wantsurl = null; (there are roughly 4 occurances, consider each individually) | |
if($student_course_arry = enrol_get_users_courses($USER->id, true, Null, 'visible DESC,sortorder DESC')) | |
{ | |
foreach($student_course_arry as $value) | |
{ | |
$SESSION->wantsurl = $CFG->httpswwwroot . '/course/view.php?id=' . $value->id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment