Skip to content

Commit

Permalink
MDL-42818 assign: Add grading UI indicator about followup submission
Browse files Browse the repository at this point in the history
  • Loading branch information
zig-moodle committed Jun 19, 2018
1 parent 9e7c397 commit fcb7d2a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mod/assign/gradingtable.php
Expand Up @@ -1083,7 +1083,11 @@ public function col_status(stdClass $row) {
// Add status of "grading" if markflow is not enabled.
if (!$instance->markingworkflow) {
if ($row->grade !== null && $row->grade >= 0) {
$o .= $this->output->container(get_string('graded', 'assign'), 'submissiongraded');
if ($row->timemarked < $row->timesubmitted) {
$o .= $this->output->container(get_string('gradedfollowupsubmit', 'assign'), 'gradingreminder');
} else {
$o .= $this->output->container(get_string('graded', 'assign'), 'submissiongraded');
}
} else if (!$timesubmitted || $status == ASSIGN_SUBMISSION_STATUS_NEW) {
$now = time();
if ($due && ($now > $due)) {
Expand Down
1 change: 1 addition & 0 deletions mod/assign/lang/en/assign.php
Expand Up @@ -247,6 +247,7 @@
$string['filtersubmitted'] = 'Submitted';
$string['graded'] = 'Graded';
$string['gradedby'] = 'Graded by';
$string['gradedfollowupsubmit'] = 'Graded - follow up submission received';
$string['gradedon'] = 'Graded on';
$string['gradebelowzero'] = 'Grade must be greater than or equal to zero.';
$string['gradeabovemaximum'] = 'Grade must be less than or equal to {$a}.';
Expand Down
6 changes: 6 additions & 0 deletions mod/assign/styles.css
Expand Up @@ -118,6 +118,12 @@
background-color: #cfefcf;
}

.path-mod-assign td.gradingreminder,
.path-mod-assign div.gradingreminder {
color: black;
background-color: #efcfcf;
}

.path-mod-assign .gradingtable .c0 {
display: none;
}
Expand Down
33 changes: 33 additions & 0 deletions mod/assign/tests/behat/grading_status.feature
Expand Up @@ -150,3 +150,36 @@ Feature: View the grading status of an assignment
And I should see "Graded" in the "Grading status" "table_row"
And I should see "Great job! Lol, not really."
And I log out
# Student makes a subsequent submission.
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I press "Edit submission"
And I set the following fields to these values:
| Online text | I'm the student's second submission |
And I press "Save changes"
And I log out
# Teacher marks the submission again after noticing the 'Graded - follow up submission received'.
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
And I should see "Graded - follow up submission received" in the "Student 1" "table_row"
And I wait "10" seconds
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "99.99"
And I set the field "Feedback comments" to "Even better job! Really."
And I press "Save changes"
And I press "Ok"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
And I should see "Graded" in the "Student 1" "table_row"
And I log out
# View the grading status as a student again.
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should see "Graded" in the "Grading status" "table_row"
And I should see "Even better job! Really."
And I log out

0 comments on commit fcb7d2a

Please sign in to comment.