Moodle
  1. Moodle
  2. MDL-36223

In the course's participant outline report, assignment not yet graded are displayed as "Grade : {a}"

    Details

    • Rank:
      45004

      Description

      The title is quite explicit in itself.

      I was able to correct the situation by editing the assign_user_outline in /mod/assign/lib.php based on the quiz function quiz_user_outline. I'm not sure tho if it's good enough but as for now, it resolved the issue for us. And instead of displaying the grade as "Grade : 9.0000", it's now "Grade : 9.00 / 10.00".

      function assign_user_outline($course, $user, $coursemodule, $assignment) {
          global $CFG;
          require_once($CFG->libdir.'/gradelib.php');
          require_once($CFG->dirroot.'/grade/grading/lib.php');
      
          $gradinginfo = grade_get_grades($course->id,
                                              'mod',
                                              'assign',
                                              $assignment->id,
                                              $user->id);
      
          $gradingitem = $gradinginfo->items[0];
          $gradebookgrade = $gradingitem->grades[$user->id];
      
          if (!$gradebookgrade) {
              return null;
          }
          $result = new stdClass();
          //$result->info = get_string('outlinegrade', 'assign', $gradebookgrade->grade); //remove this
          $result->info = get_string('grade') . ': ' . $gradebookgrade->str_long_grade; // and add this one, inspired from quiz
          $result->time = $gradebookgrade->dategraded;
      
          return $result;
      }
      

        Issue Links

          Activity

          Hide
          Damyon Wiese added a comment -

          Thanks for reporting this issue and suggesting a fix. I will set it to waiting for Peer review and review this change as soon as I can.

          Regards, Damyon

          Show
          Damyon Wiese added a comment - Thanks for reporting this issue and suggesting a fix. I will set it to waiting for Peer review and review this change as soon as I can. Regards, Damyon
          Hide
          Helen Foster added a comment -

          This problem has has been reported by Séverin Terrier in MDLQA-5441 when testing Moodle 2.5, together with the error message:

          Notice: Undefined offset: 0 in /html/mod/assign/lib.php on line 1130

          Notice: Trying to get property of non-object in /html/mod/assign/lib.php on line 1131

          Show
          Helen Foster added a comment - This problem has has been reported by Séverin Terrier in MDLQA-5441 when testing Moodle 2.5, together with the error message: Notice: Undefined offset: 0 in /html/mod/assign/lib.php on line 1130 Notice: Trying to get property of non-object in /html/mod/assign/lib.php on line 1131
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Dan Poltawski added a comment -

          Integrated to master, 24 and 23 - thanks Jean-Daniel and Damyon.

          Show
          Dan Poltawski added a comment - Integrated to master, 24 and 23 - thanks Jean-Daniel and Damyon.
          Hide
          Rajesh Taneja added a comment -

          Thanks Damyon,

          Works as mentioned.

          Show
          Rajesh Taneja added a comment - Thanks Damyon, Works as mentioned.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Did you think this day was not going to arrive ever?

          Your patience has been rewarded, yay, sent upstream, thanks!

          Closing...ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Did you think this day was not going to arrive ever? Your patience has been rewarded, yay, sent upstream, thanks! Closing...ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: