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

mdl_assign: codingerror when "no feedbackcomments" selected and gradetype set "none"



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


      Step-by-step instructions:

      1. Login as Teacher
      2. Go to a course
      3. Add new assignment acitivity
        3.1 Deactivate Feedback types -> Feedback comments (all deselected)
        3.2 Set Gradetype to none
        3.3 Save and display
      4. Click on "View all submissions"
        4.1 Under options select the filter to Requires grading
        4.2 You should see now the error

      Expected result:

      • See the gradingtable without entries, e.g Nothing to display message is shown (because there is no submission who needs grading).

      Actual result:

      • It throws an exception and the page is broken

      Additional information:

      • The iteminstance of this assignment is not created under mdl_grade_items! In due of that it's throwing the exception
      • To fix this issue, I know two ways:
        • Switch to another assignment that has "feedback comments or grade type" set correctly and change here the filter back to No filter.
        • Update the value directly with an SQL query for the given user to an empty string. This filter setting is saved under the table mdl_user_preferences under the name assign_filter.

      I think the best solution is to create the entry in the mdl_grade_items table, no matter if feedback comments and grade are not selected. If one of them is selected it creates the needed entry in the mdl_grade_items table. The only difference are the gradetype and the grademax.

      • When selecting feedback comments and no grade type it is set to gradetype 3 and grademax 100
      • When using the grade type it is using gradetype values between 0-2 and the grademax given in the field between 1-100.

      Would be nice if somebody can help out fixing this issue!

      PS: Reproduced on demo.moodle.net


        1. error.PNG
          55 kB
        2. feedback_comments.PNG
          10 kB
        3. filter.PNG
          51 kB
        4. grade_none.PNG
          25 kB
        5. require_grading_error.pdf
          379 kB

          Issue Links



              • Votes:
                12 Vote for this issue
                5 Start watching this issue


                • Created: