Moodle

Assignment Grade feedback not displaying properly when grade is overridden.

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.9, 1.9.1
  • Fix Version/s: 2.0.8
  • Labels:
    None
  • Environment:
    VMWare ESX, LAMP (SLES 10SP1),Apache/2.2.6 (Unix), mysql Ver 14.12 Distrib 5.0.37, PHP 5.2.4
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Assignment Grade feedback not displaying properly when grade is overridden. To reproduce, in the Assignment Module, leave a students grade to "overridden" and go and view the assignment feedback, the editor will not show up and depending on how long the feedback is, it will go over the "save, save changes, cancel" button bar.

Issue Links

Activity

Hide
Rahim Virani added a comment -

This creates a larger issue, the student cannot view their feedback with a valid grade, in addition cannot view their grade with a readable feedback.

Show
Rahim Virani added a comment - This creates a larger issue, the student cannot view their feedback with a valid grade, in addition cannot view their grade with a readable feedback.
Hide
Paul Grzesina added a comment -

I was able to patch this up to my satisfaction by modifying lib.php and styles.php in mod/assignments. We use svn internally for development, so the following patches might not work for the CVS source. You may not want to change the definition for disabled, but in our environment it really makes no sense.

Index: lib.php
===================================================================
— lib.php (revision 100)
+++ lib.php (working copy)
@@ -795,7 +795,10 @@
}

$grading_info = grade_get_grades($this->course->id, 'mod', 'assignment', $this->assignment->id, array($user->id));

  • $disabled = $grading_info->items[0]->grades[$userid]>locked || $grading_info>items[0]->grades[$userid]->overridden;
    + // There's no good reason why an overridden grade shouldn't be editable
    + // for an assignment.
    + // $disabled = $grading_info->items[0]->grades[$userid]>locked || $grading_info>items[0]->grades[$userid]->overridden;
    + $disabled = $grading_info->items[0]->grades[$userid]->locked;

/// construct SQL, using current offset to find the data of the next student
$course = $this->course;
@@ -937,15 +940,19 @@

$lastmailinfo = get_user_preferences('assignment_mailinfo', 1) ? 'checked="checked"' : '';

  • ///Print Buttons in Single View
  • echo '<input type="hidden" name="mailinfo" value="0" />';
  • echo '<input type="checkbox" id="mailinfo" name="mailinfo" value="1" '.$lastmailinfo.' /><label for="mailinfo">'.get_string('enableemailnotification','assignment').'</label>';
  • echo '<div class="buttons">';
  • echo '<input type="submit" name="submit" value="'.get_string('savechanges').'" onclick = "document.getElementById(\'submitform\').menuindex.value = document.getElementById(\'submitform\').grade.selectedIndex" />';
  • echo '<input type="submit" name="cancel" value="'.get_string('cancel').'" />';
    + if (!$disabled) { + ///Print Buttons in Single View + echo '<input type="hidden" name="mailinfo" value="0" />'; + echo '<input type="checkbox" id="mailinfo" name="mailinfo" value="1" '.$lastmailinfo.' /><label for="mailinfo">'.get_string('enableemailnotification','assignment').'</label>'; + echo '<div class="buttons">'; + echo '<input type="submit" name="submit" value="'.get_string('savechanges').'" onclick = "document.getElementById(\'submitform\').menuindex.value = document.getElementById(\'submitform\').grade.selectedIndex" />'; + echo '<input type="submit" name="cancel" value="'.get_string('cancel').'" />'; + }
    //if there are more to be graded.
    if ($nextid) {
  • echo '<input type="submit" name="saveandnext" value="'.get_string('saveandnext').'" onclick="saveNext()" />';
    + if (!$disabled) { + echo '<input type="submit" name="saveandnext" value="'.get_string('saveandnext').'" onclick="saveNext()" />'; + }
    echo '<input type="submit" name="next" value="'.get_string('next').'" onclick="setNext();" />';
    }
    echo '</div>';

Index: styles.php
===================================================================
— styles.php (revision 100)
+++ styles.php (working copy)
@@ -26,11 +26,15 @@
float: right;
}

-.mod-assignment .feedback .disabledfeedback {
+.mod-assignment .feedback { width: 500px; height: 250px; }

+.mod-assignment .disabledfeedback { + width: 500px; +}
+
.mod-assignment .feedback .from { float: left; }

Show
Paul Grzesina added a comment - I was able to patch this up to my satisfaction by modifying lib.php and styles.php in mod/assignments. We use svn internally for development, so the following patches might not work for the CVS source. You may not want to change the definition for disabled, but in our environment it really makes no sense. Index: lib.php =================================================================== — lib.php (revision 100) +++ lib.php (working copy) @@ -795,7 +795,10 @@ } $grading_info = grade_get_grades($this->course->id, 'mod', 'assignment', $this->assignment->id, array($user->id));
  • $disabled = $grading_info->items[0]->grades[$userid]>locked || $grading_info>items[0]->grades[$userid]->overridden; + // There's no good reason why an overridden grade shouldn't be editable + // for an assignment. + // $disabled = $grading_info->items[0]->grades[$userid]>locked || $grading_info>items[0]->grades[$userid]->overridden; + $disabled = $grading_info->items[0]->grades[$userid]->locked;
