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

Workshop throws coding exceptions if all assessments have zero weight

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.4.7, 2.5.3
    • 2.2.11, 2.3.9, 2.4.6, 2.5.2
    • Workshop
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MDL-42494-workshop-exception
    • Hide

      Testing difficulty: EASY

      Testing environment: A course with a workshop and at least two students enrolled.

      1. Prepare a workshop with a simple assessment form of any strategy.
      2. Switch the workshop to the submission phase and let students submit their work.
      3. Allocate the submissions so that each submission is assessed by just one peer-reviewer.
      4. For at least one submission, set the assessment weight to zero for all allocated assessments (that means the only one in our case).
      5. Switch the workshop to the assessment phase and let students assess allocated submissions.
      6. Switch the workshop to the grading evaluation phase and make sure the grading evaluation method is set to the "Comparison with the best assessment". Click the "Re-calculate grades" button.
      7. TEST: Make sure no coding exception is thrown. The reviewer does not get any grade for their zero-weighted assessment.
      8. As a teacher, provide additional assessment for the submission beside the one with zero grade. Keep the weight of this teacher's assessment higher than zero. Re-calculate the grades again.
      9. TEST: The grading grade (grade for assessment) for the assessment with the zero weight should now be calculated (and will probably be very low or zero).
      Show
      Testing difficulty: EASY Testing environment: A course with a workshop and at least two students enrolled. Prepare a workshop with a simple assessment form of any strategy. Switch the workshop to the submission phase and let students submit their work. Allocate the submissions so that each submission is assessed by just one peer-reviewer. For at least one submission, set the assessment weight to zero for all allocated assessments (that means the only one in our case). Switch the workshop to the assessment phase and let students assess allocated submissions. Switch the workshop to the grading evaluation phase and make sure the grading evaluation method is set to the "Comparison with the best assessment". Click the "Re-calculate grades" button. TEST: Make sure no coding exception is thrown. The reviewer does not get any grade for their zero-weighted assessment. As a teacher, provide additional assessment for the submission beside the one with zero grade. Keep the weight of this teacher's assessment higher than zero. Re-calculate the grades again. TEST: The grading grade (grade for assessment) for the assessment with the zero weight should now be calculated (and will probably be very low or zero).

      When executed, the Workshop grading evaluation plugin "Comparison with the best assessment" throws coding exception

      Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
       
      More information about this error
      Debug info: Argument 2 passed to workshop_best_evaluation::assessments_distance() must be an instance of stdClass, null given, called in [dirroot]/mod/workshop/eval/best/lib.php on line 175 and defined
      Error code: codingerror
      Stack trace:
       
          line 393 of /lib/setuplib.php: coding_exception thrown
          line 378 of /mod/workshop/eval/best/lib.php: call to default_error_handler()
          line 175 of /mod/workshop/eval/best/lib.php: call to workshop_best_evaluation->assessments_distance()
          line 100 of /mod/workshop/eval/best/lib.php: call to workshop_best_evaluation->process_assessments()
          line 54 of /mod/workshop/aggregate.php: call to workshop_best_evaluation->update_grading_grades()
      

      if all allocated assessments have zero weight.

      This has been kindly reported by Hiram Bollaert at https://moodle.org/mod/forum/discuss.php?d=242318

      Affects all Moodle 2.x versions.

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            Dan Poltawski Dan Poltawski
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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