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

timecreated set to null in the grade_grades table after assignment grading

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.7.13
    • Fix Version/s: None
    • Component/s: Assignment
    • Labels:
    • Affected Branches:
      MOODLE_27_STABLE

      Description

      _This is edited from the forum post: https://moodle.org/mod/forum/discuss.php?d=245963#p1361950_

      In Moodle 2.5 [but also the current version (3)], when you are logged in as a student and add an assignment, the table mdl_grade_grades gets a 'timecreated' time stamp.

      Go back into the assignment as a teacher and grade the submission: go check the grade_grades table and find that the 'timecreated' time stamp gets changed to NULL.

      Here are some files and things to check:

      • mod/assign/locallib.php - gradebook_item_update() calls convert_grade_for_gradebook() where datesubmitted is set to null. Lastly it calls mod/assign/lib.php - calls assign_grade_item_update(), passing the data structure where datesubmitted is null
      • mod/assign/lib.php - assign_grade_Item_update() calls lib/gradelib.php - grade_update() passing the data structure where datesubmitted is null
      • lib/gradelib.php - grade_update() calls lib/grade/grade_item.php - update_raw_grade() passing datesubmitted as an argument
      • lib/grade/grade_item.php - update_raw_grade() sets the grade_grades instance timecreated property to datesubmitted (null). The docblock stating "$datesubmitted A timestamp of when the student's work was submitted", but it's value is set to null.

      --------------------------

      I am wanting this fixed so that 'timecreated' stays there, and doesn't get set to NULL on assignments in the grade_grades table. If anyone knows why this was done in the first place, I would be very interested to know.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              leelumultipass1 Rebecca Trynes
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: