/mod/assign/tests/behat/grading_status.feature

https://github.com/markn86/moodle · Gherkin Specification · 160 lines · 144 code · 3 blank · 13 comment · 0 complexity · c6f88e0495e419ee3bf5692c2c622191 MD5 · raw file

  1. @mod @mod_assign
  2. Feature: View the grading status of an assignment
  3. In order to test the grading status for assignments is displaying correctly
  4. As a student
  5. I need to view my grading status
  6. Background:
  7. Given the following "courses" exist:
  8. | fullname | shortname | category | groupmode |
  9. | Course 1 | C1 | 0 | 1 |
  10. And the following "users" exist:
  11. | username | firstname | lastname | email |
  12. | teacher1 | Teacher | 1 | teacher1@example.com |
  13. | student1 | Student | 1 | student1@example.com |
  14. | student2 | Student | 2 | student2@example.com |
  15. And the following "course enrolments" exist:
  16. | user | course | role |
  17. | teacher1 | C1 | editingteacher |
  18. | student1 | C1 | student |
  19. | student2 | C1 | student |
  20. @javascript
  21. Scenario: View the grading status for an assignment with marking workflow enabled
  22. Given the following "activity" exists:
  23. | activity | assign |
  24. | course | C1 |
  25. | name | Test assignment name |
  26. | intro | Submit your online text |
  27. | submissiondrafts | 0 |
  28. | markingworkflow | 1 |
  29. | assignfeedback_comments_enabled | 1 |
  30. | assignsubmission_onlinetext_enabled | 1 |
  31. # Add a submission.
  32. And the following "mod_assign > submissions" exist:
  33. | assign | user | onlinetext |
  34. | Test assignment name | student1 | I'm the student first submission |
  35. # Mark the submission.
  36. And I am on the "Test assignment name" "assign activity" page logged in as teacher1
  37. And I navigate to "View all submissions" in current page administration
  38. And I should see "Not marked" in the "Student 1" "table_row"
  39. And I click on "Grade" "link" in the "Student 1" "table_row"
  40. And I should see "1 of 2"
  41. And I click on "Change filters" "link"
  42. And I set the field "Filter" to "submitted"
  43. And I should see "1 of 1"
  44. And I set the field "Grade out of 100" to "50"
  45. And I set the field "Marking workflow state" to "In review"
  46. And I set the field "Feedback comments" to "Great job! Lol, not really."
  47. And I set the field "Notify students" to "0"
  48. And I press "Save changes"
  49. And I am on the "Test assignment name" "assign activity" page
  50. And I navigate to "View all submissions" in current page administration
  51. And I should see "In review" in the "Student 1" "table_row"
  52. And I log out
  53. # View the grading status as a student.
  54. And I am on the "Test assignment name" "assign activity" page logged in as student1
  55. And I should see "In review" in the "Grading status" "table_row"
  56. And I should not see "Great job! Lol, not really."
  57. And I log out
  58. # Mark the submission again but set the marking workflow to 'Released'.
  59. And I am on the "Test assignment name" "assign activity" page logged in as teacher1
  60. And I navigate to "View all submissions" in current page administration
  61. And I should see "In review" in the "Student 1" "table_row"
  62. And I click on "Grade" "link" in the "Student 1" "table_row"
  63. And I should see "1 of 1"
  64. And I set the field "Marking workflow state" to "Released"
  65. And I press "Save changes"
  66. And I click on "Edit settings" "link"
  67. And I follow "Test assignment name"
  68. And I navigate to "View all submissions" in current page administration
  69. And I should see "Released" in the "Student 1" "table_row"
  70. And I log out
  71. # View the grading status as a student.
  72. And I am on the "Test assignment name" "assign activity" page logged in as student1
  73. And I should see "Released" in the "Grading status" "table_row"
  74. And I should see "Great job! Lol, not really."
  75. And I log out
  76. # Now, change the status from 'Released' to 'In marking' (this will remove the grade from the gradebook).
  77. And I am on the "Test assignment name" "assign activity" page logged in as teacher1
  78. And I navigate to "View all submissions" in current page administration
  79. And I should see "Released" in the "Student 1" "table_row"
  80. And I click on "Grade" "link" in the "Student 1" "table_row"
  81. And I should see "1 of 1"
  82. And I set the field "Marking workflow state" to "In marking"
  83. And I set the field "Notify students" to "0"
  84. And I press "Save changes"
  85. And I am on the "Test assignment name" "assign activity" page
  86. And I navigate to "View all submissions" in current page administration
  87. And I should see "In marking" in the "Student 1" "table_row"
  88. # The grade should also remain displayed as it's stored in the assign DB tables, but the final grade should be empty.
  89. And "Student 1" row "Grade" column of "generaltable" table should contain "50.00"
  90. And "Student 1" row "Final grade" column of "generaltable" table should contain "-"
  91. And I click on "Grade" "link" in the "Student 1" "table_row"
  92. And I click on "Change filters" "link"
  93. And I set the field "Workflow filter" to "In review"
  94. And I should see "0 of 0"
  95. @javascript
  96. Scenario: View the grading status for an assignment with marking workflow disabled
  97. Given the following "activity" exists:
  98. | activity | assign |
  99. | course | C1 |
  100. | name | Test assignment name |
  101. | intro | Submit your online text |
  102. | submissiondrafts | 0 |
  103. | assignfeedback_comments_enabled | 1 |
  104. | markingworkflow | 0 |
  105. | assignsubmission_onlinetext_enabled | 1 |
  106. # Add a submission.
  107. And the following "mod_assign > submissions" exist:
  108. | assign | user | onlinetext |
  109. | Test assignment name | student1 | I'm the student first submission |
  110. # Mark the submission.
  111. And I am on the "Test assignment name" "assign activity" page logged in as teacher1
  112. And I navigate to "View all submissions" in current page administration
  113. And I should not see "Graded" in the "Student 1" "table_row"
  114. And I click on "Grade" "link" in the "Student 1" "table_row"
  115. And I should see "1 of 2"
  116. And I click on "Change filters" "link"
  117. And I set the field "Filter" to "submitted"
  118. And I should see "1 of 1"
  119. And I set the field "Grade out of 100" to "50"
  120. And I set the field "Feedback comments" to "Great job! Lol, not really."
  121. And I press "Save changes"
  122. And I click on "Edit settings" "link"
  123. And I am on the "Test assignment name" "assign activity" page
  124. And I navigate to "View all submissions" in current page administration
  125. And I should see "Graded" in the "Student 1" "table_row"
  126. And I log out
  127. # View the grading status as a student.
  128. And I am on the "Test assignment name" "assign activity" page logged in as student1
  129. And I should see "Graded" in the "Grading status" "table_row"
  130. And I should see "Great job! Lol, not really."
  131. And I log out
  132. # Student makes a subsequent submission.
  133. And I am on the "Test assignment name" "assign activity" page logged in as student1
  134. And I press "Edit submission"
  135. And I set the following fields to these values:
  136. | Online text | I'm the student's second submission |
  137. And I press "Save changes"
  138. And I log out
  139. # Teacher marks the submission again after noticing the 'Graded - follow-up submission received'.
  140. And I am on the "Test assignment name" "assign activity" page logged in as teacher1
  141. And I navigate to "View all submissions" in current page administration
  142. And I should see "Graded - follow-up submission received" in the "Student 1" "table_row"
  143. And I wait "10" seconds
  144. And I click on "Grade" "link" in the "Student 1" "table_row"
  145. And I should see "1 of 1"
  146. And I set the field "Grade out of 100" to "99.99"
  147. And I set the field "Feedback comments" to "Even better job! Really."
  148. And I press "Save changes"
  149. And I click on "Edit settings" "link"
  150. And I am on the "Test assignment name" "assign activity" page
  151. And I navigate to "View all submissions" in current page administration
  152. And I should see "Graded" in the "Student 1" "table_row"
  153. And I log out
  154. # View the grading status as a student again.
  155. And I am on the "Test assignment name" "assign activity" page logged in as student1
  156. And I should see "Graded" in the "Grading status" "table_row"
  157. And I should see "Even better job! Really."