Moodle

Cannot clear override flag on grades with feedback

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.3
  • Fix Version/s: 2.0.8
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

To reproduce:

-In the grader report, turn editing on and turn quick feedback on.
-Enter some feedback and click update. Note that the grade is now overridden.
-Click the edit icon above the grade, clear the overridden flag, and save changes. Note that the grade still shows as overridden and the feedback is now surrounded by paragraph tags.
-Click the edit icon again, clear the overridden flag again, and save. Note that the override appears to be cleared now.
-Enter a grade in any other cell and click update. Note that the grade that was previously cleared is now overridden once again.

The only way I've found to really clear the overridden flag is to completely clear the feedback. It is sometimes necessary to go to html source view in the feedback editor and clear any html that might be left behind after the text is removed.

Issue Links

Activity

Hide
Ann Adamcik added a comment -

One more symptom that seems to be related:

-Go into the assignment grading interface and enter feedback that contains a list or a table.
-Go to the gradebook, change a grade in some other activity, and click update. Note that the assignment grade is now overridden.

Show
Ann Adamcik added a comment - One more symptom that seems to be related: -Go into the assignment grading interface and enter feedback that contains a list or a table. -Go to the gradebook, change a grade in some other activity, and click update. Note that the assignment grade is now overridden.
Hide
Petr Škoda (skodak) added a comment -

Yes, this is intentional. Solution is to internally move all grading from assignment into new gradebook plugin. Unfortunately this can not be done in 1.9.x branch.

Show
Petr Škoda (skodak) added a comment - Yes, this is intentional. Solution is to internally move all grading from assignment into new gradebook plugin. Unfortunately this can not be done in 1.9.x branch.
Hide
Petr Škoda (skodak) added a comment -

resolving as duplicate, you can track progress in linked bug, thanks

Show
Petr Škoda (skodak) added a comment - resolving as duplicate, you can track progress in linked bug, thanks
Hide
Enrique Castro added a comment - - edited

Reopening to try a second thought for 1.9 branch.

In 1.9 manual marking at gradebook level (and thus overrridding) is an exceptional measure, activities should be marked at moduel level. But such overridding occurs sometimes. A clear pathway to REVERT overridding and return to module-set grade is needed.

This bug appears by a very strict condition in code requiring that feedback MUST be exactly equal between two copies. The code is in script /grade/edit/tree/grade.php, by line 187

        if (!grade_floats_different($data->finalgrade, $old_grade_grade->finalgrade)
          and $data->feedback === $old_grade_grade->feedback) {
            // change overridden flag only if grade or feedback not changed
            if (!isset($data->overridden)) {
                $data->overridden = 0; // checkbox
            }
            $grade_grade->set_overridden($data->overridden);
        }

But I do not see the reason to ONLY reset overrridden in that conditions, with grade-value and feedback identical. Actually, if the teacher wants to de-overridde the grade is because module-set grade is OK. There is no need for the checking, in my opinion.

Simply eliminating the finalgrade and feedback check for equality will eliminate the bug and allow smooth behavior for the teacher. The call to force_regrading() later in the script will ensure that the grade and feedback will be re-copied from the module instance.

Thus, code simpler and more functional.

Show
Enrique Castro added a comment - - edited Reopening to try a second thought for 1.9 branch. In 1.9 manual marking at gradebook level (and thus overrridding) is an exceptional measure, activities should be marked at moduel level. But such overridding occurs sometimes. A clear pathway to REVERT overridding and return to module-set grade is needed. This bug appears by a very strict condition in code requiring that feedback MUST be exactly equal between two copies. The code is in script /grade/edit/tree/grade.php, by line 187
        if (!grade_floats_different($data->finalgrade, $old_grade_grade->finalgrade)
          and $data->feedback === $old_grade_grade->feedback) {
            // change overridden flag only if grade or feedback not changed
            if (!isset($data->overridden)) {
                $data->overridden = 0; // checkbox
            }
            $grade_grade->set_overridden($data->overridden);
        }
But I do not see the reason to ONLY reset overrridden in that conditions, with grade-value and feedback identical. Actually, if the teacher wants to de-overridde the grade is because module-set grade is OK. There is no need for the checking, in my opinion. Simply eliminating the finalgrade and feedback check for equality will eliminate the bug and allow smooth behavior for the teacher. The call to force_regrading() later in the script will ensure that the grade and feedback will be re-copied from the module instance. Thus, code simpler and more functional.
Hide
Andrew Davis added a comment -

There appears to still be some feedback/override related oddness in Moodle 2.2 similar to that described in this issue report.

Show
Andrew Davis added a comment - There appears to still be some feedback/override related oddness in Moodle 2.2 similar to that described in this issue report.
Hide
Andrew Davis added a comment - - edited

This is definitely a problem as of 2.2. If the activity provides multiline feedback the quick feedback text box compresses it down to a single line. The html editor on the grade edit page produces multiline text. When you override the grade on the grader report your feedback gets saved as a single line. When you go to the grade edit page to turn off the override the editor appears to split it out to multiple lines. This makes it look like the feedback has changed preventing you from turning off "override".

the first string is coming from the grade edit form. The second is from the database. New lines have been removed from the second one so they don't match even they that are functionally equivalent.

string(55) "<p>this is html feedback</p>
<p>and its multiline.</p>"
string(53) "<p>this is html feedback</p><p>and its multiline.</p>"
Show
Andrew Davis added a comment - - edited This is definitely a problem as of 2.2. If the activity provides multiline feedback the quick feedback text box compresses it down to a single line. The html editor on the grade edit page produces multiline text. When you override the grade on the grader report your feedback gets saved as a single line. When you go to the grade edit page to turn off the override the editor appears to split it out to multiple lines. This makes it look like the feedback has changed preventing you from turning off "override". the first string is coming from the grade edit form. The second is from the database. New lines have been removed from the second one so they don't match even they that are functionally equivalent.
string(55) "<p>this is html feedback</p>
<p>and its multiline.</p>"
string(53) "<p>this is html feedback</p><p>and its multiline.</p>"

People

Vote (6)
Watch (5)

Dates

  • Created:
    Updated: