While working on the MDL-49854 we've noticed that course/user.php code is confusing and is prone to errors.
Even if you define the mode parameter to some wrong string it does take you to user grades report. The user.php page does many checks and redirect to different places relying on the mode param but as commented in https://tracker.moodle.org/browse/MDL-49854?focusedCommentId=351207&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-351207 there are some weird behaviours.
Would be great to do a proper review looking where this script is called from and do a proper cleanup.
- Discovered while testing
-
MDL-49854 User navigation code cleanup
-
- Closed
-