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

update_grade doesn't always update the 'finalgrade' field when it should

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9
    • 1.9
    • Gradebook
    • None
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      Hi – I have a custom assignment type that allows me to autograde student work (among other things), and so far it's been working very well, except OCCASIONALLY the grade_update function will fail to update the finalgrade column in the database.

      Here's my call to grade_update:

      grade_update( 'mod/assignment', $this->assignment->courseid, 'mod', 'assignment', $this->assignment->id, 0, $newgrade );

      with $newgrade being an array containing the following fields:

      userid
      feedback
      feedbackformat
      usermodified
      datesubmitted
      dategraded
      rawgrade

      What happens, in rare cases, is that the "rawgrade" entry in the database will be set to some value (e.g., 100), but the "finalgrade" entry in the database will not be updated, so the students have whatever was there before (students can turn in their work, auto-grade it, see the results immediately, resubmit, auto-grade, and repeat until they get all the points).

      Naturally this makes students panic (I'm running a class with 500 students!) when the feedback says "You got 100" and the official grade in the gradebook says "90".

      When I check the entry in the database, sure enough "rawgrade" is set to 100, but "finalgrade" is still set to 90.

            skodak Petr Skoda
            humper Greg Humphreys (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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