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;
}
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.