diff --git a/classes/tables/srsstatus.php b/classes/tables/srsstatus.php index deacd60..eaefac7 100644 --- a/classes/tables/srsstatus.php +++ b/classes/tables/srsstatus.php @@ -189,13 +189,20 @@ protected function col_solentgrade($row) { return 'Unmarked'; } // Grades are saved as decimals. - $gradeint = (int)$row->solentgrade; - if ($gradeint == -1) { - return 'Unmarked'; + $grade = $row->solentgrade; + if ($grade == -1) { + return get_string('unmarked', 'report_grade'); } - if (isset($this->scale->items[$gradeint - 1])) { - return $this->scale->items[$gradeint - 1]; + $gradetype = $this->gradeitem->gradetype; + if ($gradetype == GRADE_TYPE_SCALE) { + $gradeint = (int)$grade; + if (isset($this->scale->items[$gradeint - 1])) { + return $this->scale->items[$gradeint - 1]; + } + } else if ($gradetype == GRADE_TYPE_VALUE) { + return $grade . ' / ' . (int)$this->gradeitem->grademax; } + return get_string('scaleitemnotfound', 'report_grade'); } diff --git a/index.php b/index.php index dd013b0..dddb777 100644 --- a/index.php +++ b/index.php @@ -165,10 +165,10 @@ if ($confdouble[$k]->name == "enabled" && $confdouble[$k]->value == 1) { if (!empty($userdoublemarks)) { $row->cells[] = new html_table_cell( - report_grade_convert_grade_report($userdoublemarks['scale'], $userdoublemarks['first'], $v->cmid) + report_grade_convert_grade_report($userdoublemarks['scale'], $userdoublemarks['first']) ); $row->cells[] = new html_table_cell( - report_grade_convert_grade_report($userdoublemarks['scale'], $userdoublemarks['second'], $v->cmid) + report_grade_convert_grade_report($userdoublemarks['scale'], $userdoublemarks['second']) ); } else { $row->cells[] = new html_table_cell(); diff --git a/lang/en/report_grade.php b/lang/en/report_grade.php index baa3bbb..46feeea 100644 --- a/lang/en/report_grade.php +++ b/lang/en/report_grade.php @@ -79,3 +79,5 @@ $string['timeprocessed'] = 'Time processed'; $string['timequeued'] = 'Time queued'; + +$string['unmarked'] = 'Unmarked'; diff --git a/locallib.php b/locallib.php index 7186d34..b6274d5 100644 --- a/locallib.php +++ b/locallib.php @@ -32,91 +32,10 @@ * * @param int $scaleid * @param int $grade - * @param int $cmid Course module id * @return string */ -function report_grade_convert_grade_report($scaleid, $grade, $cmid) { - $issitsassign = \local_solsits\helper::is_sits_assignment($cmid); - $grademarkscale = $issitsassign ? - get_config('local_solsits', 'grademarkscale') : - get_config('local_quercus_tasks', 'grademarkscale'); - $grademarkexemptscale = $issitsassign ? - get_config('local_solsits', 'grademarkexemptscale') : - get_config('local_quercus_tasks', 'grademarkexemptscale'); - if ($scaleid == $grademarkscale) { // Solent gradescale. - $converted = -1; - switch ($grade){ - case 18: - $converted = 'A1'; - break; - case 17: - $converted = 'A2'; - break; - case 16: - $converted = 'A3'; - break; - case 15: - $converted = 'A4'; - break; - case 14: - $converted = 'B1'; - break; - case 13: - $converted = 'B2'; - break; - case 12: - $converted = 'B3'; - break; - case 11: - $converted = 'C1'; - break; - case 10: - $converted = 'C2'; - break; - case 9: - $converted = 'C3'; - break; - case 8: - $converted = 'D1'; - break; - case 7: - $converted = 'D2'; - break; - case 6: - $converted = 'D3'; - break; - case 5: - $converted = 'F1'; - break; - case 4: - $converted = 'F2'; - break; - case 3: - $converted = 'F3'; - break; - case 2: - $converted = 'S'; - break; - case 1: - $converted = 'N'; - break; - case null: - $converted = 'N'; - break; - case -1: - $converted = ''; - break; - case '-': - $converted = ''; - break; - } - } else if ($scaleid == $grademarkexemptscale) { - if ($grade == null || $grade == -1) { - $converted = ''; - } else { - $converted = (int)unformat_float($grade) - 1; - } - } +function report_grade_convert_grade_report($scaleid, $grade) { + $converted = \local_solsits\helper::convert_grade($scaleid, $grade); return $converted; } @@ -132,8 +51,9 @@ function report_grade_get_doublemarks($doublemarks, $iteminstance, $userid) { $return = []; foreach ($doublemarks as $doublemark) { if ($doublemark->userid == $userid && $iteminstance == $doublemark->assignment) { + $scale = $doublemark->scale < 0 ? ltrim($doublemark->scale, '-') : 0; $return = [ - "scale" => ltrim($doublemark->scale, '-'), + "scale" => $scale, "first" => $doublemark->first_grade, "second" => $doublemark->second_grade, ]; @@ -155,7 +75,7 @@ function report_grade_get_sample($samples, $iteminstance, $userid) { foreach ($samples as $sample) { if ($sample->userid == $userid && $iteminstance == $sample->assignment) { if ($sample->sample == 1) { - $return = 'Yes'; + $return = get_string('yes'); } } } diff --git a/tests/behat/viewsrsstatus.feature b/tests/behat/viewsrsstatus.feature index 0cd3e18..768a592 100644 --- a/tests/behat/viewsrsstatus.feature +++ b/tests/behat/viewsrsstatus.feature @@ -21,44 +21,6 @@ Feature: See the status of grades uploaded to Student Records | cutoffinterval | 1 | local_quercus_tasks | | cutoffintervalsecondplus | 1 | local_quercus_tasks | | gradingdueinterval | 2 | local_quercus_tasks | - And the following SITS assignment exists: - | sitsref | ABC101_A_SEM1_2023/24_ABC10101_001_0 | - | course | ABC101_A_SEM1_2023/24 | - | title | Report 1 (25%) | - | weighting | 25 | - | duedate | ## 5 May 2023 16:00:00 ## | - | assessmentcode | ABC10101 | - | assessmentname | Report 1 | - | sequence | 001 | - | availablefrom | 0 | - | reattempt | 0 | - | grademarkexempt | 0 | - And the following SITS assignment exists: - | sitsref | ABC101_A_SEM1_2023/24_ABC10101_002_0 | - | course | ABC101_A_SEM1_2023/24 | - | title | Report 2 (25%) | - | weighting | 25 | - | duedate | ## 2 June 2023 16:00:00 ## | - | assessmentcode | ABC10101 | - | assessmentname | Report 2 | - | sequence | 001 | - | availablefrom | ## 2 June 2023 09:00:00 ## | - | reattempt | 0 | - | grademarkexempt | 1 | - And the following Quercus assignment exists: - | course | ABC101_123456789 | - | weighting | .25 | - | assessmentCode | Report1 | - | assessmentDescription | Report 1 | - | dueDate | ## 5 May 2023 16:00:00 ## | - | academicYear | 2022 | - And the following Quercus assignment exists: - | course | ABC101_123456789 | - | weighting | .25 | - | assessmentCode | Report2 | - | assessmentDescription | Report 2 | - | dueDate | ## 6 June 2023 16:00:00 ## | - | academicYear | 2022 | And the following "roles" exist: | shortname | name | archetype | | moduleleader | Module leader | editingteacher | @@ -105,6 +67,32 @@ Feature: See the status of grades uploaded to Student Records | student0 | ABC101_123456789 | student | | teacher1 | ABC101_123456789 | editingteacher | | moduleleader1 | ABC101_123456789 | moduleleader | + + Scenario: SITS Assignments are listed in srs status page, but no grades have been released + Given the following SITS assignment exists: + | sitsref | ABC101_A_SEM1_2023/24_ABC10101_001_0 | + | course | ABC101_A_SEM1_2023/24 | + | title | Report 1 (25%) | + | weighting | 25 | + | duedate | ## 5 May 2023 16:00:00 ## | + | assessmentcode | ABC10101 | + | assessmentname | Report 1 | + | sequence | 001 | + | availablefrom | 0 | + | reattempt | 0 | + | grademarkexempt | 0 | + And the following SITS assignment exists: + | sitsref | ABC101_A_SEM1_2023/24_ABC10101_002_0 | + | course | ABC101_A_SEM1_2023/24 | + | title | Report 2 (25%) | + | weighting | 25 | + | duedate | ## 2 June 2023 16:00:00 ## | + | assessmentcode | ABC10101 | + | assessmentname | Report 2 | + | sequence | 001 | + | availablefrom | ## 2 June 2023 09:00:00 ## | + | reattempt | 0 | + | grademarkexempt | 1 | And the following "mod_assign > submissions" exist: | assign | user | onlinetext | # SITS. @@ -127,26 +115,6 @@ Feature: See the status of grades uploaded to Student Records | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student7 | I'm the student 7 second submission | | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student8 | I'm the student 8 second submission | | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student9 | I'm the student 9 second submission | - # Quercus. - | 2022_Report1 | student1 | I'm the student 1 first submission | - | 2022_Report1 | student2 | I'm the student 2 first submission | - | 2022_Report1 | student3 | I'm the student 3 first submission | - | 2022_Report1 | student4 | I'm the student 4 first submission | - | 2022_Report1 | student5 | I'm the student 5 first submission | - | 2022_Report1 | student6 | I'm the student 6 first submission | - | 2022_Report1 | student7 | I'm the student 7 first submission | - | 2022_Report1 | student8 | I'm the student 8 first submission | - | 2022_Report1 | student9 | I'm the student 9 first submission | - # student0 makes no submission, and will not be marked. - | 2022_Report2 | student1 | I'm the student 1 second submission | - | 2022_Report2 | student2 | I'm the student 2 second submission | - | 2022_Report2 | student3 | I'm the student 3 second submission | - | 2022_Report2 | student4 | I'm the student 4 second submission | - | 2022_Report2 | student5 | I'm the student 5 second submission | - | 2022_Report2 | student6 | I'm the student 6 second submission | - | 2022_Report2 | student7 | I'm the student 7 second submission | - | 2022_Report2 | student8 | I'm the student 8 second submission | - | 2022_Report2 | student9 | I'm the student 9 second submission | # Double mark the SITS assignments. And I am on the "ABC101_A_SEM1_2023/24_ABC10101_001_0" "assign activity" page logged in as teacher1 And I follow "View all submissions" @@ -245,8 +213,68 @@ Feature: See the status of grades uploaded to Student Records And I set the field "Agreed grade" to "B3" And I set the field "Marking workflow state" to "Marking complete" And I press "Save changes" - # Double mark the Quercus assignments. - And I am on the "2022_Report1" "assign activity" page logged in as teacher1 + + And I log in as "teacher1" + And I am on the "ABC101_A_SEM1_2023/24" "report_grade > Grade report" page + When I follow "Marks upload status" + Then I should see "Report 1 (25%)" in the ".marksupload-assignment-list" "css_element" + And I should see "Report 2 (25%)" in the ".marksupload-assignment-list" "css_element" + And I should see "Marks upload status for assignment \"Report 1 (25%)\"" + And I should see "No released grades to display" + When I click on "Report 2 (25%)" "link" in the ".marksupload-assignment-list" "css_element" + Then I should see "No released grades to display" + And I should see "Marks upload status for assignment \"Report 2 (25%)\"" + + Scenario: SITS assignment grades are released + Given the following SITS assignment exists: + | sitsref | ABC101_A_SEM1_2023/24_ABC10101_001_0 | + | course | ABC101_A_SEM1_2023/24 | + | title | Report 1 (25%) | + | weighting | 25 | + | duedate | ## 5 May 2023 16:00:00 ## | + | assessmentcode | ABC10101 | + | assessmentname | Report 1 | + | sequence | 001 | + | availablefrom | 0 | + | reattempt | 0 | + | grademarkexempt | 0 | + And the following SITS assignment exists: + | sitsref | ABC101_A_SEM1_2023/24_ABC10101_002_0 | + | course | ABC101_A_SEM1_2023/24 | + | title | Report 2 (25%) | + | weighting | 25 | + | duedate | ## 2 June 2023 16:00:00 ## | + | assessmentcode | ABC10101 | + | assessmentname | Report 2 | + | sequence | 001 | + | availablefrom | ## 2 June 2023 09:00:00 ## | + | reattempt | 0 | + | grademarkexempt | 1 | + | scale | points | + And the following "mod_assign > submissions" exist: + | assign | user | onlinetext | + # SITS. + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student1 | I'm the student 1 first submission | + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student2 | I'm the student 2 first submission | + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student3 | I'm the student 3 first submission | + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student4 | I'm the student 4 first submission | + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student5 | I'm the student 5 first submission | + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student6 | I'm the student 6 first submission | + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student7 | I'm the student 7 first submission | + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student8 | I'm the student 8 first submission | + | ABC101_A_SEM1_2023/24_ABC10101_001_0 | student9 | I'm the student 9 first submission | + # student0 makes no submission, and will not be marked. + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student1 | I'm the student 1 second submission | + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student2 | I'm the student 2 second submission | + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student3 | I'm the student 3 second submission | + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student4 | I'm the student 4 second submission | + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student5 | I'm the student 5 second submission | + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student6 | I'm the student 6 second submission | + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student7 | I'm the student 7 second submission | + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student8 | I'm the student 8 second submission | + | ABC101_A_SEM1_2023/24_ABC10101_002_0 | student9 | I'm the student 9 second submission | + # Double mark the SITS Grademark assignment. + And I am on the "ABC101_A_SEM1_2023/24_ABC10101_001_0" "assign activity" page logged in as teacher1 And I follow "View all submissions" Then I click on "Grade" "link" in the "12345671" "table_row" And I set the field "First grade" to "A1" @@ -254,7 +282,7 @@ Feature: See the status of grades uploaded to Student Records And I set the field "Feedback comments" to "Great job no. 1!" # Get inconsistent web service errors. Try waiting. And I wait until the page is ready - And I press "Save and show next" + And I press "Save changes" And I set the field "First grade" to "B2" And I set the field "Marking workflow state" to "In marking" And I set the field "Feedback comments" to "Great job no. 2!" @@ -295,7 +323,7 @@ Feature: See the status of grades uploaded to Student Records And I set the field "Feedback comments" to "Great job no. 9!" And I press "Save changes" # Module leader now marks and agrees final grade. - And I am on the "2022_Report1" "assign activity" page logged in as moduleleader1 + And I am on the "ABC101_A_SEM1_2023/24_ABC10101_001_0" "assign activity" page logged in as moduleleader1 And I follow "View all submissions" Then I click on "Grade" "link" in the "12345671" "table_row" And I set the field "Second grade" to "A1" @@ -343,31 +371,119 @@ Feature: See the status of grades uploaded to Student Records And I set the field "Agreed grade" to "B3" And I set the field "Marking workflow state" to "Marking complete" And I press "Save changes" + # Release the assignments. + And I am on the "ABC101_A_SEM1_2023/24_ABC10101_001_0" "assign activity" page logged in as moduleleader1 + And I follow "View all submissions" + # Reveal identities before releasing seems to work rather than the other way around. + And I select "Reveal student identities" from the "Grading action" singleselect + And I press "Continue" + And I set the field "selectall" to "1" + And I set the field "operation" to "Set marking workflow state" + And I click on "Go" "button" confirming the dialogue + And I set the field "Marking workflow state" to "Released" + And I set the field "Notify student" to "No" + And I press "Save changes" - Scenario: Assignments are listed in srs status page, but no grades have been released - Given I log in as "teacher1" - And I am on the "ABC101_A_SEM1_2023/24" "report_grade > Grade report" page - When I follow "Marks upload status" - Then I should see "Report 1 (25%)" in the ".marksupload-assignment-list" "css_element" - And I should see "Report 2 (25%)" in the ".marksupload-assignment-list" "css_element" - And I should see "Marks upload status for assignment \"Report 1 (25%)\"" - And I should see "No released grades to display" - When I click on "Report 2 (25%)" "link" in the ".marksupload-assignment-list" "css_element" - Then I should see "No released grades to display" - And I should see "Marks upload status for assignment \"Report 2 (25%)\"" - And I am on the "ABC101_123456789" "report_grade > Grade report" page - When I follow "Marks upload status" - Then I should see "Report 1 (25%)" in the ".marksupload-assignment-list" "css_element" - And I should see "Report 2 (25%)" in the ".marksupload-assignment-list" "css_element" - And I should see "Marks upload status for assignment \"Report 1 (25%)\"" - And I should see "No released grades to display" - When I click on "Report 2 (25%)" "link" in the ".marksupload-assignment-list" "css_element" - Then I should see "No released grades to display" - And I should see "Marks upload status for assignment \"Report 2 (25%)\"" - - Scenario: SITS assignment grades are released + # Double mark the Points assignment + And I am on the "ABC101_A_SEM1_2023/24_ABC10101_002_0" "assign activity" page logged in as teacher1 + And I follow "View all submissions" + Then I click on "Grade" "link" in the "12345671" "table_row" + And I set the field "First grade" to "100" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 1!" + # Get inconsistent web service errors. Try waiting. + And I wait until the page is ready + And I press "Save changes" + And I set the field "First grade" to "65" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 2!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "52" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 3!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "48" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 4!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "20" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 5!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "1" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 6!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "0" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 7!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "92" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 8!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "62" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 9!" + And I press "Save changes" + # Module leader now marks and agrees final grade. + And I am on the "ABC101_A_SEM1_2023/24_ABC10101_002_0" "assign activity" page logged in as moduleleader1 + And I follow "View all submissions" + Then I click on "Grade" "link" in the "12345671" "table_row" + And I set the field "Second grade" to "100" + And I set the field "Agreed grade" to "100" + And I set the field "Marking workflow state" to "Marking complete" + # Get inconsistent web service errors. Try waiting. + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "65" + And I set the field "Agreed grade" to "65" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "48" + And I set the field "Agreed grade" to "48.9" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "48" + And I set the field "Agreed grade" to "48.3" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "48" + And I set the field "Agreed grade" to "48.5" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "1" + And I set the field "Agreed grade" to "1" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "0" + And I set the field "Agreed grade" to "0" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "92" + And I set the field "Agreed grade" to "92" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "62" + And I set the field "Agreed grade" to "62" + And I set the field "Marking workflow state" to "Marking complete" + And I press "Save changes" # Release the assignments. - Given I am on the "ABC101_A_SEM1_2023/24_ABC10101_001_0" "assign activity" page logged in as moduleleader1 + And I am on the "ABC101_A_SEM1_2023/24_ABC10101_002_0" "assign activity" page logged in as moduleleader1 And I follow "View all submissions" # Reveal identities before releasing seems to work rather than the other way around. And I select "Reveal student identities" from the "Grading action" singleselect @@ -378,6 +494,7 @@ Feature: See the status of grades uploaded to Student Records And I set the field "Marking workflow state" to "Released" And I set the field "Notify student" to "No" And I press "Save changes" + And I log in as "admin" # Run the task to queue the grades for export. And I run the scheduled task "\local_solsits\task\get_new_grades_task" @@ -399,7 +516,18 @@ Feature: See the status of grades uploaded to Student Records | Student 9 | B3 | 62 | | | | Student 0 | Unmarked | 0 | | | When I click on "Report 2 (25%)" "link" in the ".marksupload-assignment-list" "css_element" - Then I should see "No released grades to display" + And the following should exist in the "report_grade-srs_status" table: + | First name / Last name | Solent grade | Converted grade | Status | Error report | + | Student 1 | 100.00000 / 100 | 100 | | | + | Student 2 | 65.00000 / 100 | 65 | | | + | Student 3 | 48.90000 / 100 | 49 | | | + | Student 4 | 48.30000 / 100 | 48 | | | + | Student 5 | 48.50000 / 100 | 49 | | | + | Student 6 | 1.00000 / 100 | 1 | | | + | Student 7 | 0.00000 / 100 | 0 | | | + | Student 8 | 92.00000 / 100 | 92 | | | + | Student 9 | 62.00000 / 100 | 62 | | | + | Student 0 | Unmarked | 0 | | | And I should see "Marks upload status for assignment \"Report 2 (25%)\"" # Use this in place of running the export grades task as there's no connection. And the following SITS grades are stored for "ABC101_A_SEM1_2023/24_ABC10101_001_0": @@ -429,9 +557,288 @@ Feature: See the status of grades uploaded to Student Records | Student 9 | B3 | 62 | SUCCESS | | | Student 0 | Unmarked | 0 | SUCCESS | | - Scenario: Quercus assignment grades are released - # Release the assignments. - Given I am on the "2022_Report1" "assign activity" page logged in as moduleleader1 + Scenario: Quercus Assignments are listed in srs status page, but no grades have been released + Given the following Quercus assignment exists: + | course | ABC101_123456789 | + | weighting | .25 | + | assessmentCode | Report1 | + | assessmentDescription | Report 1 | + | dueDate | ## 5 May 2023 16:00:00 ## | + | academicYear | 2022 | + And the following Quercus assignment exists: + | course | ABC101_123456789 | + | weighting | .25 | + | assessmentCode | Report2 | + | assessmentDescription | Report 2 | + | dueDate | ## 6 June 2023 16:00:00 ## | + | academicYear | 2022 | + And the following "mod_assign > submissions" exist: + | assign | user | onlinetext | + # Quercus. + | 2022_Report1 | student1 | I'm the student 1 first submission | + | 2022_Report1 | student2 | I'm the student 2 first submission | + | 2022_Report1 | student3 | I'm the student 3 first submission | + | 2022_Report1 | student4 | I'm the student 4 first submission | + | 2022_Report1 | student5 | I'm the student 5 first submission | + | 2022_Report1 | student6 | I'm the student 6 first submission | + | 2022_Report1 | student7 | I'm the student 7 first submission | + | 2022_Report1 | student8 | I'm the student 8 first submission | + | 2022_Report1 | student9 | I'm the student 9 first submission | + # student0 makes no submission, and will not be marked. + | 2022_Report2 | student1 | I'm the student 1 second submission | + | 2022_Report2 | student2 | I'm the student 2 second submission | + | 2022_Report2 | student3 | I'm the student 3 second submission | + | 2022_Report2 | student4 | I'm the student 4 second submission | + | 2022_Report2 | student5 | I'm the student 5 second submission | + | 2022_Report2 | student6 | I'm the student 6 second submission | + | 2022_Report2 | student7 | I'm the student 7 second submission | + | 2022_Report2 | student8 | I'm the student 8 second submission | + | 2022_Report2 | student9 | I'm the student 9 second submission | + # Double mark the Quercus assignments. + And I am on the "2022_Report1" "assign activity" page logged in as teacher1 + And I follow "View all submissions" + Then I click on "Grade" "link" in the "12345671" "table_row" + And I set the field "First grade" to "A1" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 1!" + # Get inconsistent web service errors. Try waiting. + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "B2" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 2!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "C3" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 3!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "D1" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 4!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "F2" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 5!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "S" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 6!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "N" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 7!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "A2" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 8!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "B3" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 9!" + And I press "Save changes" + # Module leader now marks and agrees final grade. + And I am on the "2022_Report1" "assign activity" page logged in as moduleleader1 + And I follow "View all submissions" + Then I click on "Grade" "link" in the "12345671" "table_row" + And I set the field "Second grade" to "A1" + And I set the field "Agreed grade" to "A1" + And I set the field "Marking workflow state" to "Marking complete" + # Get inconsistent web service errors. Try waiting. + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "B2" + And I set the field "Agreed grade" to "B2" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "C3" + And I set the field "Agreed grade" to "C3" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "D1" + And I set the field "Agreed grade" to "D1" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "F2" + And I set the field "Agreed grade" to "F2" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "S" + And I set the field "Agreed grade" to "S" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "N" + And I set the field "Agreed grade" to "N" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "A2" + And I set the field "Agreed grade" to "A2" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "B3" + And I set the field "Agreed grade" to "B3" + And I set the field "Marking workflow state" to "Marking complete" + And I press "Save changes" + And I am on the "ABC101_123456789" "report_grade > Grade report" page + When I follow "Marks upload status" + Then I should see "Report 1 (25%)" in the ".marksupload-assignment-list" "css_element" + And I should see "Report 2 (25%)" in the ".marksupload-assignment-list" "css_element" + And I should see "Marks upload status for assignment \"Report 1 (25%)\"" + And I should see "No released grades to display" + When I click on "Report 2 (25%)" "link" in the ".marksupload-assignment-list" "css_element" + Then I should see "No released grades to display" + And I should see "Marks upload status for assignment \"Report 2 (25%)\"" + + Scenario: Quercus assignment grades are released + Given the following Quercus assignment exists: + | course | ABC101_123456789 | + | weighting | .25 | + | assessmentCode | Report1 | + | assessmentDescription | Report 1 | + | dueDate | ## 5 May 2023 16:00:00 ## | + | academicYear | 2022 | + And the following Quercus assignment exists: + | course | ABC101_123456789 | + | weighting | .25 | + | assessmentCode | Report2 | + | assessmentDescription | Report 2 | + | dueDate | ## 6 June 2023 16:00:00 ## | + | academicYear | 2022 | + And the following "mod_assign > submissions" exist: + | assign | user | onlinetext | + # Quercus. + | 2022_Report1 | student1 | I'm the student 1 first submission | + | 2022_Report1 | student2 | I'm the student 2 first submission | + | 2022_Report1 | student3 | I'm the student 3 first submission | + | 2022_Report1 | student4 | I'm the student 4 first submission | + | 2022_Report1 | student5 | I'm the student 5 first submission | + | 2022_Report1 | student6 | I'm the student 6 first submission | + | 2022_Report1 | student7 | I'm the student 7 first submission | + | 2022_Report1 | student8 | I'm the student 8 first submission | + | 2022_Report1 | student9 | I'm the student 9 first submission | + # student0 makes no submission, and will not be marked. + | 2022_Report2 | student1 | I'm the student 1 second submission | + | 2022_Report2 | student2 | I'm the student 2 second submission | + | 2022_Report2 | student3 | I'm the student 3 second submission | + | 2022_Report2 | student4 | I'm the student 4 second submission | + | 2022_Report2 | student5 | I'm the student 5 second submission | + | 2022_Report2 | student6 | I'm the student 6 second submission | + | 2022_Report2 | student7 | I'm the student 7 second submission | + | 2022_Report2 | student8 | I'm the student 8 second submission | + | 2022_Report2 | student9 | I'm the student 9 second submission | + # Double mark the Quercus assignments. + And I am on the "2022_Report1" "assign activity" page logged in as teacher1 + And I follow "View all submissions" + Then I click on "Grade" "link" in the "12345671" "table_row" + And I set the field "First grade" to "A1" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 1!" + # Get inconsistent web service errors. Try waiting. + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "B2" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 2!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "C3" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 3!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "D1" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 4!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "F2" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 5!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "S" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 6!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "N" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 7!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "A2" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 8!" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "First grade" to "B3" + And I set the field "Marking workflow state" to "In marking" + And I set the field "Feedback comments" to "Great job no. 9!" + And I press "Save changes" + # Module leader now marks and agrees final grade. + And I am on the "2022_Report1" "assign activity" page logged in as moduleleader1 + And I follow "View all submissions" + Then I click on "Grade" "link" in the "12345671" "table_row" + And I set the field "Second grade" to "A1" + And I set the field "Agreed grade" to "A1" + And I set the field "Marking workflow state" to "Marking complete" + # Get inconsistent web service errors. Try waiting. + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "B2" + And I set the field "Agreed grade" to "B2" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "C3" + And I set the field "Agreed grade" to "C3" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "D1" + And I set the field "Agreed grade" to "D1" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "F2" + And I set the field "Agreed grade" to "F2" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "S" + And I set the field "Agreed grade" to "S" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "N" + And I set the field "Agreed grade" to "N" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "A2" + And I set the field "Agreed grade" to "A2" + And I set the field "Marking workflow state" to "Marking complete" + And I wait until the page is ready + And I press "Save and show next" + And I set the field "Second grade" to "B3" + And I set the field "Agreed grade" to "B3" + And I set the field "Marking workflow state" to "Marking complete" + And I press "Save changes" + # Release the assignments. + And I am on the "2022_Report1" "assign activity" page logged in as moduleleader1 And I follow "View all submissions" # Reveal identities before releasing seems to work rather than the other way around. And I select "Reveal student identities" from the "Grading action" singleselect