Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9.5, 1.9.6, 1.9.7, 2.0
-
Fix Version/s: None
-
Component/s: Administration, Usability
-
Labels:None
-
Difficulty:Easy
-
Affected Branches:MOODLE_19_STABLE, MOODLE_20_STABLE
Description
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));
}
Attachments
Issue Links
| This issue has a non-specific relationship to: | ||||
| MDL-17486 | Add option to set enrolled courses as hidden field on user profile page |
|
|
|
This is an issue with other hidden fields (such as first/last access) as well. The problem still exists in more recent 1.9.x and 2.0 versions. We made the change above to allow users to see their own hidden fields.