Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.7, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9
-
Fix Version/s: 2.0.8
-
Component/s: Course, General, Gradebook, Other, Roles / Access
-
Labels:None
-
Environment:ALL
-
Database:Any
-
Affected Branches:MOODLE_15_STABLE, MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
Ok, these problems affect Moodle when denying access to view user profiles and view hidden details (creating a FERPA compliant setup).
The following areas still linked to profiles when in FERPA complaint mode:
participants > full profile in more detailed mode
participants > all images linked to profiles
gradebooks grader report > all names linked to full profiles
tabs > profile tab existed
clicking on any of these generates an annoying error.
Here are the fixes I came up with:
user/tabs.php
around line 92
$context = get_context_instance(CONTEXT_SYSTEM);
if ($user->id == $USER->id or has_capability('moodle/user:viewdetails', $context, NULL)) {
$toprow[] = new tabobject('profile', $CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$course->id, get_string('profile'));
}
instead of
$toprow[] = new tabobject('profile', $CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$course->id, get_string('profile'));
lib/weblib.php
around line 4309
$context = get_context_instance(CONTEXT_SYSTEM);
if ($link && ($user->id == $USER->id or has_capability('moodle/user:viewdetails', $context, NULL))) {
instead of
if ($link)
around line 4486
if ($user->id == $USER->id or has_capability('moodle/user:viewdetails', $context, NULL)) {
$output .= '<a href="'. $CFG->wwwroot .'/user/view.php?id='. $user->id .'&course='. $course->id .'">'. $string->fullprofile .'...</a>';
}
instead of
$output .= '<a href="'. $CFG->wwwroot .'/user/view.php?id='. $user->id .'&course='. $course->id .'">'. $string->fullprofile .'...</a>';
grade/report/grader/lib.php
around line 685
$context = get_context_instance(CONTEXT_SYSTEM);
if ($user->id == $USER->id or has_capability('moodle/user:viewdetails', $context, NULL)) {
$link = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$this->course->id.'">'.fullname($user).'</a>';
}
else {
$link = fullname($user);
}
$studentshtml .= '<tr class="r'.$this->rowcount++ . $row_classes[$this->rowcount % 2] . '">'
.'<th class="header c'.$columncount++.' user" scope="row" onclick="set_row(this.parentNode.rowIndex);">'.$user_pic
.$link.'</th>';
instead of
$studentshtml .= '<tr class="r'.$this->rowcount++ . $row_classes[$this->rowcount % 2] . '">'
.'<th class="header c'.$columncount++.' user" scope="row" onclick="set_row(this.parentNode.rowIndex);">'.$user_pic
.<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='
.$this->course->id.'">'.fullname($user).'</a></th>';
These changes do not affect anyone not running in FERPA mode and make FERPA mode work SOOOOO much better.
Attachments
Issue Links
| This issue has been marked as being related by: | ||||
| MDL-17219 | Privacy improvements project ideas for 2.0 |
|
|
|
These look good, Robert, thanks, will get them in today.