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

Errors in FERPA compliant setup: fixes included

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 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
    • None
    • ALL
    • Any
    • MOODLE_15_STABLE, MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      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.

            Unassigned Unassigned
            rrusso33 Robert Russo (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.