Moodle
  1. Moodle
  2. MDL-30033

no feedback in quiz review when grade is negative (using CBM)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Quiz
    • Labels:
    • Environment:
      any
    • Testing Instructions:
      Hide

      1. Create a quiz set to Deferred feedback with CBM behaviour, and some overall feedback, for example Feedback: Good; Grade boundary 50%; Feedback: Bad.
      2. Add one question, a T/F question with right-answer true.
      3. Attempt the quiz as a student. Give the answer false, and say that you are very sure you are right.
      4. Submit all and finish. You should get a score of -2 for the question, so the overall attempt score should also be negative.
      5. Verify that the Overall feedback is displayed at the top of the review page, and also on the view.php page when you click finish review.
      6. Log in as teacher, and verify that the overall feedback is also shown in the Responses report.

      Show
      1. Create a quiz set to Deferred feedback with CBM behaviour, and some overall feedback, for example Feedback: Good; Grade boundary 50%; Feedback: Bad. 2. Add one question, a T/F question with right-answer true. 3. Attempt the quiz as a student. Give the answer false, and say that you are very sure you are right. 4. Submit all and finish. You should get a score of -2 for the question, so the overall attempt score should also be negative. 5. Verify that the Overall feedback is displayed at the top of the review page, and also on the view.php page when you click finish review. 6. Log in as teacher, and verify that the overall feedback is also shown in the Responses report.
    • Workaround:
      Hide

      in /mod/quiz/locallib.php (line 346) I added the following hack:

      function quiz_feedback_for_grade($grade, $quiz, $context) {
      global $DB;

      if (is_null($grade))

      { return ''; }

      /*****

      • hack
      • set $grade to 0 if $grade is negative so that students with a negative grade do get feedback
        *****/
        $grade = max(0, $grade);
        /*****
      • end hack
        *****/

      This however, does not enable a specific feedback for negative grades

      Show
      in /mod/quiz/locallib.php (line 346) I added the following hack: function quiz_feedback_for_grade($grade, $quiz, $context) { global $DB; if (is_null($grade)) { return ''; } /***** hack set $grade to 0 if $grade is negative so that students with a negative grade do get feedback *****/ $grade = max(0, $grade); /***** end hack *****/ This however, does not enable a specific feedback for negative grades
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      19575

      Description

      When using CBM it is possible to get a negative grade. As you can't define negative grade ranges for feedback no feedback is displayed at all when a student gets a negative grade.
      In my opinion this is a serious bug. Students that get a negative grade really, really, really need some explanation.

        Activity

        Hide
        Tim Hunt added a comment -

        I think my intention was that the overall quiz grade should be limited so that it cannot go below zero. However, it was not implemented that way.

        The Moodle gradebook is incapable of storing negative grades, so that is an argument for clamping the minimum quiz grade to 0.

        Show
        Tim Hunt added a comment - I think my intention was that the overall quiz grade should be limited so that it cannot go below zero. However, it was not implemented that way. The Moodle gradebook is incapable of storing negative grades, so that is an argument for clamping the minimum quiz grade to 0.
        Hide
        Michiel Boerman added a comment -

        I have no serious objections against negative grades. A bit impractical perhaps but I see some educational value here. As in: Short sharp shock. However, I suppose it would be more conventional to just normalize any negative grade to zero.

        Show
        Michiel Boerman added a comment - I have no serious objections against negative grades. A bit impractical perhaps but I see some educational value here. As in: Short sharp shock. However, I suppose it would be more conventional to just normalize any negative grade to zero.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
        Hide
        Adrian Greeve added a comment -

        I tried this out in both 2.1 and 2.3. The feedback is now displayed for both the student and the teacher.
        Test passed.

        Show
        Adrian Greeve added a comment - I tried this out in both 2.1 and 2.3. The feedback is now displayed for both the student and the teacher. Test passed.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.

        Nah, joking, many thanks! Closing this a fixed, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many. Nah, joking, many thanks! Closing this a fixed, ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: