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

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

    Details

    • Testing Instructions:
      Hide
      1. Add an assignment to a course
      2. View a users activity outline report for that assignment
      3. Verify the grade for the ungraded student does not appear as "$ {a}

        " in the report (should be -).

      4. Add a new assignment using a scale
      5. Grade a student
      6. View the activity report for the student and verify the value from the scale is displayed as the grade.
      Show
      Add an assignment to a course View a users activity outline report for that assignment Verify the grade for the ungraded student does not appear as "$ {a} " in the report (should be -). Add a new assignment using a scale Grade a student View the activity report for the student and verify the value from the scale is displayed as the grade.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-36223-master

      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;
      }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              damyon 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 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
              tsala 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
              tsala 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
              poltawski 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
              poltawski 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
              poltawski Dan Poltawski added a comment -

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

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

              Thanks Damyon,

              Works as mentioned.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks Damyon, Works as mentioned.
              Hide
              stronk7 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
              stronk7 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:
                    Fix Release Date:
                    13/May/13