-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
1.9.5, 1.9.6, 1.9.7, 2.0
-
None
-
MOODLE_19_STABLE, MOODLE_20_STABLE
-
Easy
When mycourses is included in hiddenuserfields the user cannot see his courses on his own profile page although, of course, the user can see his course list on the front page when he logins.
We think that hiddenuserfields should not keep users from see/view their own details.
That's why we have added a test ( $id == $USER->id ) in /user/view.php changing the lines
/// Get the hidden field list
if (has_capability('moodle/user:viewhiddendetails', $coursecontext)) {
$hiddenfields = array();
} else {
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
}
to the following
/// Get the hidden field list
if (has_capability('moodle/user:viewhiddendetails', $coursecontext) || $id == $USER->id) { <------- here is the change
$hiddenfields = array();
} else {
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
}
- has a non-specific relationship to
-
MDL-17486 Add option to set enrolled courses as hidden field on user profile page
-
- Closed
-