Moodle
  1. Moodle
  2. MDL-33878

Assignment module - stack trace when unoverriding a grade for a user with a submission but no grade when feedback comments is enabled.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Assignment
    • Labels:
      None
    • Testing Instructions:
      Hide
      1. Create a new assignment in a course with at least one student. Make sure Feedback comments are enabled.
      2. Login as a student and add a submission to the assignment
      3. Login as a grader and assign a grade for the student directly in the gradebook (not in the assignment)
      4. Edit the grade in the gradebook and remove the overridden flag
      5. Save the grade - verify you do not see the stack trace/error listed in the description of this bug.
      Show
      Create a new assignment in a course with at least one student. Make sure Feedback comments are enabled. Login as a student and add a submission to the assignment Login as a grader and assign a grade for the student directly in the gradebook (not in the assignment) Edit the grade in the gradebook and remove the overridden flag Save the grade - verify you do not see the stack trace/error listed in the description of this bug.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
    • Rank:
      41980

      Description

      The following stack trace is produced when unoveriding a grade in the gradebook for a user who has a submission but no grade in an assignment when the feedback comments plugin is enabled for the assignment.

      Argument 1 passed to assign_feedback_comments::text_for_gradebook() must be an instance of stdClass, boolean given, called in /git/working/moodle23/mod/assign/locallib.php on line 3356 and defined
      Error code: codingerror
      Stack trace:

      line 397 of /lib/setuplib.php: coding_exception thrown
      line 290 of /mod/assign/feedback/comments/locallib.php: call to default_error_handler()
      line 3356 of /mod/assign/locallib.php: call to assign_feedback_comments->text_for_gradebook()
      line 760 of /mod/assign/lib.php: call to assign->get_user_grades_for_gradebook()
      line 777 of /mod/assign/lib.php: call to assign_get_user_grades()
      line 1190 of /lib/gradelib.php: call to assign_update_grades()
      line 1447 of /lib/grade/grade_item.php: call to grade_update_mod_grades()
      line 319 of /lib/grade/grade_grade.php: call to grade_item->refresh_grades()
      line 215 of /grade/edit/tree/grade.php: call to grade_grade->set_overridden()

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          Code and testing instructions look good. You are go for integration.

          Show
          Andrew Davis added a comment - Code and testing instructions look good. You are go for integration.
          Hide
          Damyon Wiese added a comment -

          Thanks Andrew

          Show
          Damyon Wiese added a comment - Thanks Andrew
          Hide
          Dan Poltawski added a comment -

          Integrated and tested during integration.

          Show
          Dan Poltawski added a comment - Integrated and tested during integration.
          Hide
          Dan Poltawski added a comment -

          Replicated the problem before integration and then tested it was resolved after integration.

          Just to be clear - the grade is removed when you untick the overriden button. I assume that is expect behaviour.

          Show
          Dan Poltawski added a comment - Replicated the problem before integration and then tested it was resolved after integration. Just to be clear - the grade is removed when you untick the overriden button. I assume that is expect behaviour.
          Hide
          Damyon Wiese added a comment -

          Yes that is the expected behaviour - the gradebook asks the assignment for the original grade and since there is none, it is removed.

          Show
          Damyon Wiese added a comment - Yes that is the expected behaviour - the gradebook asks the assignment for the original grade and since there is none, it is removed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And this has been incorporated to all the weekly builds and also, to Moodle 2.3 Release Candidate 1, yay!

          Many, many thanks for your hard work!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - And this has been incorporated to all the weekly builds and also, to Moodle 2.3 Release Candidate 1, yay! Many, many thanks for your hard work! Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: