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

XMLWordPrintable

    • MOODLE_23_STABLE, MOODLE_25_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MDL-36223-master
    • 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.

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

            damyon Damyon Wiese
            jackdaniels JD
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            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.