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

User report on 1.9 gradebook should should display something much better to teachers -- with PATCH

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9, 2.0
    • 1.9
    • Gradebook
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE

      I know that someone will call the existing behavior a "feature" of the user report, but when a teacher goes to this report, they get their their own personal grades (even when they are not a graded user). This is useless. They should get the grade reports of all their students instead, which would be extremely helpful. It is true that someone could write a new report, but since this is the default report shipping with 1.9, it should have the desirable behavior, IMO.

      To fix, change in \grade\report\user\index.php
      --------------------------------------
      // Create a report instance
      $report = new grade_report_user($courseid, $gpr, $context, $userid);

      // print the page
      print_heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));

      if ($report->fill_table())

      { echo $report->print_table(true); }
      -------------------------------------------
      to
      ----------------------------------------
      if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all student reports
      $gui = new graded_users_iterator($course);
      $gui->init();
      if(!isset($gui->grade_items)) $gui->grade_items = array();
      while ($userdata = $gui->next_user()) {
      $user = $userdata->user;
      $report = new grade_report_user($courseid, $gpr, $context, $user->id);
      print_heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
      if ($report->fill_table()) { echo $report->print_table(true); }
      echo "<p style = 'page-break-after: always;'></p>";
      }
      $gui->close();
      }else //Students will see just their own report
      {
      // Create a report instance
      $report = new grade_report_user($courseid, $gpr, $context, $userid);

      // print the page
      print_heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));

      if ($report->fill_table()) { echo $report->print_table(true); }

      }
      -------------------------------------------
      With thanks to our school's (Seattle Academy) Server Administrator Karlene Clapp for the start of this patch

            nicolasconnault Nicolas Connault (Inactive)
            ganderson Gary Anderson (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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