/// construct SQL, using current offset to find the data of the next student $course = $this->course; @@ -937,15 +940,19 @@ $lastmailinfo = get_user_preferences('assignment_mailinfo', 1) ? 'checked="checked"' : '';
  • ///Print Buttons in Single View
  • echo '<input type="hidden" name="mailinfo" value="0" />';
  • echo '<input type="checkbox" id="mailinfo" name="mailinfo" value="1" '.$lastmailinfo.' /><label for="mailinfo">'.get_string('enableemailnotification','assignment').'</label>';
  • echo '<div class="buttons">';
  • echo '<input type="submit" name="submit" value="'.get_string('savechanges').'" onclick = "document.getElementById(\'submitform\').menuindex.value = document.getElementById(\'submitform\').grade.selectedIndex" />';
  • echo '<input type="submit" name="cancel" value="'.get_string('cancel').'" />'; + if (!$disabled) { + ///Print Buttons in Single View + echo '<input type="hidden" name="mailinfo" value="0" />'; + echo '<input type="checkbox" id="mailinfo" name="mailinfo" value="1" '.$lastmailinfo.' /><label for="mailinfo">'.get_string('enableemailnotification','assignment').'</label>'; + echo '<div class="buttons">'; + echo '<input type="submit" name="submit" value="'.get_string('savechanges').'" onclick = "document.getElementById(\'submitform\').menuindex.value = document.getElementById(\'submitform\').grade.selectedIndex" />'; + echo '<input type="submit" name="cancel" value="'.get_string('cancel').'" />'; + } //if there are more to be graded. if ($nextid) {
  • echo '<input type="submit" name="saveandnext" value="'.get_string('saveandnext').'" onclick="saveNext()" />'; + if (!$disabled) { + echo '<input type="submit" name="saveandnext" value="'.get_string('saveandnext').'" onclick="saveNext()" />'; + } echo '<input type="submit" name="next" value="'.get_string('next').'" onclick="setNext();" />'; } echo '</div>';
Index: styles.php =================================================================== — styles.php (revision 100) +++ styles.php (working copy) @@ -26,11 +26,15 @@ float: right; } -.mod-assignment .feedback .disabledfeedback { +.mod-assignment .feedback { width: 500px; height: 250px; } +.mod-assignment .disabledfeedback { + width: 500px; +} + .mod-assignment .feedback .from { float: left; }
Hide
Martin Dougiamas added a comment -

Nicolas can you please look at this?

Show
Martin Dougiamas added a comment - Nicolas can you please look at this?
Hide
Susan Hussein added a comment -

Shows how some users have the problem, others don't. Looks as if a change of the "permit quick grading" feature did not take for everybody.

Show
Susan Hussein added a comment - Shows how some users have the problem, others don't. Looks as if a change of the "permit quick grading" feature did not take for everybody.
Hide
Petr Škoda (skodak) added a comment -

yas, this is a know issue - the assignment grading and gradebook integration will have to be completely rewritten, sorry

Show
Petr Škoda (skodak) added a comment - yas, this is a know issue - the assignment grading and gradebook integration will have to be completely rewritten, sorry
Hide
Justin Elkins added a comment -

For those that are needing at least a fix for the design of the page after it breaks, you can apply a simple fix to your css file that will change a style that is causing the crushed look. Within your css file, you will need to place the following declaration:

.disabledfeedback {
height:auto;
}

Hope this helps. Let me know if you find a problem with it

Show
Justin Elkins added a comment - For those that are needing at least a fix for the design of the page after it breaks, you can apply a simple fix to your css file that will change a style that is causing the crushed look. Within your css file, you will need to place the following declaration: .disabledfeedback { height:auto; } Hope this helps. Let me know if you find a problem with it
Hide
Justin Elkins added a comment -

Small update to the fix I presented. As the styles within the theme tend to override the fix, you may want to add !important to the end of the height:auto declaration as so:

.disabledfeedback { height:auto !important; }

Happy bug patching

Show
Justin Elkins added a comment - Small update to the fix I presented. As the styles within the theme tend to override the fix, you may want to add !important to the end of the height:auto declaration as so: .disabledfeedback { height:auto !important; } Happy bug patching

Dates

  • Created:
    Updated: