Skip to content

Commit

Permalink
Merge branch 'MDL-83551-main' of https://github.com/lameze/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols authored and HuongNV13 committed Nov 22, 2024
2 parents 3059525 + 9a3abb9 commit 4d961d2
Show file tree
Hide file tree
Showing 20 changed files with 45 additions and 45 deletions.
4 changes: 2 additions & 2 deletions mod/assign/tests/behat/assign_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Feature: View activity completion in the assignment activity
And I toggle the manual completion state of "Music history"
And the manual completion button of "Music history" is displayed as "Done"

Scenario: View automatic completion items as a teacher
Scenario: Verify that the assignment completion conditions are displayed to teachers
Given I am on the "Music history" "assign activity editing" page logged in as teacher1
And I expand all fieldsets
And I set the following fields to these values:
Expand All @@ -95,7 +95,7 @@ Feature: View activity completion in the assignment activity
And "Music history" should have the "Receive a grade" completion condition

@javascript
Scenario: View automatic completion items as a student
Scenario: Verify that students can complete an assignment activity by achieving a passing grade
Given I am on the "Music history" "assign activity editing" page logged in as teacher1
And I expand all fieldsets
And I set the following fields to these values:
Expand Down
4 changes: 2 additions & 2 deletions mod/data/tests/behat/data_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Feature: View activity completion in the database activity
And I press "Save and display"
And I log out

Scenario: View automatic completion items as a teacher
Scenario: Database activity displays completion conditions to teachers
# We add an entry to let the user change to a different view.
Given the following "mod_data > entries" exist:
| database | user | Instrument types |
Expand All @@ -61,7 +61,7 @@ Feature: View activity completion in the database activity
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition

Scenario: View automatic completion items as a student
Scenario: A student can complete an database activity by achieving a passing grade
Given I am on the "Music history" "data activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Feature: Completion pass grade
And I log out

@javascript
Scenario: View automatic completion items as a teacher
Scenario: Database module completion conditions are displayed regardless of the view
# We add an entry to let the user change to a different view.
Given the following "mod_data > entries" exist:
| database | user | Instrument types |
Expand All @@ -63,7 +63,7 @@ Feature: Completion pass grade
And "Music history" should have the "Receive a passing grade" completion condition

@javascript
Scenario: View automatic completion items as a failing student
Scenario: Student cannot complete a database activity if one of the conditions are not met
Given I am on the "Music history" "data activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
Expand Down Expand Up @@ -102,7 +102,7 @@ Feature: Completion pass grade
And "Vinnie Student1" user has completed "Music history" activity

@javascript
Scenario: View automatic completion items as a passing student
Scenario: Student can complete a database activity when all conditions are met
Given I am on the "Music history" "data activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
Expand Down
4 changes: 2 additions & 2 deletions mod/feedback/tests/behat/feedback_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ Feature: View activity completion in the feedback activity
| Multiple choice values | drums\guitar\hurdygurdy |
And I log out

Scenario: View automatic completion items as a teacher
Scenario: Feedback module displays completion conditions to teachers
When I am on the "Music history" "feedback activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Submit feedback" completion condition

Scenario: View automatic completion items as a student
Scenario: Student can complete a feedback activity when all conditions are met
Given I am on the "Music history" "feedback activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "todo"
And the "Submit feedback" completion condition of "Music history" is displayed as "todo"
Expand Down
2 changes: 1 addition & 1 deletion mod/folder/tests/behat/folder_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feature: View activity completion information in the folder activity
| teacher1 | C1 | editingteacher |
| student1 | C2 | student |

Scenario: View automatic completion items
Scenario: A folder is automatically completed when a student views it
Given the following "activity" exists:
| activity | folder |
| course | C1 |
Expand Down
4 changes: 2 additions & 2 deletions mod/forum/tests/behat/forum_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Feature: View activity completion in the forum activity
And I press "Save and display"

@javascript
Scenario: View automatic completion items as a teacher
Scenario: Forum module displays automatic completion conditions to teachers
When I am on the "Music history" "forum activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Start discussions: 1" completion condition
Expand All @@ -48,7 +48,7 @@ Feature: View activity completion in the forum activity
And "Music history" should have the "Receive a grade" completion condition

@javascript
Scenario: View automatic completion items as a student
Scenario: A student can complete a forum activity by meeting the completion conditions
Given I am on the "Music history" "forum activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "todo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Feature: Completion pass grade view activity completion in the forum activity
| completionreplies | 1 |
And I press "Save and display"

Scenario: View automatic completion items as a teacher
Scenario: Forum module displays completion conditions to teachers
Given I am on the "Music history" "forum activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Start discussions: 1" completion condition
Expand All @@ -49,7 +49,7 @@ Feature: Completion pass grade view activity completion in the forum activity
And "Music history" should have the "Receive a passing grade" completion condition

@javascript
Scenario: View automatic completion items as a failing student
Scenario: Student cannot complete a forum activity if one of the conditions are not met
Given I am on the "Music history" "forum activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "todo"
Expand Down Expand Up @@ -93,7 +93,7 @@ Feature: Completion pass grade view activity completion in the forum activity
And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"

@javascript
Scenario: View automatic completion items as a passing student
Scenario: Student can complete a forum activity when all conditions are met
Given I am on the "Music history" "forum activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "todo"
Expand Down
4 changes: 2 additions & 2 deletions mod/glossary/tests/behat/glossary_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ Feature: View activity completion in the glossary activity
And I press "Save and display"
And I log out

Scenario: View automatic completion items as a teacher
Scenario: View glossary automatic completion conditions as a teacher
Given I am on the "Music history" "glossary activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 1" completion condition
And "Music history" should have the "Receive a grade" completion condition

Scenario: View automatic completion items as a student
Scenario: A student completes a glossary
Given I am on the "Music history" "glossary activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "todo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Feature: Pass grade completion in the glossary activity
And I press "Save and display"
And I log out

Scenario: View automatic completion items as a teacher
Scenario: A teacher can view a glossary activity completion conditions
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I follow "Music history"
Expand All @@ -47,7 +47,7 @@ Feature: Pass grade completion in the glossary activity
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition

Scenario: View automatic completion items as a failing student
Scenario: A student will not complete a glossary activity if the conditions are not met
Given I am on the "Music history" "glossary activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "todo"
Expand Down Expand Up @@ -75,7 +75,7 @@ Feature: Pass grade completion in the glossary activity
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"

Scenario: View automatic completion items as a passing student
Scenario: A student can complete a glossary activity by meeting the completion conditions
Given I am on the "Music history" "glossary activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "todo"
Expand Down
2 changes: 1 addition & 1 deletion mod/imscp/tests/behat/imscp_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: View activity completion information in the IMS content package activit
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |

Scenario: View automatic completion items
Scenario: A student can complete a IMSCP activity by viewing it
Given the following "activities" exist:
| activity | course | name | completion | completionview | packagefilepath |
| imscp | C1 | Music history | 2 | 1 | mod/imscp/tests/pacakges/singescobbasic.zip |
Expand Down
4 changes: 2 additions & 2 deletions mod/lesson/tests/behat/lesson_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ Feature: View activity completion in the lesson activity
| Music history part 1 | The history of music part 1 | Next page | 0 |
| Music essay | | Next page | 1 |

Scenario: View automatic completion items as a teacher
Scenario: A teacher can view a lesson activity automatic completion conditions
When I am on the "Music history" "lesson activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Spend at least 3 secs on this activity" completion condition
And "Music history" should have the "Go through the activity to the end" completion condition
And "Music history" should have the "Receive a grade" completion condition

Scenario: View automatic completion items as a student
Scenario: A student can complete a lesson activity by meeting the completion conditions
Given I am on the "Music history" "lesson activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Spend at least 3 secs on this activity" completion condition of "Music history" is displayed as "todo"
Expand Down
4 changes: 2 additions & 2 deletions mod/lesson/tests/behat/lesson_completion_pass_grade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ Feature: Pass grade activity completion in the lesson activity
| Numerical question | 3 | End of lesson | 1 |
| Numerical question | @#wronganswer#@ | Next page | 0 |

Scenario: View automatic completion items as a teacher
Scenario: Lesson activity displays completion conditions to teachers
When I am on the "Music history" "lesson activity" page logged in as teacher1
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition

Scenario: View automatic completion items as a student
Scenario: A student can complete an lesson activity by achieving a passing grade
Given I am on the "Music history" "lesson activity" page logged in as student1
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
Expand Down
4 changes: 2 additions & 2 deletions mod/lti/tests/behat/lti_completion_pass_grade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ Feature: Pass grade activity completion information in the LTI activity
| activity | name | course | gradepass | completion | completionview | completionusegrade | completionpassgrade |
| lti | Music history | C1 | 50 | 2 | 1 | 1 | 1 |

Scenario: View automatic completion items as a teacher
Scenario: Verify that the LTI completion conditions are displayed to teachers
Given I am on the "Music history" "lti activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition

@javascript
Scenario: View automatic completion items as a student
Scenario: Verify that students can complete an LTI activity by achieving a passing grade
Given I am on the "Music history" "lti activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
Expand Down
4 changes: 2 additions & 2 deletions mod/page/tests/behat/page_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Feature: View activity completion information in the Page resource
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |

Scenario: View automatic completion items as teacher
Scenario: A teacher can view a page resource automatic completion items
Given the following "activity" exists:
| activity | page |
| course | C1 |
Expand All @@ -30,7 +30,7 @@ Feature: View activity completion information in the Page resource
When I am on the "Music history" "page activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition

Scenario: View automatic completion items as student
Scenario: A student can complete a page resource by viewing it
Given the following "activity" exists:
| activity | page |
| course | C1 |
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/tests/behat/quiz_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Feature: View activity completion in the quiz activity
| question | page |
| First question | 1 |

Scenario Outline: View automatic completion items as a student
Scenario Outline: A student can complete a quiz activity by achieving a passing grade
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test quiz name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Feature: View activity completion information for file resources
And the manual completion button of "Myfile" is displayed as "Done"

@javascript
Scenario: View automatic completion items
Scenario: A student can complete a resource activity by viewing it
Given the following "activities" exist:
| activity | course | name | display | defaultfilename | uploaded |
| resource | C1 | Myfile | 1 | mod/resource/tests/fixtures/samplefile.txt | 1 |
Expand Down
4 changes: 2 additions & 2 deletions mod/scorm/tests/behat/scorm_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Feature: View activity completion in the SCORM activity
| completionusegrade | 1 |

@javascript
Scenario: View automatic completion items as a teacher
Scenario: A teacher can view a SCORM activity automatic completion conditions
Given I am on the "Music history" "scorm activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Receive a score of 3 or more" completion condition
Expand All @@ -51,7 +51,7 @@ Feature: View activity completion in the SCORM activity
And I should not see "Passing grade"

@javascript
Scenario: View automatic completion items as a student
Scenario: A student can complete a SCORM activity by achieving a passing grade
Given I am on the "Music history" "scorm activity" page logged in as student1
# We need a little taller window because Firefox is, apparently, unable to auto-scroll within
# an iframe, so we need to ensure that the "Save changes" button is visible in the viewport.
Expand Down
Loading

0 comments on commit 4d961d2

Please sign in to comment.