Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-13568

Errors in FERPA compliant setup: fixes included

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • 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: None
    • Labels:
      None
    • Environment:
      ALL
    • Database:
      Any
    • Affected Branches:
      MOODLE_15_STABLE, MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_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

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rrusso33 Robert Russo
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Jake Dallimore, Jun Pataleta, Jake Dallimore, Jun Pataleta, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                3 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: