Merge branch 'MDL-70152-master' of https://github.com/andelacruz/moodle

This commit is contained in:
Ilya Tregubov 2023-06-14 13:24:06 +08:00
commit 9611669cae
No known key found for this signature in database
GPG key ID: 0F58186F748E55C1
81 changed files with 638 additions and 1258 deletions

View file

@ -48,16 +48,12 @@ Feature: Edit capabilities
And "mod/forum:addquestion" capability has "Allow" permission And "mod/forum:addquestion" capability has "Allow" permission
Scenario: Module capabilities overrides Scenario: Module capabilities overrides
Given I log in as "teacher1" Given the following "activity" exists:
And the following "activity" exists:
| activity | forum | | activity | forum |
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | 00001 |
| name | I'm the name | | name | I'm the name |
| intro | I'm the introduction | And I am on the "I'm the name" "forum activity" page logged in as teacher1
| section | 1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "I'm the name"
And I navigate to "Permissions" in current page administration And I navigate to "Permissions" in current page administration
And I override the system permissions of "Student" role with: And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit | | mod/forum:deleteanypost | Prohibit |

View file

@ -153,14 +153,10 @@ Feature: Apply tour filters to a tour
| Course 1 | C1 | topics | 1 | | Course 1 | C1 | topics | 1 |
| Course 2 | C2 | topics | 1 | | Course 2 | C2 | topics | 1 |
And the following "activities" exist: And the following "activities" exist:
| activity | course | name | firstpagetitle | wikimode | | activity | course | name | firstpagetitle | wikimode | idnumber | intro | type |
| wiki | C1 | Test wiki name | First page | collaborative | | wiki | C1 | Test wiki name | First page | collaborative | | | |
| forum | C2 | Test forum name | | | 001 | Test forum description | general |
And I log in as "admin" And I log in as "admin"
And I am on "Course 2" course homepage with editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
And I add a new user tour with: And I add a new user tour with:
| Name | Wiki tour | | Name | Wiki tour |
| Description | A tour with both matches | | Description | A tour with both matches |

View file

@ -58,21 +58,18 @@ Feature: availability_completion
@javascript @javascript
Scenario: Test completion and course cache rebuild Scenario: Test completion and course cache rebuild
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | | activity | name | course | idnumber |
| forum | forum 1 | forum 1 | C1 | forum1 | | forum | forum 1 | C1 | forum1 |
And I log in as "teacher1" And the following forum discussions exist in course "Course 1":
And I am on "Course 1" course homepage with editing mode on | user | forum | name | message |
And I open "forum 1" actions menu | student1 | forum 1 | Forum posst 1 | This is the body |
And I click on "Edit settings" "link" in the "forum 1" activity And I am on the "forum 1" "forum activity editing" page logged in as teacher1
And I set the following fields to these values: And I set the following fields to these values:
| Completion tracking | Show activity as complete when conditions are met | | Completion tracking | Show activity as complete when conditions are met |
| completionview | 1 | | completionview | 1 |
| completionpostsenabled | 1 | | completionpostsenabled | 1 |
| completionposts | 2 | | completionposts | 2 |
And I press "Save and return to course" And I press "Save and return to course"
And I add a new discussion to "forum 1" forum with:
| Subject | Forum post 1 |
| Message | This is the body |
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "2" And I add a "Page" to section "2"
And I set the following fields to these values: And I set the following fields to these values:
@ -87,25 +84,18 @@ Feature: availability_completion
| Required completion status | must be marked complete | | Required completion status | must be marked complete |
| cm | forum 1 | | cm | forum 1 |
And I press "Save and return to course" And I press "Save and return to course"
And I log out When I am on the "Course 1" course page logged in as student1
And I log in as "student1"
When I am on "Course 1" course homepage
# Page 2 should not appear yet. # Page 2 should not appear yet.
Then I should not see "Page 2" in the "region-main" "region" Then I should not see "Page 2" in the "region-main" "region"
And I click on "forum 1" "link" in the "region-main" "region" And I click on "forum 1" "link" in the "region-main" "region"
# Page 2 should not appear yet. # Page 2 should not appear yet.
And I should not see "Page 2" in the "region-main" "region" And I should not see "Page 2" in the "region-main" "region"
And I log out And I am on the "forum 1" "forum activity editing" page logged in as teacher1
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I am on the "forum 1" "forum activity editing" page
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
| completionpostsenabled | 0 | | completionpostsenabled | 0 |
And I press "Save and display" And I press "Save and display"
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
And I click on "forum 1" "link" in the "region-main" "region" And I click on "forum 1" "link" in the "region-main" "region"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I should see "Page 2" in the "region-main" "region" And I should see "Page 2" in the "region-main" "region"

View file

@ -27,6 +27,10 @@ Feature: edit_availability
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activity" exists:
| activity | forum |
| course | C1 |
| name | MyForum |
Scenario: Confirm the 'enable availability' option is working Scenario: Confirm the 'enable availability' option is working
Given the following config values are set as admin: Given the following config values are set as admin:
@ -178,9 +182,7 @@ Feature: edit_availability
# Button does not exist when conditional access restrictions are turned off. # Button does not exist when conditional access restrictions are turned off.
Given the following config values are set as admin: Given the following config values are set as admin:
| enableavailability | 0 | | enableavailability | 0 |
And I log in as "admin" And I am on the "MyForum" "forum activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
And I add a "Forum" to section "1"
When I expand all fieldsets When I expand all fieldsets
Then "Add group/grouping access restriction" "button" should not exist Then "Add group/grouping access restriction" "button" should not exist
@ -190,12 +192,7 @@ Feature: edit_availability
Given the following "groupings" exist: Given the following "groupings" exist:
| name | course | idnumber | | name | course | idnumber |
| GX1 | C1 | GXI1 | | GX1 | C1 | GXI1 |
And I log in as "admin" And I am on the "MyForum" "forum activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
And I add a "Forum" to section "1"
And I set the following fields to these values:
| Forum name | MyForum |
| Description | x |
When I expand all fieldsets When I expand all fieldsets
Then the "Add group/grouping access restriction" "button" should be disabled Then the "Add group/grouping access restriction" "button" should be disabled

View file

@ -15,12 +15,10 @@ Feature: Restore Moodle 2 course backups
| activity | course | idnumber | name | intro | section | externalurl | | activity | course | idnumber | name | intro | section | externalurl |
| assign | C3 | assign1 | Test assign name | Assign description | 1 | | | assign | C3 | assign1 | Test assign name | Assign description | 1 | |
| data | C3 | data1 | Test database name | Database description | 2 | | | data | C3 | data1 | Test database name | Database description | 2 | |
| forum | C1 | 0001 | Test forum name | | 1 | |
| url | C1 | url1 | Test URL name | Test URL description | 3 | http://www.moodle.org | | url | C1 | url1 | Test URL name | Test URL description | 3 | http://www.moodle.org |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Description | Test forum description |
And I add the "Activities" block And I add the "Activities" block
@javascript @javascript
@ -63,10 +61,11 @@ Feature: Restore Moodle 2 course backups
Scenario: Restore a backup into the same course removing it's contents before that Scenario: Restore a backup into the same course removing it's contents before that
When I backup "Course 1" course using this options: When I backup "Course 1" course using this options:
| Confirmation | Filename | test_backup.mbz | | Confirmation | Filename | test_backup.mbz |
And I am on "Course 1" course homepage And the following "activity" exists:
And I add a "Forum" to section "1" and I fill the form with: | activity | forum |
| Forum name | Test forum post backup name | | course | C1 |
| Description | Test forum post backup description | | section | 1 |
| name | Test forum post backup name |
And I am on the "Course 1" "restore" page And I am on the "Course 1" "restore" page
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Section 3 | 0 | | Schema | Section 3 | 0 |

View file

@ -39,19 +39,15 @@ Feature: Displaying the link to the Participants page
@javascript @javascript
Scenario: Course participants link is displayed to users depending on role permissions settings Scenario: Course participants link is displayed to users depending on role permissions settings
And I log in as "admin" Given the following "activities" exist:
And I am on "Course1" course homepage with editing mode on | activity | course | name |
And I add a "Forum" to section "1" and I fill the form with: | forum | C1 | Test forum name |
| Forum name | Test forum name | And I am on the "Course1" "enrolment methods" page logged in as admin
| Description | Test forum description |
And I am on the "Course1" "enrolment methods" page
And I click on "Edit" "link" in the "Guest access" "table_row" And I click on "Edit" "link" in the "Guest access" "table_row"
And I set the following fields to these values: And I set the following fields to these values:
| Allow guest access | Yes | | Allow guest access | Yes |
And I press "Save changes" And I press "Save changes"
And I log out When I am on the "Course1" course page logged in as guest
When I log in as "guest"
And I am on "Course1" course homepage
Then I should not see "Participants" in the "Navigation" "block" Then I should not see "Participants" in the "Navigation" "block"
And I am on the "Test forum name" "forum activity" page And I am on the "Test forum name" "forum activity" page
And I should not see "Participants" in the "Navigation" "block" And I should not see "Participants" in the "Navigation" "block"
@ -60,8 +56,7 @@ Feature: Displaying the link to the Participants page
And I set the following system permissions of "Guest" role: And I set the following system permissions of "Guest" role:
| capability | permission | | capability | permission |
| moodle/course:viewparticipants | Allow | | moodle/course:viewparticipants | Allow |
And I log in as "guest" And I am on the "Course1" course page logged in as guest
And I am on "Course1" course homepage
And I should see "Participants" in the "Navigation" "block" And I should see "Participants" in the "Navigation" "block"
And I am on the "Test forum name" "forum activity" page And I am on the "Test forum name" "forum activity" page
And I should see "Participants" in the "Navigation" "block" And I should see "Participants" in the "Navigation" "block"

View file

@ -47,38 +47,33 @@ Feature: View structural changes in recent activity block
Scenario: Check that Added module information is displayed respecting view capability Scenario: Check that Added module information is displayed respecting view capability
Given the following "activities" exist: Given the following "activities" exist:
| activity | course | section | name | idnumber | description | groupmode | grouping | visible | | activity | course | name | idnumber | groupmode | grouping | visible |
| forum | C1 | 1 | ForumVisibleGroups | forum1 | No description | 2 | | 1 | | forum | C1 | ForumVisibleGroups | forum1 | 2 | | 1 |
| forum | C1 | 1 | ForumSeparateGroups | forum2 | No description | 1 | | 1 | | forum | C1 | ForumSeparateGroups | forum2 | 1 | | 1 |
| forum | C1 | 1 | ForumHidden | forum3 | No description | 1 | | 0 | | forum | C1 | ForumHidden | forum3 | 1 | | 0 |
| forum | C1 | 1 | ForumNoGroups | forum4 | No description | 0 | | 1 | | forum | C1 | ForumNoGroups | forum4 | 0 | | 1 |
| forum | C1 | 2 | ForumVisibleGroupsG1 | forum5 | No description | 2 | GG1 | 1 | | forum | C1 | ForumVisibleGroupsG1 | forum5 | 2 | GG1 | 1 |
| forum | C1 | 2 | ForumSeparateGroupsG1 | forum6 | No description | 1 | GG1 | 1 | | forum | C1 | ForumSeparateGroupsG1 | forum6 | 1 | GG1 | 1 |
| forum | C1 | 3 | ForumVisibleGroupsG2 | forum7 | No description | 2 | GG2 | 1 | | forum | C1 | ForumVisibleGroupsG2 | forum7 | 2 | GG2 | 1 |
| forum | C1 | 3 | ForumSeparateGroupsG2 | forum8 | No description | 1 | GG2 | 1 | | forum | C1 | ForumSeparateGroupsG2 | forum8 | 1 | GG2 | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage And I am on the "ForumVisibleGroupsG1" "forum activity editing" page logged in as teacher1
And I click on "ForumVisibleGroupsG1" "link"
And I click on "Settings" "link"
And I set the following fields to these values: And I set the following fields to these values:
| Access restrictions | Grouping: Grouping 1 | | Access restrictions | Grouping: Grouping 1 |
And I press "Save and return to course" And I press "Save and return to course"
And I click on "ForumSeparateGroupsG1" "link" And I am on the "ForumSeparateGroupsG1" "forum activity editing" page
And I click on "Settings" "link"
And I set the following fields to these values: And I set the following fields to these values:
| Access restrictions | Grouping: Grouping 1 | | Access restrictions | Grouping: Grouping 1 |
And I press "Save and return to course" And I press "Save and return to course"
And I click on "ForumVisibleGroupsG2" "link" And I am on the "ForumVisibleGroupsG2" "forum activity editing" page
And I click on "Settings" "link"
And I set the following fields to these values: And I set the following fields to these values:
| Access restrictions | Grouping: Grouping 2 | | Access restrictions | Grouping: Grouping 2 |
And I press "Save and return to course" And I press "Save and return to course"
And I click on "ForumSeparateGroupsG2" "link" And I am on the "ForumSeparateGroupsG2" "forum activity editing" page
And I click on "Settings" "link"
And I set the following fields to these values: And I set the following fields to these values:
| Access restrictions | Grouping: Grouping 2 | | Access restrictions | Grouping: Grouping 2 |
And I press "Save and return to course" And I press "Save and return to course"
@ -94,10 +89,8 @@ Feature: View structural changes in recent activity block
And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block"
And I should see "ForumVisibleGroupsG2" in the "Recent activity" "block" And I should see "ForumVisibleGroupsG2" in the "Recent activity" "block"
And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block"
And I log out
And I log in as "student1" And I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
And I should see "ForumVisibleGroups" in the "Recent activity" "block" And I should see "ForumVisibleGroups" in the "Recent activity" "block"
And I should see "ForumSeparateGroups" in the "Recent activity" "block" And I should see "ForumSeparateGroups" in the "Recent activity" "block"
And I should see "ForumNoGroups" in the "Recent activity" "block" And I should see "ForumNoGroups" in the "Recent activity" "block"
@ -106,10 +99,8 @@ Feature: View structural changes in recent activity block
And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block"
And I should not see "ForumVisibleGroupsG2" in the "Recent activity" "block" And I should not see "ForumVisibleGroupsG2" in the "Recent activity" "block"
And I should not see "ForumSeparateGroupsG2" in the "Recent activity" "block" And I should not see "ForumSeparateGroupsG2" in the "Recent activity" "block"
And I log out
And I log in as "student2" And I am on the "Course 1" course page logged in as student2
And I am on "Course 1" course homepage
And I should see "ForumVisibleGroups" in the "Recent activity" "block" And I should see "ForumVisibleGroups" in the "Recent activity" "block"
And I should see "ForumSeparateGroups" in the "Recent activity" "block" And I should see "ForumSeparateGroups" in the "Recent activity" "block"
And I should see "ForumNoGroups" in the "Recent activity" "block" And I should see "ForumNoGroups" in the "Recent activity" "block"
@ -118,10 +109,8 @@ Feature: View structural changes in recent activity block
And I should not see "ForumSeparateGroupsG1" in the "Recent activity" "block" And I should not see "ForumSeparateGroupsG1" in the "Recent activity" "block"
And I should see "ForumVisibleGroupsG2" in the "Recent activity" "block" And I should see "ForumVisibleGroupsG2" in the "Recent activity" "block"
And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block"
And I log out
And I log in as "student3" And I am on the "Course 1" course page logged in as student3
And I am on "Course 1" course homepage
And I should see "ForumVisibleGroups" in the "Recent activity" "block" And I should see "ForumVisibleGroups" in the "Recent activity" "block"
And I should see "ForumSeparateGroups" in the "Recent activity" "block" And I should see "ForumSeparateGroups" in the "Recent activity" "block"
And I should see "ForumNoGroups" in the "Recent activity" "block" And I should see "ForumNoGroups" in the "Recent activity" "block"
@ -130,17 +119,14 @@ Feature: View structural changes in recent activity block
And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block"
And I should see "ForumVisibleGroupsG2" in the "Recent activity" "block" And I should see "ForumVisibleGroupsG2" in the "Recent activity" "block"
And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block"
And I log out
# Teachers have capability to see all groups and hidden activities # Teachers have capability to see all groups and hidden activities
And I log in as "assistant1" And I am on the "Course 1" course page logged in as assistant1
And I am on "Course 1" course homepage
And I should see "ForumHidden" in the "Recent activity" "block" And I should see "ForumHidden" in the "Recent activity" "block"
And I should see "ForumVisibleGroupsG1" in the "Recent activity" "block" And I should see "ForumVisibleGroupsG1" in the "Recent activity" "block"
And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block"
And I should see "ForumVisibleGroupsG2" in the "Recent activity" "block" And I should see "ForumVisibleGroupsG2" in the "Recent activity" "block"
And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block"
And I log out
Scenario: Updates and deletes in recent activity block Scenario: Updates and deletes in recent activity block
Given the following "activity" exists: Given the following "activity" exists:
@ -148,7 +134,6 @@ Feature: View structural changes in recent activity block
| course | C1 | | course | C1 |
| idnumber | forum1 | | idnumber | forum1 |
| name | ForumNew | | name | ForumNew |
| description | No description |
When I log in as "teacher1" When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add the "Recent activity" block And I add the "Recent activity" block
@ -158,8 +143,7 @@ Feature: View structural changes in recent activity block
# Update forum as a teacher after a second to ensure we have a new timestamp for recent activity. # Update forum as a teacher after a second to ensure we have a new timestamp for recent activity.
And I wait "1" seconds And I wait "1" seconds
And I log in as "student1" And I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
And I should see "Added Forum" in the "Recent activity" "block" And I should see "Added Forum" in the "Recent activity" "block"
And I should see "ForumNew" in the "Recent activity" "block" And I should see "ForumNew" in the "Recent activity" "block"
And I log out And I log out
@ -167,10 +151,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds And I wait "1" seconds
# Update forum as a teacher # Update forum as a teacher
And I log in as "teacher1" And I am on the "ForumNew" "forum activity editing" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "ForumNew"
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| name | ForumUpdated | | name | ForumUpdated |
And I press "Save and return to course" And I press "Save and return to course"
@ -178,8 +159,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds And I wait "1" seconds
# Student 1 already saw that forum was created, now he can see that forum was updated # Student 1 already saw that forum was created, now he can see that forum was updated
And I log in as "student1" And I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
And I should not see "Added Forum" in the "Recent activity" "block" And I should not see "Added Forum" in the "Recent activity" "block"
And I should not see "ForumNew" in the "Recent activity" "block" And I should not see "ForumNew" in the "Recent activity" "block"
And I should see "Updated Forum" in the "Recent activity" "block" And I should see "Updated Forum" in the "Recent activity" "block"
@ -188,8 +168,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds And I wait "1" seconds
# Student 2 has bigger interval and he can see one entry that forum was created but with the new name # Student 2 has bigger interval and he can see one entry that forum was created but with the new name
And I log in as "student2" And I am on the "Course 1" course page logged in as student2
And I am on "Course 1" course homepage
And I should see "Added Forum" in the "Recent activity" "block" And I should see "Added Forum" in the "Recent activity" "block"
And I should not see "ForumNew" in the "Recent activity" "block" And I should not see "ForumNew" in the "Recent activity" "block"
And I should not see "Updated Forum" in the "Recent activity" "block" And I should not see "Updated Forum" in the "Recent activity" "block"
@ -206,8 +185,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds And I wait "1" seconds
# Students 1 and 2 see that forum was deleted # Students 1 and 2 see that forum was deleted
And I log in as "student1" And I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
And I should not see "Added Forum" in the "Recent activity" "block" And I should not see "Added Forum" in the "Recent activity" "block"
And I should not see "ForumNew" in the "Recent activity" "block" And I should not see "ForumNew" in the "Recent activity" "block"
And I should not see "Updated Forum" in the "Recent activity" "block" And I should not see "Updated Forum" in the "Recent activity" "block"
@ -217,8 +195,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds And I wait "1" seconds
# Student 3 never knew that forum was created, so he does not see anything # Student 3 never knew that forum was created, so he does not see anything
And I log in as "student3" And I am on the "Course 1" course page logged in as student3
And I am on "Course 1" course homepage
And I should not see "Added Forum" in the "Recent activity" "block" And I should not see "Added Forum" in the "Recent activity" "block"
And I should not see "ForumNew" in the "Recent activity" "block" And I should not see "ForumNew" in the "Recent activity" "block"
And I should not see "Updated Forum" in the "Recent activity" "block" And I should not see "Updated Forum" in the "Recent activity" "block"

View file

@ -26,14 +26,16 @@ Feature: Edit activities in main menu block
Scenario: Activities in main menu block can be made available but not visible on a course page Scenario: Activities in main menu block can be made available but not visible on a course page
Given the following config values are set as admin: Given the following config values are set as admin:
| allowstealth | 1 | | allowstealth | 1 |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| site_main_menu | System | 1 | site-index | side-post |
And the following "activities" exist:
| activity | course | section | name |
| forum | Acceptance test site | 0 | Visible forum |
| forum | Acceptance test site | 0 | My forum name |
And I log in as "admin" And I log in as "admin"
And I am on site homepage And I am on site homepage
And I turn editing mode on And I turn editing mode on
And I add the "Main menu" block
When I add a "Forum" to section "0" and I fill the form with:
| Forum name | Visible forum |
When I add a "Forum" to section "0" and I fill the form with:
| Forum name | My forum name |
And "My forum name" activity in site main menu block should have "Hide" editing icon And "My forum name" activity in site main menu block should have "Hide" editing icon
And "My forum name" activity in site main menu block should not have "Show" editing icon And "My forum name" activity in site main menu block should not have "Show" editing icon
And "My forum name" activity in site main menu block should not have "Make available" editing icon And "My forum name" activity in site main menu block should not have "Make available" editing icon

View file

@ -19,12 +19,11 @@ Feature: Edit activities in social activities block
@javascript @javascript
Scenario: Edit name of activity in-place in social activities block Scenario: Edit name of activity in-place in social activities block
Given I log in as "user1" Given the following "activities" exist:
| activity | course | name |
| forum | C1 | My forum name |
And I log in as "user1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I press "Add an activity or resource"
And I click on "Add a new Forum" "link" in the "Add an activity or resource" "dialogue"
And I set the field "Forum name" to "My forum name"
And I press "Save and return to course"
When I set the field "Edit title" in the "My forum name" "block_social_activities > Activity" to "New forum name" When I set the field "Edit title" in the "My forum name" "block_social_activities > Activity" to "New forum name"
Then I should not see "My forum name" in the "Social activities" "block" Then I should not see "My forum name" in the "Social activities" "block"
And I should see "New forum name" And I should see "New forum name"

View file

@ -24,27 +24,20 @@ Feature: Show activity completion status or activity completion configuration on
And I set the following fields to these values: And I set the following fields to these values:
| Enable completion tracking | Yes | | Enable completion tracking | Yes |
And I press "Save and display" And I press "Save and display"
And the following "activities" exist:
| activity | course | idnumber | name | intro | completion | completionview | completionexpected |
| forum | C1 | forum1 | Test forum name | Test forum description | 1 | 0 | 0 |
And the following "activities" exist: And the following "activities" exist:
| activity | course | idnumber | name | intro | completion | completionview | completionexpected | | activity | course | idnumber | name | intro | completion | completionview | completionexpected |
| assign | C1 | assign1 | Test assignment name | Test assignment description | 2 | 1 | 0 | | assign | C1 | assign1 | Test assignment name | Test assignment description | 2 | 1 | 0 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | completion | completionview | completionexpected |
| quiz | C1 | quiz1 | Test quiz name | Test quiz description | 0 | 0 | 0 | | quiz | C1 | quiz1 | Test quiz name | Test quiz description | 0 | 0 | 0 |
And I log out | forum | C1 | forum1 | Test forum name | | 1 | 0 | 0 |
Scenario: Show completion status to students Scenario: Show completion status to students
Given I log in as "student1" Given I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
And the manual completion button of "Test forum name" is displayed as "Mark as done" And the manual completion button of "Test forum name" is displayed as "Mark as done"
And the "View" completion condition of "Test assignment name" is displayed as "todo" And the "View" completion condition of "Test assignment name" is displayed as "todo"
And there should be no completion information shown for "Test quiz name" And there should be no completion information shown for "Test quiz name"
Scenario: Show completion configuration to editing teachers Scenario: Show completion configuration to editing teachers
Given I log in as "teacher1" Given I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
And the manual completion button for "Test forum name" should be disabled And the manual completion button for "Test forum name" should be disabled
And "Test assignment name" should have the "View" completion condition And "Test assignment name" should have the "View" completion condition
And there should be no completion information shown for "Test quiz name" And there should be no completion information shown for "Test quiz name"
@ -54,8 +47,7 @@ Feature: Show activity completion status or activity completion configuration on
And there should be no completion information shown for "Test quiz name" And there should be no completion information shown for "Test quiz name"
Scenario: Show completion configuration to non-editing teachers Scenario: Show completion configuration to non-editing teachers
Given I log in as "teacher2" Given I am on the "Course 1" course page logged in as teacher2
And I am on "Course 1" course homepage
And the manual completion button for "Test forum name" should be disabled And the manual completion button for "Test forum name" should be disabled
And "Test assignment name" should have the "View" completion condition And "Test assignment name" should have the "View" completion condition
And there should be no completion information shown for "Test quiz name" And there should be no completion information shown for "Test quiz name"

View file

@ -19,13 +19,8 @@ Feature: Completion with no calendar capabilites
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | 00001 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum name description |
| section | 1 |
| completion | 2 | | completion | 2 |
And I log in as "admin" And I am on the "Test forum name" "forum activity editing" page logged in as admin
And I am on "Course 1" course homepage
And I follow "Test forum name"
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| id_completionexpected_enabled | 1 | | id_completionexpected_enabled | 1 |
| id_completionexpected_day | 1 | | id_completionexpected_day | 1 |
@ -36,13 +31,9 @@ Feature: Completion with no calendar capabilites
And I override the system permissions of "Teacher" role with: And I override the system permissions of "Teacher" role with:
| capability | permission | | capability | permission |
| moodle/calendar:manageentries | Prohibit | | moodle/calendar:manageentries | Prohibit |
And I log out
Scenario: Editing completion date Scenario: Editing completion date
When I log in as "teacher1" When I am on the "Test forum name" "forum activity editing" page logged in as teacher1
And I am on "Course 1" course homepage with editing mode on
And I follow "Test forum name"
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| id_completionexpected_year | 2018 | | id_completionexpected_year | 2018 |
And I press "Save and return to course" And I press "Save and return to course"

View file

@ -17,23 +17,22 @@ Feature: Allow students to manually mark an activity as complete
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And I log in as "teacher1" And the following "activity" exists:
And I am on "Course 1" course homepage with editing mode on | activity | forum |
| course | C1 |
| name | Test forum name |
And I am on the "Course 1" course page logged in as teacher1
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Enable completion tracking | Yes | | Enable completion tracking | Yes |
And I press "Save and display" And I press "Save and display"
And I add a "Forum" to section "1" and I fill the form with: And I am on the "Test forum name" "forum activity editing" page
| Forum name | Test forum name | And I set the following fields to these values:
| Description | Test forum description | | completion | 1 |
| Completion tracking | Students can manually mark the activity as completed | And I press "Save and return to course"
And "Student First" user has not completed "Test forum name" activity And "Student First" user has not completed "Test forum name" activity
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
When I toggle the manual completion state of "Test forum name" When I toggle the manual completion state of "Test forum name"
Then the manual completion button of "Test forum name" is displayed as "Done" Then the manual completion button of "Test forum name" is displayed as "Done"
And I log out And I am on the "Course 1" course page logged in as teacher1
And I log in as "teacher1"
And I am on "Course 1" course homepage
And "Student First" user has completed "Test forum name" activity And "Student First" user has completed "Test forum name" activity

View file

@ -18,7 +18,6 @@ Feature: Edit activity name in-place
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| name | Test forum name | | name | Test forum name |
| description | Test forum description |
| idnumber | forum1 | | idnumber | forum1 |
@javascript @javascript

View file

@ -27,7 +27,6 @@ Feature: Toggle activities visibility from the course page
| course | C1 | | course | C1 |
| idnumber | C1F1 | | idnumber | C1F1 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| visible | 1 | | visible | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
@ -63,10 +62,8 @@ Feature: Toggle activities visibility from the course page
And "Test forum name" activity should be hidden And "Test forum name" activity should be hidden
And I turn editing mode off And I turn editing mode off
And "Test forum name" activity should be hidden And "Test forum name" activity should be hidden
And I log out
# Student should not see this activity. # Student should not see this activity.
And I log in as "student1" And I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
And I should not see "Test forum name" And I should not see "Test forum name"
@javascript @javascript
@ -77,7 +74,6 @@ Feature: Toggle activities visibility from the course page
| idnumber | C1F1 | | idnumber | C1F1 |
| section | 2 | | section | 2 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| visible | 1 | | visible | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
@ -108,10 +104,8 @@ Feature: Toggle activities visibility from the course page
And "Test forum name" activity should be available but hidden from course page And "Test forum name" activity should be available but hidden from course page
And I turn editing mode off And I turn editing mode off
And "Test forum name" activity should be available but hidden from course page And "Test forum name" activity should be available but hidden from course page
And I log out
# Student will not see the module on the course page but can access it from other reports and blocks: # Student will not see the module on the course page but can access it from other reports and blocks:
And I log in as "student1" And I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
And "Test forum name" activity should be hidden And "Test forum name" activity should be hidden
And I click on "Test forum name" "link" in the "Recent activity" "block" And I click on "Test forum name" "link" in the "Recent activity" "block"
And I should see "Test forum name" And I should see "Test forum name"

View file

@ -24,8 +24,8 @@ Feature: Collapse course sections
| assign | Assignment 2 | Test assignment description2 | C1 | assign2 | 2 | 1 | | assign | Assignment 2 | Test assignment description2 | C1 | assign2 | 2 | 1 |
| book | Book 2 | | C1 | book2 | 2 | 1 | | book | Book 2 | | C1 | book2 | 2 | 1 |
| book | Book 3 | | C1 | book3 | 3 | 1 | | book | Book 3 | | C1 | book3 | 3 | 1 |
| forum | Forum 4 | Test forum description4 | C1 | forum4 | 4 | 1 | | forum | Forum 4 | | C1 | forum4 | 4 | 1 |
| forum | Forum 5 | Test forum description5 | C1 | forum5 | 5 | 1 | | forum | Forum 5 | | C1 | forum5 | 5 | 1 |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
@ -40,16 +40,17 @@ Feature: Collapse course sections
And I set the field "x[year]" to "2013" And I set the field "x[year]" to "2013"
And I press "Save changes" And I press "Save changes"
And I hide section "5" And I hide section "5"
And I log out
@javascript @javascript
Scenario: No chevron on site home Scenario: No chevron on site home
Given I log in as "admin" Given the following activity" exists:
| activity | forum |
| course | Acceptance test site |
| section | 1 |
| name | Test forum post backup name |
And I log in as "admin"
And I am on site homepage And I am on site homepage
And I turn editing mode on And I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum post backup name |
| Description | Test forum post backup description |
And I click on "Edit summary" "link" in the "region-main" "region" And I click on "Edit summary" "link" in the "region-main" "region"
And I click on "Custom" "checkbox" And I click on "Custom" "checkbox"
And I set the field "New value for Section name" to "New section name" And I set the field "New value for Section name" to "New section name"
@ -143,8 +144,7 @@ Feature: Collapse course sections
@javascript @javascript
Scenario: Users don't see chevron on one section per page for Topics format Scenario: Users don't see chevron on one section per page for Topics format
Given I log in as "teacher1" Given I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
When I navigate to "Settings" in current page administration When I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
@ -165,8 +165,7 @@ Feature: Collapse course sections
@javascript @javascript
Scenario: Users don't see chevron on one section per page for Weeks format Scenario: Users don't see chevron on one section per page for Weeks format
Given I log in as "teacher1" Given I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
When I navigate to "Settings" in current page administration When I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
@ -179,9 +178,7 @@ Feature: Collapse course sections
And "[data-toggle=collapse]" "css_element" should not exist in the "region-main" "region" And "[data-toggle=collapse]" "css_element" should not exist in the "region-main" "region"
Then "1 May - 7 May" "section" should not exist Then "1 May - 7 May" "section" should not exist
And "15 May - 21 May" "section" should not exist And "15 May - 21 May" "section" should not exist
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
And I should see "Available until" in the "#section-4 .availabilityinfo" "css_element" And I should see "Available until" in the "#section-4 .availabilityinfo" "css_element"
And I should see "2013" in the "#section-4 .availabilityinfo" "css_element" And I should see "2013" in the "#section-4 .availabilityinfo" "css_element"
And I should not see "Forum 4" And I should not see "Forum 4"

View file

@ -26,6 +26,10 @@ Feature: Course activity controls works as expected
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | course | section | name |
| forum | C1 | 1 | Test forum name 1 |
| forum | C1 | 1 | Test forum name 2 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
When I click on <targetpage> "link" in the "region-main" "region" When I click on <targetpage> "link" in the "region-main" "region"
@ -34,12 +38,6 @@ Feature: Course activity controls works as expected
And I click on "Delete Recent activity block" "link" And I click on "Delete Recent activity block" "link"
And I click on "Delete" "button" in the "Delete block?" "dialogue" And I click on "Delete" "button" in the "Delete block?" "dialogue"
And <belowpage> "section" <should_see_other_sections> exist And <belowpage> "section" <should_see_other_sections> exist
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name 1 |
| Description | Test forum description 1 |
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name 2 |
| Description | Test forum description 2 |
And <belowpage> "section" <should_see_other_sections> exist And <belowpage> "section" <should_see_other_sections> exist
And I open "Test forum name 1" actions menu And I open "Test forum name 1" actions menu
And I click on "Edit settings" "link" in the "Test forum name 1" activity And I click on "Edit settings" "link" in the "Test forum name 1" activity
@ -96,9 +94,9 @@ Feature: Course activity controls works as expected
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | section | | activity | name | course | idnumber | section |
| forum | Test forum name 1 | Test forum description 1 | C1 | 0001 | 1 | | forum | Test forum name 1 | C1 | 0001 | 1 |
| forum | Test forum name 2 | Test forum description 2 | C1 | 0002 | 1 | | forum | Test forum name 2 | C1 | 0002 | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
When I click on <targetpage> "link" in the "region-main" "region" When I click on <targetpage> "link" in the "region-main" "region"

View file

@ -15,8 +15,8 @@ Feature: General section does not show in navigation when empty
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | section | | activity | name | course | idnumber | section |
| forum | Test forum name | Test forum name description | C1 | forum1 | 1 | | forum | Test forum name | C1 | forum1 | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin: And the following config values are set as admin:

View file

@ -14,13 +14,10 @@ Feature: Activities can be moved between sections
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
And the following "activity" exists: And the following "activities" exist:
| activity | forum | | activity | name | course | idnumber | section |
| course | C1 | | forum | Test forum name | C1 | 00001 | 1 |
| idnumber | 00001 | | forum | Second forum name | C1 | 00002 | 1 |
| name | Test forum name |
| intro | Test forum description |
| section | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
@ -40,13 +37,6 @@ Feature: Activities can be moved between sections
Scenario: Move activities in a course section with Javascript disabled using paged mode Scenario: Move activities in a course section with Javascript disabled using paged mode
Given I navigate to "Settings" in current page administration Given I navigate to "Settings" in current page administration
And the following "activity" exists:
| activity | forum |
| course | C1 |
| idnumber | 00002 |
| name | Second forum name |
| intro | Second forum description |
| section | 1 |
And I set the following fields to these values: And I set the following fields to these values:
| Course layout | Show one section per page | | Course layout | Show one section per page |
And I press "Save and display" And I press "Save and display"

View file

@ -15,8 +15,8 @@ Feature: Sections can be moved
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | section | | activity | name | course | idnumber | section |
| forum | Test forum name | Test forum name description | C1 | forum1 | 1 | | forum | Test forum name | C1 | forum1 | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on

View file

@ -16,36 +16,19 @@ Feature: Show/hide course sections
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist:
| activity | course | section | name | visible |
| forum | C1 | 1 | Test hidden forum 11 name | 0 |
| forum | C1 | 1 | Test hidden forum 12 name | 1 |
| forum | C1 | 2 | Test hidden forum 21 name | 0 |
| forum | C1 | 2 | Test hidden forum 22 name | 1 |
| forum | C1 | 3 | Test hidden forum 31 name | 0 |
| forum | C1 | 3 | Test hidden forum 32 name | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test hidden forum 11 name |
| Description | Test hidden forum 11 description |
| Availability | Hide on course page |
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test hidden forum 12 name |
| Description | Test hidden forum 12 description |
| Availability | Show on course page |
And I add a "Forum" to section "2" and I fill the form with:
| Forum name | Test hidden forum 21 name |
| Description | Test hidden forum 21 description |
| Availability | Hide on course page |
And I add a "Forum" to section "2" and I fill the form with:
| Forum name | Test hidden forum 22 name |
| Description | Test hidden forum 22 description |
| Availability | Show on course page |
And I add a "Forum" to section "3" and I fill the form with:
| Forum name | Test hidden forum 31 name |
| Description | Test hidden forum 31 description |
| Availability | Hide on course page |
And I add a "Forum" to section "3" and I fill the form with:
| Forum name | Test hidden forum 32 name |
| Description | Test hidden forum 32 description |
| Availability | Show on course page |
@javascript @javascript
Scenario: Show / hide section icon functions correctly Scenario: Show / hide section icon functions correctly
Given I am on "Course 1" course homepage
When I hide section "1" When I hide section "1"
Then section "1" should be hidden Then section "1" should be hidden
And section "2" should be visible And section "2" should be visible
@ -64,9 +47,7 @@ Feature: Show/hide course sections
And section "2" should be visible And section "2" should be visible
And section "3" should be hidden And section "3" should be hidden
And all activities in section "1" should be hidden And all activities in section "1" should be hidden
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
And section "1" should be hidden And section "1" should be hidden
And all activities in section "1" should be hidden And all activities in section "1" should be hidden
And section "2" should be visible And section "2" should be visible
@ -75,9 +56,8 @@ Feature: Show/hide course sections
@javascript @javascript
Scenario: Students can not navigate to hidden sections Scenario: Students can not navigate to hidden sections
Given I am on "Course 1" course homepage Given I hide section "2"
And I hide section "2" And I navigate to "Settings" in current page administration
Given I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Course layout | Show one section per page | | Course layout | Show one section per page |
And I press "Save and display" And I press "Save and display"
@ -86,9 +66,7 @@ Feature: Show/hide course sections
And I click on "Topic 2" "link" in the "region-main" "region" And I click on "Topic 2" "link" in the "region-main" "region"
And I should see "Topic 1" in the "region-main" "region" And I should see "Topic 1" in the "region-main" "region"
And I should see "Topic 3" in the "region-main" "region" And I should see "Topic 3" in the "region-main" "region"
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
And I click on "Topic 1" "link" in the "region-main" "region" And I click on "Topic 1" "link" in the "region-main" "region"
And I should not see "Topic 2" in the "region-main" "region" And I should not see "Topic 2" in the "region-main" "region"
And I should see "Topic 3" in the "region-main" "region" And I should see "Topic 3" in the "region-main" "region"
@ -98,7 +76,6 @@ Feature: Show/hide course sections
@javascript @javascript
Scenario: Students can not navigate to restricted sections Scenario: Students can not navigate to restricted sections
Given I am on "Course 1" course homepage
Given I navigate to "Settings" in current page administration Given I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Course layout | Show one section per page | | Course layout | Show one section per page |
@ -120,9 +97,7 @@ Feature: Show/hide course sections
And I click on "Topic 2" "link" in the "region-main" "region" And I click on "Topic 2" "link" in the "region-main" "region"
And I should see "Topic 1" in the "region-main" "region" And I should see "Topic 1" in the "region-main" "region"
And I should see "Topic 3" in the "region-main" "region" And I should see "Topic 3" in the "region-main" "region"
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
And I click on "Topic 1" "link" in the "region-main" "region" And I click on "Topic 1" "link" in the "region-main" "region"
And I should not see "Topic 2" in the "region-main" "region" And I should not see "Topic 2" in the "region-main" "region"
And I should see "Topic 3" in the "region-main" "region" And I should see "Topic 3" in the "region-main" "region"

View file

@ -14,7 +14,7 @@ Feature: Section 0 default/custom title
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | section | | activity | name | intro | course | idnumber | section |
| data | Test database name | Test database description | C1 | database1 | 2 | | data | Test database name | Test database description | C1 | database1 | 2 |
| forum | Test forum name | Test forum name description | C1 | forum1 | 1 | | forum | Test forum name | | C1 | forum1 | 1 |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |

View file

@ -20,22 +20,14 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al
| course | C1 | | course | C1 |
| idnumber | 0001 | | idnumber | 0001 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description | And I am on the "Course 1" "enrolment methods" page logged in as teacher1
| section | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I turn editing mode on
And I am on the "Course 1" "enrolment methods" page
Scenario: Allow guest access without password Scenario: Allow guest access without password
Given I click on "Edit" "link" in the "Guest access" "table_row" Given I click on "Edit" "link" in the "Guest access" "table_row"
And I set the following fields to these values: And I set the following fields to these values:
| Allow guest access | Yes | | Allow guest access | Yes |
And I press "Save changes" And I press "Save changes"
And I log out When I am on the "Test forum name" "forum activity" page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test forum name"
Then I should not see "Subscribe to this forum" Then I should not see "Subscribe to this forum"
Scenario: Allow guest access with password Scenario: Allow guest access with password
@ -44,9 +36,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al
| Allow guest access | Yes | | Allow guest access | Yes |
| Password | moodle_rules | | Password | moodle_rules |
And I press "Save changes" And I press "Save changes"
And I log out When I am on the "Course 1" course page logged in as student1
And I log in as "student1"
When I am on "Course 1" course homepage
Then I should see "Guest access" Then I should see "Guest access"
And I set the following fields to these values: And I set the following fields to these values:
| Password | moodle_rules | | Password | moodle_rules |

View file

@ -242,11 +242,9 @@ Feature: We can set the grade to pass value
Scenario: Set an invalid grade to pass for forum activity Scenario: Set an invalid grade to pass for forum activity
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | section | idnumber | | activity | name | course | idnumber |
| forum | Test Forum 1 | Test | C1 | 1 | forum1 | | forum | Test Forum 1 | C1 | forum1 |
And I am on "Course 1" course homepage with editing mode on And I am on the "Test Forum 1" "forum activity editing" page
And I am on the "Test Forum 1" "forum activity" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
| Ratings > Aggregate type | Average of ratings | | Ratings > Aggregate type | Average of ratings |
@ -258,11 +256,10 @@ Feature: We can set the grade to pass value
Scenario: Set a valid grade to pass for forum activity Scenario: Set a valid grade to pass for forum activity
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | section | idnumber | | activity | name | course | idnumber |
| forum | Test Forum 1 | Test | C1 | 1 | forum1 | | forum | Test Forum 1 | C1 | forum1 |
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I am on the "Test Forum 1" "forum activity" page And I am on the "Test Forum 1" "forum activity editing" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
| Ratings > Aggregate type | Average of ratings | | Ratings > Aggregate type | Average of ratings |
@ -276,9 +273,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90" Then the field "Grade to pass" matches value "90"
And I set the field "Grade to pass" to "80" And I set the field "Grade to pass" to "80"
And I press "Save changes" And I press "Save changes"
And I am on "Course 1" course homepage And I am on the "Test Forum 1" "forum activity editing" page
And I am on the "Test Forum 1" "forum activity" page
And I follow "Settings"
And the field "Ratings > Grade to pass" matches value "80" And the field "Ratings > Grade to pass" matches value "80"
Scenario: Set a valid grade to pass for glossary activity Scenario: Set a valid grade to pass for glossary activity

View file

@ -20,17 +20,14 @@ Feature: Using the forum activities which support point scale
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| name | Test forum name | | name | Test forum name |
| description | Test forum description |
| idnumber | forum1 | | idnumber | forum1 |
And the following forum discussions exist in course "Course 1":
| user | forum | name | message |
| student1 | Test forum name | Discussion subject | Test post in forum 1 |
@javascript @javascript
Scenario: Forum rescale grade should not be possible when users are graded Scenario: Forum rescale grade should not be possible when users are graded
Given I am on the "Course 1" course page logged in as student1 Given I am on the "Test forum name" "forum activity editing" page logged in as teacher1
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion subject |
| Message | Test post in forum 1 |
And I log out
And I am on the "Test forum name" "forum activity editing" page logged in as teacher1
And I expand all fieldsets And I expand all fieldsets
And I set the field "Ratings > Aggregate type" to "Count of ratings" And I set the field "Ratings > Aggregate type" to "Count of ratings"
And I set the field "Ratings > Type" to "Point" And I set the field "Ratings > Type" to "Point"

View file

@ -20,72 +20,54 @@ Feature: Using the activity grade form element
| name | scale | | name | scale |
| ABCDEF | F,E,D,C,B,A | | ABCDEF | F,E,D,C,B,A |
| Letter scale | Disappointing, Good, Very good, Excellent | | Letter scale | Disappointing, Good, Very good, Excellent |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| section | 1 |
| name | Test assignment name |
| intro | Test assignment description |
Scenario: Being able to change the grade type, scale and maximum grade when there are no grades
Given I log in as "admin"
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | | activity | course | section | name | intro | idnumber | type | groupmode |
| forum | Test forum name | Test forum description | C1 | forum1 | | assign | C1 | 1 | Test assignment name | Test assignment description | | | |
And I am on the "Test forum name" "forum activity editing" page logged in as teacher1 | forum | C1 | 1 | Test forum name | | forum1 | general | 0 |
And the following forum discussions exist in course "Course 1":
| user | forum | name | message |
| student1 | Test forum name | Discussion subject | Discussion message |
@javascript
Scenario: Being able to change the grade type, scale and maximum grade when there are no grades
Given I am on the "Test forum name" "forum activity editing" page logged in as teacher1
And I set the following fields to these values: And I set the following fields to these values:
| Forum type | Standard forum for general use | | Ratings > Aggregate type | Average of ratings |
| Aggregate type | Average of ratings | | id_scale_modgrade_type | Point |
| scale[modgrade_type] | Point | | Ratings > scale[modgrade_point] | 60 |
| scale[modgrade_point] | 100 |
| Group mode | No groups |
And I press "Save and return to course" And I press "Save and return to course"
And I am on the "Test forum name" "forum activity editing" page And I am on the "Test forum name" "forum activity editing" page
When I expand all fieldsets When I expand all fieldsets
Then I should not see "Some grades have already been awarded, so the grade type" Then I should not see "Some grades have already been awarded, so the grade type"
And I set the field "scale[modgrade_type]" to "Scale" And I set the field "id_scale_modgrade_type" to "Scale"
And I set the field "scale[modgrade_scale]" to "ABCDEF" And I set the field "Ratings > scale[modgrade_scale]" to "ABCDEF"
And I press "Save and display" And I press "Save and display"
And I should not see "You cannot change the type, as grades already exist for this item" And I should not see "You cannot change the type, as grades already exist for this item"
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I should not see "Some grades have already been awarded, so the grade type" And I should not see "Some grades have already been awarded, so the grade type"
And I set the field "scale[modgrade_scale]" to "Letter scale" And I set the field "Ratings > scale[modgrade_scale]" to "Letter scale"
And I press "Save and display" And I press "Save and display"
And I should not see "You cannot change the scale, as grades already exist for this item" And I should not see "You cannot change the scale, as grades already exist for this item"
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I should not see "Some grades have already been awarded, so the grade type" And I should not see "Some grades have already been awarded, so the grade type"
And I set the field "scale[modgrade_type]" to "Point" And I set the field "id_scale_modgrade_type" to "Point"
And I set the field "Maximum grade" to "50" And I set the field "Ratings > Maximum grade" to "50"
And I press "Save and display" And I press "Save and display"
And I should not see "You must choose whether to rescale existing grades or not" And I should not see "You must choose whether to rescale existing grades or not"
@javascript @javascript
Scenario: Attempting to change the scale when grades already exist in rating activity Scenario: Attempting to change the scale when grades already exist in rating activity
Given I log in as "teacher1" Given I am on the "Test forum name" "forum activity editing" page logged in as teacher1
And I am on "Course 1" course homepage with editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Aggregate type | Average of ratings |
| scale[modgrade_type] | Scale |
| scale[modgrade_scale] | ABCDEF |
| Group mode | No groups |
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1
And I click on "Add discussion topic" "link"
And I set the following fields to these values: And I set the following fields to these values:
| Subject | Discussion subject | | Ratings > Aggregate type | Average of ratings |
| Message | Discussion message | | id_scale_modgrade_type | Scale |
And I press "Post to forum" | Ratings > scale[modgrade_scale] | ABCDEF |
And I log out And I press "Save and display"
And I am on the "Test forum name" "forum activity" page logged in as teacher1
And I follow "Discussion subject" And I follow "Discussion subject"
And I set the field "rating" to "D" And I set the field "rating" to "D"
And I am on the "Test forum name" "forum activity" page And I am on the "Test forum name" "forum activity editing" page
And I navigate to "Settings" in current page administration
When I expand all fieldsets When I expand all fieldsets
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed" Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed"
# Try saving the form and visiting it back to verify that everything is working ok. # Try saving the form and visiting it back to verify that everything is working ok.
@ -93,9 +75,9 @@ Feature: Using the activity grade form element
And I should not see "When selecting a ratings aggregate type you must also select" And I should not see "When selecting a ratings aggregate type you must also select"
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And the field "Aggregate type" matches value "Average of ratings" And the field "Ratings > Aggregate type" matches value "Average of ratings"
And the field "scale[modgrade_type]" matches value "Scale" And the field "id_scale_modgrade_type" matches value "Scale"
And the field "scale[modgrade_scale]" matches value "ABCDEF" And the field "Ratings > scale[modgrade_scale]" matches value "ABCDEF"
@javascript @javascript
Scenario: Attempting to change the scale when grades already exist in non-rating activity Scenario: Attempting to change the scale when grades already exist in non-rating activity
@ -122,30 +104,15 @@ Feature: Using the activity grade form element
@javascript @javascript
Scenario: Attempting to change the maximum grade when ratings exist Scenario: Attempting to change the maximum grade when ratings exist
Given the following "activities" exist: Given I am on the "Test forum name" "forum activity editing" page logged in as teacher1
| activity | name | intro | course | idnumber | section |
| forum | Test forum name | Test forum description | C1 | forum1 | 1 |
And I am on the "Test forum name" "forum activity editing" page logged in as teacher1
And I set the following fields to these values: And I set the following fields to these values:
| Forum type | Standard forum for general use | | Ratings > Aggregate type | Average of ratings |
| Aggregate type | Average of ratings | | id_scale_modgrade_type | Point |
| scale[modgrade_type] | Point | | Ratings > scale[modgrade_point] | 100 |
| scale[modgrade_point] | 100 | And I press "Save and display"
| Group mode | No groups |
And I press "Save and return to course"
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1
And I click on "Add discussion topic" "link"
And I set the following fields to these values:
| Subject | Discussion subject |
| Message | Discussion message |
And I press "Post to forum"
And I log out
And I am on the "Test forum name" "forum activity" page logged in as teacher1
And I follow "Discussion subject" And I follow "Discussion subject"
And I set the field "rating" to "100" And I set the field "rating" to "100"
And I am on the "Test forum name" "forum activity" page And I am on the "Test forum name" "forum activity editing" page
And I navigate to "Settings" in current page administration
When I expand all fieldsets When I expand all fieldsets
Then I should see "You cannot change the type, as grades already exist for this item." Then I should see "You cannot change the type, as grades already exist for this item."
And the "Maximum grade" "field" should be disabled And the "Maximum grade" "field" should be disabled

View file

@ -19,8 +19,8 @@ Feature: Message users in the summary report
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | | activity | name | course | idnumber |
| forum | forum1 | C1 first forum | C1 | forum1 | | forum | forum1 | C1 | forum1 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | | user | forum | name | message |
| teacher1 | forum1 | discussion1 | t1 earliest | | teacher1 | forum1 | discussion1 | t1 earliest |

View file

@ -24,11 +24,11 @@ Feature: Course level forum summary report
| student2 | C2 | student | | student2 | C2 | student |
| student3 | C2 | student | | student3 | C2 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | | activity | name | course | idnumber |
| forum | forum1 | C1 forum 1 | C1 | forum1 | | forum | forum1 | C1 | forum1 |
| forum | forum2 | C1 forum 2 | C1 | forum2 | | forum | forum2 | C1 | forum2 |
| forum | forum3 | C1 forum 3 | C1 | forum3 | | forum | forum3 | C1 | forum3 |
| forum | forum4 | C2 forum 1 | C2 | forum4 | | forum | forum4 | C2 | forum4 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | created | | user | forum | name | message | created |
| teacher1 | forum1 | discussion1 | Discussion 1 | ##2018-01-14 09:00:00## | | teacher1 | forum1 | discussion1 | Discussion 1 | ##2018-01-14 09:00:00## |
@ -100,9 +100,7 @@ Feature: Course level forum summary report
Given the following "permission overrides" exist: Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference | | capability | permission | role | contextlevel | reference |
| forumreport/summary:view | Allow | student | Course | C1 | | forumreport/summary:view | Allow | student | Course | C1 |
When I log in as "student1" When I am on the "forum1" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
And I follow "forum1"
And I navigate to "Reports" in current page administration And I navigate to "Reports" in current page administration
And the following should exist in the "forumreport_summary_table" table: And the following should exist in the "forumreport_summary_table" table:
# | | Discussions | Replies | | | # | | Discussions | Replies | | |

View file

@ -23,10 +23,10 @@ Feature: forum report shows post/reply/word counts correctly
| student2 | C1 | student | self | | student2 | C1 | student | self |
| teacher1 | C2 | editingteacher | manual | | teacher1 | C2 | editingteacher | manual |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | | activity | name | course | idnumber |
| forum | forum1 | C1 first forum | C1 | forum1 | | forum | forum1 | C1 | forum1 |
| forum | forum2 | C1 second forum | C1 | forum2 | | forum | forum2 | C1 | forum2 |
| forum | forum1 | C2 first forum | C2 | forum1 | | forum | forum1 | C2 | forum1 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | attachments | inlineattachments | | user | forum | name | message | attachments | inlineattachments |
| teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | | | teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | |
@ -44,8 +44,7 @@ Feature: forum report shows post/reply/word counts correctly
And the following forum discussions exist in course "Course 2": And the following forum discussions exist in course "Course 2":
| user | forum | name | message | attachments | inlineattachments | | user | forum | name | message | attachments | inlineattachments |
| teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | | | teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | |
When I log in as "teacher1" When I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "forum1" And I follow "forum1"
And I navigate to "Reports" in current page administration And I navigate to "Reports" in current page administration
Then "Teacher 1" row "Number of attachments" column of "forumreport_summary_table" table should contain "6" Then "Teacher 1" row "Number of attachments" column of "forumreport_summary_table" table should contain "6"

View file

@ -21,8 +21,8 @@ Feature: Include private replies in the summary report
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | | activity | name | course | idnumber |
| forum | forum1 | C1 first forum | C1 | forum1 | | forum | forum1 | C1 | forum1 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | | user | forum | name | message |
| teacher1 | forum1 | discussion1 | t1 earliest | | teacher1 | forum1 | discussion1 | t1 earliest |
@ -33,12 +33,10 @@ Feature: Include private replies in the summary report
| teacher1 | forum1 | discussion1 | t1 between | t1 between | | teacher1 | forum1 | discussion1 | t1 between | t1 between |
| teacher1 | forum1 | discussion2 | t1 latest | t1 latest | | teacher1 | forum1 | discussion2 | t1 latest | t1 latest |
| student1 | forum1 | discussion1 | s1 earliest | s1 earliest | | student1 | forum1 | discussion1 | s1 earliest | s1 earliest |
And I log in as "teacher1" And I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
And I reply "s1 earliest" post from "discussion1" forum with: And I reply "s1 earliest" post from "discussion1" forum with:
| Message | This is a private reply | | Message | This is a private reply |
| Reply privately | 1 | | Reply privately | 1 |
And I log out
Scenario: Private replies are counted for Teacher Scenario: Private replies are counted for Teacher
When I am on the forum1 "forum activity" page logged in as teacher2 When I am on the forum1 "forum activity" page logged in as teacher2

View file

@ -19,8 +19,8 @@ Feature: Report relevant content availability
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | | activity | name | course | idnumber |
| forum | forum1 | C1 forum | C1 | forum1 | | forum | forum1 | C1 | forum1 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | attachments | inlineattachments | | user | forum | name | message | attachments | inlineattachments |
| teacher1 | forum1 | discussion1 | message 1 | | | | teacher1 | forum1 | discussion1 | message 1 | | |

View file

@ -21,10 +21,10 @@ Feature: Attachments count column data available
| student2 | C1 | student | | student2 | C1 | student |
| teacher1 | C2 | editingteacher | | teacher1 | C2 | editingteacher |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | | activity | name | course | idnumber |
| forum | forum1 | C1 first forum | C1 | forum1C1 | | forum | forum1 | C1 | forum1C1 |
| forum | forum2 | C1 second forum | C1 | forum2C1 | | forum | forum2 | C1 | forum2C1 |
| forum | forum1 | C2 first forum | C2 | forum1C2 | | forum | forum1 | C2 | forum1C2 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | attachments | inlineattachments | | user | forum | name | message | attachments | inlineattachments |
| teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | | | teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | |

View file

@ -21,10 +21,10 @@ Feature: Post date columns data available
| student2 | C1 | student | | student2 | C1 | student |
| teacher1 | C2 | editingteacher | | teacher1 | C2 | editingteacher |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | | activity | name | course | idnumber |
| forum | forum1 | C1 first forum | C1 | forum1C1 | | forum | forum1 | C1 | forum1C1 |
| forum | forum2 | C1 second forum | C1 | forum2C1 | | forum | forum2 | C1 | forum2C1 |
| forum | forum1 | C2 first forum | C2 | forum1C2 | | forum | forum1 | C2 | forum1C2 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | created | | user | forum | name | message | created |
| teacher1 | forum1 | discussion1 | t1 earliest | ##2018-01-02 09:00:00## | | teacher1 | forum1 | discussion1 | t1 earliest | ##2018-01-02 09:00:00## |

View file

@ -34,10 +34,10 @@ Feature: Groups report filter is available if groups exist
| teacher1 | G3 | | teacher1 | G3 |
| student1 | G3 | | student1 | G3 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | forum1 | C1 first forum | C1 | c1forum1 | 1 | | forum | forum1 | C1 | c1forum1 | 1 |
| forum | forum2 | C1 second forum | C1 | c1forum2 | 2 | | forum | forum2 | C1 | c1forum2 | 2 |
| forum | forum1 | C2 first forum | C2 | c2forum1 | 0 | | forum | forum1 | C2 | c2forum1 | 0 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | group | created | | user | forum | name | message | group | created |
| teacher1 | forum1 | discussion1 | D1 message | G1 | ## 1 month ago ## | | teacher1 | forum1 | discussion1 | D1 message | G1 | ## 1 month ago ## |

View file

@ -27,10 +27,10 @@ Feature: Groups report filter is not available if no groups exist
| user | group | | user | group |
| teacher1 | G1 | | teacher1 | G1 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | forum1 | C1 first forum | C1 | forum1C1 | 0 | | forum | forum1 | C1 | forum1C1 | 0 |
| forum | forum2 | C1 second forum | C1 | forum2C1 | 0 | | forum | forum2 | C1 | forum2C1 | 0 |
| forum | forum1 | C2 first forum | C2 | forum1C2 | 2 | | forum | forum1 | C2 | forum1C2 | 2 |
And the following forum discussions exist in course "Course 1": And the following forum discussions exist in course "Course 1":
| user | forum | name | message | created | | user | forum | name | message | created |
| teacher1 | forum1 | discussion1 | D1 message | ## 1 month ago ## | | teacher1 | forum1 | discussion1 | D1 message | ## 1 month ago ## |

View file

@ -17,22 +17,16 @@ Feature: Add forum activities and discussions
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And I log in as "teacher1" And the following "activity" exists:
And I am on "Course 1" course homepage with editing mode on | activity | forum |
And I add a "Forum" to section "1" and I fill the form with: | course | C1 |
| Forum name | Test forum name | | name | Test forum name |
| Forum type | Standard forum for general use | | type | general |
| Description | Test forum description | And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message | attachments |
| Subject | Forum post 1 | | teacher1 | Test forum name | Forum post 1 | this is the body | |
| Message | This is the body | | student1 | Test forum name | Post with attachment | this is the body | empty.txt |
And I log out
And I log in as "student1" And I log in as "student1"
And I am on "Course 1" course homepage
When I add a new discussion to "Test forum name" forum with:
| Subject | Post with attachment |
| Message | This is the body |
| Attachment | lib/tests/fixtures/empty.txt |
And I reply "Forum post 1" post from "Test forum name" forum with: And I reply "Forum post 1" post from "Test forum name" forum with:
| Subject | Reply with attachment | | Subject | Reply with attachment |
| Message | This is the body | | Message | This is the body |

View file

@ -13,20 +13,21 @@ Feature: Add forum activities and discussions utilizing the inline add discussio
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And I log in as "teacher1" And the following "activity" exists:
And I am on "Course 1" course homepage with editing mode on | activity | forum |
And I add a "Forum" to section "1" and I fill the form with: | course | C1 |
| Forum name | Test forum name | | idnumber | 0001 |
| Forum type | Standard forum for general use | | name | Test forum name |
| Description | Test forum description | | type | general |
And I add a new discussion to "Test forum name" forum with: And the following "mod_forum > discussion" exists:
| Subject | Forum post 1 | | forum | 0001 |
| Message | This is the body | | course | C1 |
And I log out | user | teacher1 |
| name | Forum post 1 |
| message | This is the body |
Scenario: Student can add a discussion via the inline form Scenario: Student can add a discussion via the inline form
Given I log in as "student1" Given I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
Then I add a new discussion to "Test forum name" forum inline with: Then I add a new discussion to "Test forum name" forum inline with:
| Subject | Post with attachment | | Subject | Post with attachment |
| Message | This is the body | | Message | This is the body |

View file

@ -15,22 +15,17 @@ Feature: As a teacher, you can manually lock individual discussions when viewing
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| name | Test forum name | | name | Test forum name |
And I am on the "Course 1" course page logged in as admin And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Discussion 1 | | admin | Test forum name | Discussion 1 | Discussion contents 1, first message |
| Message | Discussion contents 1, first message | | admin | Test forum name | Discussion 2 | Discussion contents 2, first message |
And I reply "Discussion 1" post from "Test forum name" forum with: And the following forum replies exist in course "Course 1":
| Subject | Reply 1 to discussion 1 | | user | forum | discussion | subject | message |
| Message | Discussion contents 1, second message | | admin | Test forum name | Discussion 1 | Reply 1 to discussion 1 | Discussion contents 1, second message |
And I add a new discussion to "Test forum name" forum with: | admin | Test forum name | Discussion 2 | Reply 1 to discussion 2 | Discussion contents 2, second message |
| Subject | Discussion 2 |
| Message | Discussion contents 2, first message |
And I reply "Discussion 2" post from "Test forum name" forum with:
| Subject | Reply 1 to discussion 2 |
| Message | Discussion contents 2, second message |
Scenario: Lock a discussion and view Scenario: Lock a discussion and view
Given I am on the "Course 1" course page Given I am on the "Course 1" course page logged in as admin
And I navigate to post "Discussion 1" in "Test forum name" forum And I navigate to post "Discussion 1" in "Test forum name" forum
And I press "Settings" And I press "Settings"
Then "Lock this discussion" "link" should be visible Then "Lock this discussion" "link" should be visible
@ -42,16 +37,14 @@ Feature: As a teacher, you can manually lock individual discussions when viewing
And I press "Settings" And I press "Settings"
And I follow "Discussion 2" And I follow "Discussion 2"
Then I should not see "This discussion has been locked so you can no longer reply to it." Then I should not see "This discussion has been locked so you can no longer reply to it."
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
And I navigate to post "Discussion 1" in "Test forum name" forum And I navigate to post "Discussion 1" in "Test forum name" forum
Then I should see "This discussion has been locked so you can no longer reply to it." Then I should see "This discussion has been locked so you can no longer reply to it."
And "Reply" "link" should not be visible And "Reply" "link" should not be visible
@accessibility @accessibility
Scenario: A locked discussion must be accessible Scenario: A locked discussion must be accessible
Given I am on the "Course 1" course page Given I am on the "Course 1" course page logged in as admin
And I navigate to post "Discussion 1" in "Test forum name" forum And I navigate to post "Discussion 1" in "Test forum name" forum
When I reply "Discussion 1" post from "Test forum name" forum with: When I reply "Discussion 1" post from "Test forum name" forum with:
| Subject | Discussion 1: Hello world! | | Subject | Discussion 1: Hello world! |
@ -62,7 +55,6 @@ Feature: As a teacher, you can manually lock individual discussions when viewing
When I follow "Lock this discussion" When I follow "Lock this discussion"
# Check discussion view accessibility with info notification shown when discussion is locked. # Check discussion view accessibility with info notification shown when discussion is locked.
And the page should meet accessibility standards with "wcag143" extra tests And the page should meet accessibility standards with "wcag143" extra tests
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1 And I am on the "Test forum name" "forum activity" page logged in as student1
# Check discussion list accessibility with danger pill shown when discussion is locked. # Check discussion list accessibility with danger pill shown when discussion is locked.
And the page should meet accessibility standards with "wcag143" extra tests And the page should meet accessibility standards with "wcag143" extra tests

View file

@ -31,11 +31,9 @@ Feature: A user can navigate to previous and next discussions
Scenario: A user can navigate between discussions Scenario: A user can navigate between discussions
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Test forum name | Test forum name | C1 | forum | 0 | | forum | Test forum name | C1 | forum | 0 |
And I log in as "teacher1" And I am on the "Test forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Test forum name"
And I add a new discussion to "Test forum name" forum with: And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 1 | | Subject | Discussion 1 |
| Message | Test post message | | Message | Test post message |
@ -72,37 +70,17 @@ Feature: A user can navigate to previous and next discussions
Scenario: A user can navigate between discussions with visible groups Scenario: A user can navigate between discussions with visible groups
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Test forum name | Test forum name | C1 | forum | 2 | | forum | Test forum name | C1 | forum | 2 |
And I log in as "teacher1" And the following forum discussions exist in course "Course 1":
And I am on "Course 1" course homepage | user | forum | name | message | group |
And I follow "Test forum name" | teacher1 | Test forum name | Discussion 1 Group 0 | Test post message | |
And I add a new discussion to "Test forum name" forum with: | teacher1 | Test forum name | Discussion 2 Group 0 | Test post message | |
| Subject | Discussion 1 Group 0 | | teacher1 | Test forum name | Discussion 1 Group 1 | Test post message | G1 |
| Message | Test post message | | teacher1 | Test forum name | Discussion 2 Group 1 | Test post message | G1 |
And I add a new discussion to "Test forum name" forum with: | teacher1 | Test forum name | Discussion 1 Group 2 | Test post message | G2 |
| Subject | Discussion 2 Group 0 | | teacher1 | Test forum name | Discussion 2 Group 2 | Test post message | G2 |
| Message | Test post message | When I am on the "Test forum name" "forum activity" page logged in as student1
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 1 Group 1 |
| Message | Test post message |
| Group | Group 1 |
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 2 Group 1 |
| Message | Test post message |
| Group | Group 1 |
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 1 Group 2 |
| Message | Test post message |
| Group | Group 2 |
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 2 Group 2 |
| Message | Test post message |
| Group | Group 2 |
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test forum name"
And I select "All participants" from the "Visible groups" singleselect And I select "All participants" from the "Visible groups" singleselect
And I follow "Discussion 1 Group 0" And I follow "Discussion 1 Group 0"
Then I should see "Discussion 2 Group 0" Then I should see "Discussion 2 Group 0"
@ -129,37 +107,17 @@ Feature: A user can navigate to previous and next discussions
Scenario: A user can navigate between discussions with separate groups Scenario: A user can navigate between discussions with separate groups
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Test forum name | Test forum name | C1 | forum | 1 | | forum | Test forum name | C1 | forum | 1 |
And I log in as "teacher1" And the following forum discussions exist in course "Course 1":
And I am on "Course 1" course homepage | user | forum | name | message | group |
And I follow "Test forum name" | teacher1 | Test forum name | Discussion 1 Group 0 | Test post message | |
And I add a new discussion to "Test forum name" forum with: | teacher1 | Test forum name | Discussion 2 Group 0 | Test post message | |
| Subject | Discussion 1 Group 0 | | teacher1 | Test forum name | Discussion 1 Group 1 | Test post message | G1 |
| Message | Test post message | | teacher1 | Test forum name | Discussion 2 Group 1 | Test post message | G1 |
And I add a new discussion to "Test forum name" forum with: | teacher1 | Test forum name | Discussion 1 Group 2 | Test post message | G2 |
| Subject | Discussion 2 Group 0 | | teacher1 | Test forum name | Discussion 2 Group 2 | Test post message | G2 |
| Message | Test post message | When I am on the "Test forum name" "forum activity" page logged in as student1
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 1 Group 1 |
| Message | Test post message |
| Group | Group 1 |
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 2 Group 1 |
| Message | Test post message |
| Group | Group 1 |
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 1 Group 2 |
| Message | Test post message |
| Group | Group 2 |
And I add a new discussion to "Test forum name" forum with:
| Subject | Discussion 2 Group 2 |
| Message | Test post message |
| Group | Group 2 |
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test forum name"
And I follow "Discussion 1 Group 1" And I follow "Discussion 1 Group 1"
Then I should see "Discussion 2 Group 0" Then I should see "Discussion 2 Group 0"
And I should see "Discussion 2 Group 1" And I should see "Discussion 2 Group 1"

View file

@ -43,7 +43,6 @@ Feature: An admin or teacher sets the post threshold for blocking and warning
And I am on the "Test forum name" "forum activity" page And I am on the "Test forum name" "forum activity" page
And I click on "Test post subject two" "link" And I click on "Test post subject two" "link"
And I should not see "Reply" And I should not see "Reply"
And I log out
# Verify that student2 is not affected by the posts made by student1 # Verify that student2 is not affected by the posts made by student1
And I am on the "Test forum name" "forum activity" page logged in as student2 And I am on the "Test forum name" "forum activity" page logged in as student2
And I should see "Add discussion topic" And I should see "Add discussion topic"

View file

@ -14,7 +14,6 @@ Feature: A user can control their own subscription preferences for a discussion
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
And I log in as "admin"
@javascript @javascript
Scenario: An optional forum can have discussions subscribed to Scenario: An optional forum can have discussions subscribed to
@ -23,17 +22,12 @@ Feature: A user can control their own subscription preferences for a discussion
| course | C1 | | course | C1 |
| idnumber | forum1 | | idnumber | forum1 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| type | general | | type | general |
| forcesubscribe | 0 | | forcesubscribe | 0 |
And I am on "Course 1" course homepage And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Test post subject one | | admin | Test forum name | Test post subject one | Test post message one |
| Message | Test post message one | | admin | Test forum name | Test post subject two | Test post message two |
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject two |
| Message | Test post message two |
And I log out
When I am on the "Test forum name" "forum activity" page logged in as student1 When I am on the "Test forum name" "forum activity" page logged in as student1
Then I can subscribe to this forum Then I can subscribe to this forum
And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject one" "table_row" And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
@ -68,17 +62,12 @@ Feature: A user can control their own subscription preferences for a discussion
| course | C1 | | course | C1 |
| idnumber | forum1 | | idnumber | forum1 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| type | general | | type | general |
| forcesubscribe | 2 | | forcesubscribe | 2 |
And I am on "Course 1" course homepage And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Test post subject one | | admin | Test forum name | Test post subject one | Test post message one |
| Message | Test post message one | | admin | Test forum name | Test post subject two | Test post message two |
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject two |
| Message | Test post message two |
And I log out
When I am on the "Test forum name" "forum activity" page logged in as student1 When I am on the "Test forum name" "forum activity" page logged in as student1
Then I can unsubscribe from this forum Then I can unsubscribe from this forum
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row" And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
@ -113,17 +102,12 @@ Feature: A user can control their own subscription preferences for a discussion
| course | C1 | | course | C1 |
| idnumber | forum1 | | idnumber | forum1 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| type | general | | type | general |
| forcesubscribe | 0 | | forcesubscribe | 0 |
And I am on "Course 1" course homepage And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Test post subject one | | admin | Test forum name | Test post subject one | Test post message one |
| Message | Test post message one | | admin | Test forum name | Test post subject two | Test post message two |
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject two |
| Message | Test post message two |
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1 And I am on the "Test forum name" "forum activity" page logged in as student1
And I can subscribe to this forum And I can subscribe to this forum
And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject one" "table_row" And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
@ -132,13 +116,10 @@ Feature: A user can control their own subscription preferences for a discussion
And I can subscribe to this forum And I can subscribe to this forum
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row" And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject two" "table_row" And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject two" "table_row"
And I log out And I am on the "Test forum name" "forum activity editing" page logged in as admin
And I am on the "Test forum name" "forum activity" page logged in as admin
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Auto subscription | | Subscription mode | Auto subscription |
And I press "Save and return to course" And I press "Save and return to course"
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1 And I am on the "Test forum name" "forum activity" page logged in as student1
And I can unsubscribe from this forum And I can unsubscribe from this forum
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row" And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
@ -155,17 +136,12 @@ Feature: A user can control their own subscription preferences for a discussion
| course | C1 | | course | C1 |
| idnumber | forum1 | | idnumber | forum1 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| type | general | | type | general |
| forcesubscribe | 0 | | forcesubscribe | 0 |
And I am on "Course 1" course homepage And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Test post subject one | | admin | Test forum name | Test post subject one | Test post message one |
| Message | Test post message one | | admin | Test forum name | Test post subject two | Test post message two |
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject two |
| Message | Test post message two |
And I log out
When I am on the "Test forum name" "forum activity" page logged in as student1 When I am on the "Test forum name" "forum activity" page logged in as student1
And I should see "Subscribe to forum" And I should see "Subscribe to forum"
And I reply "Test post subject one" post from "Test forum name" forum with: And I reply "Test post subject one" post from "Test forum name" forum with:
@ -193,16 +169,12 @@ Feature: A user can control their own subscription preferences for a discussion
| course | C1 | | course | C1 |
| idnumber | forum1 | | idnumber | forum1 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| type | general | | type | general |
| forcesubscribe | 2 | | forcesubscribe | 2 |
And I am on "Course 1" course homepage And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Test post subject one | | admin | Test forum name | Test post subject one | Test post message one |
| Message | Test post message one | | admin | Test forum name | Test post subject two | Test post message two |
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject two |
| Message | Test post message two |
# added for this scenario # added for this scenario
And the following "users" exist: And the following "users" exist:
| username | firstname | lastname | email | | username | firstname | lastname | email |
@ -210,7 +182,6 @@ Feature: A user can control their own subscription preferences for a discussion
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| student2 | C1 | student | | student2 | C1 | student |
And I log out
When I am on the "Test forum name" "forum activity" page logged in as student2 When I am on the "Test forum name" "forum activity" page logged in as student2
And I should see "Unsubscribe from forum" And I should see "Unsubscribe from forum"
And I reply "Test post subject one" post from "Test forum name" forum with: And I reply "Test post subject one" post from "Test forum name" forum with:
@ -234,16 +205,12 @@ Feature: A user can control their own subscription preferences for a discussion
Scenario: A guest should not be able to subscribe to a discussion Scenario: A guest should not be able to subscribe to a discussion
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | section | idnumber | type | | activity | name | course | section | idnumber | type |
| forum | Test forum name | Test forum description | Acceptance test site | 1 | forum1 | general | | forum | Test forum name | Acceptance test site | 1 | forum1 | general |
And I am on site homepage And the following forum discussions exist in course "Acceptance test site":
And I turn editing mode on | user | forum | name | message |
And I add a new discussion to "Test forum name" forum with: | admin | Test forum name | Test post subject one | Test post message one |
| Subject | Test post subject one | When I am on the "Test forum name" "forum activity" page logged in as guest
| Message | Test post message one |
And I log out
When I log in as "guest"
And I follow "Test forum name"
Then "Subscribe to this discussion" "checkbox" should not exist in the "Test post subject one" "table_row" Then "Subscribe to this discussion" "checkbox" should not exist in the "Test post subject one" "table_row"
And "Unsubscribe from this discussion" "checkbox" should not exist in the "Test post subject one" "table_row" And "Unsubscribe from this discussion" "checkbox" should not exist in the "Test post subject one" "table_row"
And I follow "Test post subject one" And I follow "Test post subject one"
@ -252,15 +219,13 @@ Feature: A user can control their own subscription preferences for a discussion
Scenario: A user who is not logged in should not be able to subscribe to a discussion Scenario: A user who is not logged in should not be able to subscribe to a discussion
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | section | idnumber | type | | activity | name | course | section | idnumber | type |
| forum | Test forum name | Test forum description | Acceptance test site | 1 | forum1 | general | | forum | Test forum name | Acceptance test site | 1 | forum1 | general |
And I am on site homepage And the following forum discussions exist in course "Acceptance test site":
And I turn editing mode on | user | forum | name | message |
And I add a new discussion to "Test forum name" forum with: | admin | Test forum name | Test post subject one | Test post message one |
| Subject | Test post subject one | When I am on site homepage
| Message | Test post message one | And I follow "Test forum name"
And I log out
When I follow "Test forum name"
Then "Subscribe to this discussion" "checkbox" should not exist in the "Test post subject one" "table_row" Then "Subscribe to this discussion" "checkbox" should not exist in the "Test post subject one" "table_row"
And "Unsubscribe from this discussion" "checkbox" should not exist in the "Test post subject one" "table_row" And "Unsubscribe from this discussion" "checkbox" should not exist in the "Test post subject one" "table_row"
And I follow "Test post subject one" And I follow "Test post subject one"
@ -273,14 +238,11 @@ Feature: A user can control their own subscription preferences for a discussion
| course | C1 | | course | C1 |
| idnumber | forum1 | | idnumber | forum1 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| type | general | | type | general |
| forcesubscribe | 0 | | forcesubscribe | 0 |
And I am on "Course 1" course homepage And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Test post subject one | | admin | Test forum name | Test post subject one | Test post message one |
| Message | Test post message one |
And I log out
When I am on the "Test forum name" "forum activity" page logged in as student1 When I am on the "Test forum name" "forum activity" page logged in as student1
Then "Subscribe to forum" "link" should exist Then "Subscribe to forum" "link" should exist
And I follow "Test post subject one" And I follow "Test post subject one"

View file

@ -15,10 +15,9 @@ Feature: Students can edit or delete their forum posts within a set time limit
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | | activity | name | course | idnumber |
| forum | Test forum name | Test forum description | C1 | forum | | forum | Test forum name | C1 | forum |
And I log in as "student1" And I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
And I add a new discussion to "Test forum name" forum with: And I add a new discussion to "Test forum name" forum with:
| Subject | Forum post subject | | Subject | Forum post subject |
| Message | This is the body | | Message | This is the body |
@ -48,9 +47,7 @@ Feature: Students can edit or delete their forum posts within a set time limit
| maxeditingtime | 1 | | maxeditingtime | 1 |
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add the "Recent activity" block And I add the "Recent activity" block
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
And I should see "New forum posts:" in the "Recent activity" "block" And I should see "New forum posts:" in the "Recent activity" "block"
And I should see "Forum post subject" in the "Recent activity" "block" And I should see "Forum post subject" in the "Recent activity" "block"
When I wait "2" seconds When I wait "2" seconds

View file

@ -17,25 +17,17 @@ Feature: Teachers can edit or delete any forum post
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | section | idnumber | | activity | name | course | idnumber |
| forum | Test forum name | Test forum description | C1 | 1 | forum1 | | forum | Test forum name | C1 | forum1 |
And I log in as "teacher1" And the following "mod_forum > discussions" exist:
And I am on "Course 1" course homepage | forum | course | user | name | message |
And I add a new discussion to "Test forum name" forum with: | forum1 | C1 | teacher1 | Teacher post subject | Teacher post message |
| Subject | Teacher post subject | And the following "mod_forum > posts" exist:
| Message | Teacher post message | | user | parentsubject | subject | message |
And I log out | student1 | Teacher post subject | Student post subject | Student post message |
And I log in as "student1"
And I am on "Course 1" course homepage
And I reply "Teacher post subject" post from "Test forum name" forum with:
| Subject | Student post subject |
| Message | Student post message |
Scenario: A teacher can delete another user's posts Scenario: A teacher can delete another user's posts
Given I log out When I am on the "Test forum name" "forum activity" page logged in as teacher1
And I log in as "teacher1"
When I am on "Course 1" course homepage
And I follow "Test forum name"
And I follow "Teacher post subject" And I follow "Teacher post subject"
And I click on "Delete" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element" And I click on "Delete" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element"
And I press "Continue" And I press "Continue"
@ -43,10 +35,7 @@ Feature: Teachers can edit or delete any forum post
And I should not see "Student post message" And I should not see "Student post message"
Scenario: A teacher can edit another user's posts Scenario: A teacher can edit another user's posts
Given I log out When I am on the "Test forum name" "forum activity" page logged in as teacher1
And I log in as "teacher1"
When I am on "Course 1" course homepage
And I follow "Test forum name"
And I follow "Teacher post subject" And I follow "Teacher post subject"
And I click on "Edit" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element" And I click on "Edit" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element"
And I set the following fields to these values: And I set the following fields to these values:
@ -57,7 +46,7 @@ Feature: Teachers can edit or delete any forum post
And I should see "Edited by Teacher 1 - original submission" And I should see "Edited by Teacher 1 - original submission"
Scenario: A student can't edit or delete another user's posts Scenario: A student can't edit or delete another user's posts
When I follow "Test forum name" When I am on the "Test forum name" "forum activity" page logged in as student1
And I follow "Teacher post subject" And I follow "Teacher post subject"
Then I should not see "Edit" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element" Then I should not see "Edit" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element"
And I should not see "Delete" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element" And I should not see "Delete" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element"

View file

@ -20,11 +20,9 @@ Feature: Edited forum posts handle tags correctly
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| name | Test forum name | | name | Test forum name |
And I am on the "Course 1" Course page logged in as teacher1 And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Teacher post subject | | teacher1 | Test forum name | Teacher post subject | Teacher post message |
| Message | Teacher post message |
And I log out
@javascript @javascript
Scenario: Forum post edition of custom tags works as expected Scenario: Forum post edition of custom tags works as expected
@ -46,7 +44,6 @@ Feature: Edited forum posts handle tags correctly
And I follow "Add standard tags" And I follow "Add standard tags"
And I set the field "Enter comma-separated list of new tags" to "OT1, OT2, OT3" And I set the field "Enter comma-separated list of new tags" to "OT1, OT2, OT3"
And I press "Continue" And I press "Continue"
And I log out
And I am on the "Test forum name" "forum activity" page logged in as teacher1 And I am on the "Test forum name" "forum activity" page logged in as teacher1
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"

View file

@ -15,14 +15,12 @@ Feature: A student can favourite a discussion via the forum settings menu
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| name | Test forum name | | name | Test forum name |
And I am on the "Course 1" Course page logged in as admin And the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Discussion 1 | | admin | Test forum name | Discussion 1 | Discussion contents 1, first message |
| Message | Discussion contents 1, first message | And the following forum replies exist in course "Course 1":
And I reply "Discussion 1" post from "Test forum name" forum with: | user | forum | discussion | name | message |
| Subject | Reply 1 to discussion 1 | | admin | Test forum name | Discussion 1 | Reply 1 to discussion 1 | Discussion contents 1, second message |
| Message | Discussion contents 1, second message |
And I log out
Scenario: Student can favourite a discussion from within an individual discussion Scenario: Student can favourite a discussion from within an individual discussion
Given I am on the "Course 1" Course page logged in as student1 Given I am on the "Course 1" Course page logged in as student1

View file

@ -14,7 +14,6 @@ Feature: A teacher or admin can view breadcrumbs in the reply, delete, split, ed
And the following "activity" exists: And the following "activity" exists:
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| intro | Test forum description |
| name | Test forum name | | name | Test forum name |
Scenario: A teacher views add discussion topics advanced page Scenario: A teacher views add discussion topics advanced page
@ -26,8 +25,7 @@ Feature: A teacher or admin can view breadcrumbs in the reply, delete, split, ed
And I should see "Test forum name" in the ".breadcrumb" "css_element" And I should see "Test forum name" in the ".breadcrumb" "css_element"
Scenario: A teacher adds posts and then verifies the breadcrumbs in the links Scenario: A teacher adds posts and then verifies the breadcrumbs in the links
Given I log in as "teacher" Given I am on the "Course 1" course page logged in as teacher
And I am on "Course 1" course homepage
And I add a new discussion to "Test forum name" forum with: And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject one | | Subject | Test post subject one |
| Message | Test post message one | | Message | Test post message one |

View file

@ -21,7 +21,6 @@ Feature: View activity completion in the forum activity
| course | C1 | | course | C1 |
| idnumber | mh1 | | idnumber | mh1 |
| name | Music history | | name | Music history |
| section | 1 |
And I am on the "Music history" "forum activity editing" page logged in as teacher1 And I am on the "Music history" "forum activity editing" page logged in as teacher1
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
@ -36,7 +35,6 @@ Feature: View activity completion in the forum activity
| completionrepliesenabled | 1 | | completionrepliesenabled | 1 |
| completionreplies | 1 | | completionreplies | 1 |
And I press "Save and display" And I press "Save and display"
And I log out
Scenario: View automatic completion items as a teacher Scenario: View automatic completion items as a teacher
When I am on the "Music history" "forum activity" page logged in as teacher1 When I am on the "Music history" "forum activity" page logged in as teacher1
@ -72,14 +70,12 @@ Feature: View activity completion in the forum activity
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done" And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
And the "Post replies: 1" completion condition of "Music history" is displayed as "done" And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo" And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And I log out
# Grade the student # Grade the student
And I am on the "Music history" "forum activity" page logged in as teacher1 And I am on the "Music history" "forum activity" page logged in as teacher1
And I press "Grade users" And I press "Grade users"
And I set the field "grade" to "33" And I set the field "grade" to "33"
And I press "Save" And I press "Save"
And I press "Close grader" And I press "Close grader"
And I log out
# All conditions should now be completed. # All conditions should now be completed.
When I am on the "Music history" "forum activity" page logged in as student1 When I am on the "Music history" "forum activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done" Then the "View" completion condition of "Music history" is displayed as "done"
@ -90,14 +86,12 @@ Feature: View activity completion in the forum activity
@javascript @javascript
Scenario: Use manual completion Scenario: Use manual completion
Given I am on the "Music history" "forum activity" page logged in as teacher1 Given I am on the "Music history" "forum activity editing" page logged in as teacher1
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the field "Completion tracking" to "Students can manually mark the activity as completed" And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
And I press "Save and display" And I press "Save and display"
# Teacher view. # Teacher view.
And the manual completion button for "Music history" should be disabled And the manual completion button for "Music history" should be disabled
And I log out
# Student view. # Student view.
When I am on the "Music history" "forum activity" page logged in as student1 When I am on the "Music history" "forum activity" page logged in as student1
Then the manual completion button of "Music history" is displayed as "Mark as done" Then the manual completion button of "Music history" is displayed as "Mark as done"

View file

@ -16,8 +16,7 @@ Feature: Completion pass grade view activity completion in the forum activity
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
And I log in as "teacher1" And I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
@ -29,9 +28,7 @@ Feature: Completion pass grade view activity completion in the forum activity
| course | C1 | | course | C1 |
| idnumber | mh1 | | idnumber | mh1 |
| name | Music history | | name | Music history |
| section | 1 | And I am on the "Music history" "forum activity editing" page
And I am on the "Music history" "forum activity" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
| Whole forum grading > Type | Point | | Whole forum grading > Type | Point |
@ -47,7 +44,6 @@ Feature: Completion pass grade view activity completion in the forum activity
| completionrepliesenabled | 1 | | completionrepliesenabled | 1 |
| completionreplies | 1 | | completionreplies | 1 |
And I press "Save and display" And I press "Save and display"
And I log out
Scenario: View automatic completion items as a teacher Scenario: View automatic completion items as a teacher
Given I am on the "Music history" "forum activity" page logged in as teacher1 Given I am on the "Music history" "forum activity" page logged in as teacher1
@ -87,14 +83,12 @@ Feature: Completion pass grade view activity completion in the forum activity
And the "Post replies: 1" completion condition of "Music history" is displayed as "done" And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo" 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" And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
# Grade the student # Grade the student
And I am on the "Music history" "forum activity" page logged in as teacher1 And I am on the "Music history" "forum activity" page logged in as teacher1
And I press "Grade users" And I press "Grade users"
And I set the field "grade" to "33" And I set the field "grade" to "33"
And I press "Save" And I press "Save"
And I press "Close grader" And I press "Close grader"
And I log out
# All conditions should now be completed. # All conditions should now be completed.
When I am on the "Music history" "forum activity" page logged in as student1 When I am on the "Music history" "forum activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done" Then the "View" completion condition of "Music history" is displayed as "done"
@ -133,14 +127,12 @@ Feature: Completion pass grade view activity completion in the forum activity
And the "Post replies: 1" completion condition of "Music history" is displayed as "done" And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo" 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" And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
# Grade the student # Grade the student
And I am on the "Music history" "forum activity" page logged in as teacher1 And I am on the "Music history" "forum activity" page logged in as teacher1
And I press "Grade users" And I press "Grade users"
And I set the field "grade" to "60" And I set the field "grade" to "60"
And I press "Save" And I press "Save"
And I press "Close grader" And I press "Close grader"
And I log out
# All conditions should now be completed. # All conditions should now be completed.
When I am on the "Music history" "forum activity" page logged in as student1 When I am on the "Music history" "forum activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done" Then the "View" completion condition of "Music history" is displayed as "done"

View file

@ -18,8 +18,8 @@ Feature: Export forum
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | type | course | idnumber | | activity | name | type | course | idnumber |
| forum | Test forum 1 | Test forum 1 description | general | C1 | 123 | | forum | Test forum 1 | general | C1 | 123 |
Scenario: Teacher can export forum Scenario: Teacher can export forum
Given I am on the "Test forum 1" "forum activity" page logged in as teacher1 Given I am on the "Test forum 1" "forum activity" page logged in as teacher1
@ -30,12 +30,10 @@ Feature: Export forum
And I should not see "Student 2" in the ".form-autocomplete-suggestions" "css_element" And I should not see "Student 2" in the ".form-autocomplete-suggestions" "css_element"
# This will fail if an exception is thrown. This is the best we can do without the ability to use the download. Hence, there is no "Then" step. # This will fail if an exception is thrown. This is the best we can do without the ability to use the download. Hence, there is no "Then" step.
And I click on "Export" "button" And I click on "Export" "button"
And I log out
Scenario: Students cannot export forum by default Scenario: Students cannot export forum by default
Given I am on the "Test forum 1" "forum activity" page logged in as student1 Given I am on the "Test forum 1" "forum activity" page logged in as student1
Then "Export" "link" should not exist in current page administration Then "Export" "link" should not exist in current page administration
And I log out
Scenario: User with the capability can export Scenario: User with the capability can export
Given the following "permission overrides" exist: Given the following "permission overrides" exist:

View file

@ -14,7 +14,6 @@ Feature: A teacher or admin can view subscriptions tab
And the following "activity" exists: And the following "activity" exists:
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| intro | Test forum description |
| name | Test forum name | | name | Test forum name |
Scenario: A teacher views view subscribers by default and views the Subscribers heading Scenario: A teacher views view subscribers by default and views the Subscribers heading

View file

@ -14,7 +14,6 @@ Feature: A teacher or admin when changes the subscription mode should land in th
And the following "activity" exists: And the following "activity" exists:
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| intro | Test forum description |
| name | Test forum name | | name | Test forum name |
Scenario: A teacher views subscriptions tab and changes the subscriptions mode to forced mode and lands in subscription tab Scenario: A teacher views subscriptions tab and changes the subscriptions mode to forced mode and lands in subscription tab

View file

@ -14,84 +14,42 @@ Feature: A user can control their own subscription preferences for a forum
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist:
| activity | course | idnumber | name | type |
| forum | C1 | forum1 | Test forum name | general |
And the following "mod_forum > discussions" exist:
| forum | course | user | name | message |
| forum1 | C1 | admin | Test post subject | Test post message |
And I log in as "admin" And I log in as "admin"
Scenario: A disallowed subscription forum cannot be subscribed to Scenario: A disallowed subscription forum cannot be subscribed to
Given the following "activity" exists: Given I am on the "Test forum name" "forum activity editing" page
| activity | forum |
| course | C1 |
| idnumber | forum1 |
| name | Test forum name |
| intro | Test forum description |
| type | general |
| section | 1 |
And I am on "Course 1" course homepage
Given I follow "Test forum name"
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Subscription disabled | | Subscription mode | Subscription disabled |
And I press "Save and return to course" And I press "Save and return to course"
And I add a new discussion to "Test forum name" forum with: When I am on the "Test forum name" "forum activity" page logged in as student1
| Subject | Test post subject |
| Message | Test post message |
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test forum name"
Then I should not see "Subscribe to this forum" Then I should not see "Subscribe to this forum"
And I should not see "Unsubscribe from this forum" And I should not see "Unsubscribe from this forum"
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row" And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row"
And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row" And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row"
Scenario: A forced subscription forum cannot be subscribed to Scenario: A forced subscription forum cannot be subscribed to
Given the following "activity" exists: Given I am on the "Test forum name" "forum activity editing" page
| activity | forum |
| course | C1 |
| idnumber | forum1 |
| name | Test forum name |
| intro | Test forum description |
| type | general |
| section | 1 |
And I am on "Course 1" course homepage
Given I follow "Test forum name"
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Forced subscription | | Subscription mode | Forced subscription |
And I press "Save and return to course" And I press "Save and return to course"
And I add a new discussion to "Test forum name" forum with: When I am on the "Test forum name" "forum activity" page logged in as student1
| Subject | Test post subject |
| Message | Test post message |
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test forum name"
Then I should not see "Subscribe to this forum" Then I should not see "Subscribe to this forum"
And I should not see "Unsubscribe from this forum" And I should not see "Unsubscribe from this forum"
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row" And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row"
And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row" And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row"
Scenario: An optional forum can be subscribed to Scenario: An optional forum can be subscribed to
Given the following "activity" exists: Given I am on the "Test forum name" "forum activity editing" page
| activity | forum |
| course | C1 |
| idnumber | forum1 |
| name | Test forum name |
| intro | Test forum description |
| type | general |
| section | 1 |
And I am on "Course 1" course homepage
Given I follow "Test forum name"
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Optional subscription | | Subscription mode | Optional subscription |
And I press "Save and return to course" And I press "Save and return to course"
And I add a new discussion to "Test forum name" forum with: When I am on the "Test forum name" "forum activity" page logged in as student1
| Subject | Test post subject |
| Message | Test post message |
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test forum name"
Then I should see "Subscribe to forum" Then I should see "Subscribe to forum"
And I should not see "Unsubscribe from forum" And I should not see "Unsubscribe from forum"
And I follow "Subscribe to forum" And I follow "Subscribe to forum"
@ -100,27 +58,11 @@ Feature: A user can control their own subscription preferences for a forum
And I should not see "Subscribe to forum" And I should not see "Subscribe to forum"
Scenario: An Automatic forum can be unsubscribed from Scenario: An Automatic forum can be unsubscribed from
Given the following "activity" exists: Given I am on the "Test forum name" "forum activity editing" page
| activity | forum |
| course | C1 |
| idnumber | forum1 |
| name | Test forum name |
| intro | Test forum description |
| type | general |
| section | 1 |
And I am on "Course 1" course homepage
Given I follow "Test forum name"
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Auto subscription | | Subscription mode | Auto subscription |
And I press "Save and return to course" And I press "Save and return to course"
And I add a new discussion to "Test forum name" forum with: When I am on the "Test forum name" "forum activity" page logged in as student1
| Subject | Test post subject |
| Message | Test post message |
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test forum name"
Then I should see "Unsubscribe from forum" Then I should see "Unsubscribe from forum"
And I should not see "Subscribe to forum" And I should not see "Subscribe to forum"
And I follow "Unsubscribe from forum" And I follow "Unsubscribe from forum"

View file

@ -34,17 +34,17 @@ Feature: As a teacher I need to see an accurate list of subscribed users
And the following "grouping groups" exist: And the following "grouping groups" exist:
| grouping | group | | grouping | group |
| GG1 | G1 | | GG1 | G1 |
And the following "activities" exist:
| activity | course | idnumber | type | name | forcesubscribe |
| forum | C1 | 1 | general | Forced Forum 1 | 1 |
| forum | C1 | 0001 | general | Forced Forum 2 | |
| forum | C1 | 0002 | general | Forced Forum 3 | 2 |
And I log in as "teacher" And I log in as "teacher"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
@javascript @javascript
Scenario: A forced forum lists all subscribers Scenario: A forced forum lists all subscribers
When I add a "Forum" to section "1" and I fill the form with: When I am on the "Forced Forum 1" "forum activity" page
| Forum name | Forced Forum 1 |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Forced subscription |
And I am on the "Forced Forum 1" "forum activity" page
And I navigate to "Subscriptions" in current page administration And I navigate to "Subscriptions" in current page administration
Then I should see "Student 1" Then I should see "Student 1"
And I should see "Teacher Teacher" And I should see "Teacher Teacher"
@ -63,16 +63,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users
And I should not see "Student 3" And I should not see "Student 3"
Scenario: A forced forum does not allow to edit the subscribers Scenario: A forced forum does not allow to edit the subscribers
Given the following "activity" exists: Given I am on the "Forced Forum 2" "forum activity editing" page
| activity | forum |
| name | Forced Forum 2 |
| intro | Test forum description |
| type | general |
| course | C1 |
| idnumber | 0001 |
| section | 1 |
And I am on the "Forced Forum 2" "forum activity" page
And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Forced subscription | | Subscription mode | Forced subscription |
| Availability | Show on course page | | Availability | Show on course page |
@ -85,16 +76,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users
And I should see "Student 3" And I should see "Student 3"
Scenario: A forced and hidden forum lists only teachers Scenario: A forced and hidden forum lists only teachers
Given the following "activity" exists: Given I am on the "Forced Forum 2" "forum activity editing" page
| activity | forum |
| name | Forced Forum 2 |
| intro | Test forum description |
| type | general |
| course | C1 |
| idnumber | 0001 |
| section | 1 |
And I am on "Course 1" course homepage
And I am on the "Forced Forum 2" "forum activity editing" page
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Forced subscription | | Subscription mode | Forced subscription |
| Availability | Hide on course page | | Availability | Hide on course page |
@ -108,19 +90,13 @@ Feature: As a teacher I need to see an accurate list of subscribed users
@javascript @javascript
Scenario: An automatic forum lists all subscribers Scenario: An automatic forum lists all subscribers
When I add a "Forum" to section "1" and I fill the form with: When I am on the "Forced Forum 3" "forum activity" page
| Forum name | Forced Forum 1 |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Auto subscription |
And I am on the "Forced Forum 1" "forum activity" page
And I navigate to "Subscriptions" in current page administration And I navigate to "Subscriptions" in current page administration
Then I should see "Student 1" Then I should see "Student 1"
And I should see "Teacher Teacher" And I should see "Teacher Teacher"
And I should see "Student 2" And I should see "Student 2"
And I should see "Student 3" And I should see "Student 3"
And I am on "Course 1" course homepage And I am on the "Forced Forum 3" "forum activity editing" page
And I am on the "Forced Forum 1" "forum activity editing" page
And I expand all fieldsets And I expand all fieldsets
And I click on "Add restriction..." "button" And I click on "Add restriction..." "button"
And I click on "Grouping" "button" in the "Add restriction..." "dialogue" And I click on "Grouping" "button" in the "Add restriction..." "dialogue"

View file

@ -17,36 +17,31 @@ Feature: A user can control their default discussion subscription settings
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | type | section | | activity | name | course | idnumber | type |
| forum | Test forum name | Test forum description | C1 | forump1 | general | 1 | | forum | Test forum name | C1 | forump1 | general |
And I am on the "Test forum name" "forum activity editing" page logged in as admin And I am on the "Test forum name" "forum activity editing" page logged in as admin
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Optional subscription | | Subscription mode | Optional subscription |
And I press "Save and return to course" And I press "Save and return to course"
And I log out
Scenario: Creating a new discussion in an optional forum follows user preferences Scenario: Creating a new discussion in an optional forum follows user preferences
Given I am on the "Test forum name" "forum activity" page logged in as student1 Given I am on the "Test forum name" "forum activity" page logged in as student1
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student2 And I am on the "Test forum name" "forum activity" page logged in as student2
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist
Scenario: Replying to an existing discussion in an optional forum follows user preferences Scenario: Replying to an existing discussion in an optional forum follows user preferences
Given I am on the "Test forum name" "forum activity" page logged in as admin Given the following forum discussions exist in course "Course 1":
And I add a new discussion to "Test forum name" forum with: | user | forum | name | message |
| Subject | Test post subject | | admin | Test forum name | Test post subject | Test post message |
| Message | Test post message |
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1 And I am on the "Test forum name" "forum activity" page logged in as student1
And I follow "Test post subject" And I follow "Test post subject"
When I follow "Reply" When I follow "Reply"
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student2 And I am on the "Test forum name" "forum activity" page logged in as student2
And I follow "Test post subject" And I follow "Test post subject"
And I follow "Reply" And I follow "Reply"
@ -57,31 +52,27 @@ Feature: A user can control their default discussion subscription settings
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Auto subscription | | Subscription mode | Auto subscription |
And I press "Save and return to course" And I press "Save and return to course"
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1 And I am on the "Test forum name" "forum activity" page logged in as student1
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student2 And I am on the "Test forum name" "forum activity" page logged in as student2
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
Scenario: Replying to an existing discussion in an automatic forum follows forum subscription Scenario: Replying to an existing discussion in an automatic forum follows forum subscription
Given I am on the "Test forum name" "forum activity editing" page logged in as admin Given the following forum discussions exist in course "Course 1":
| user | forum | name | message |
| admin | Test forum name | Test post subject | Test post message |
And I am on the "Test forum name" "forum activity editing" page logged in as admin
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Optional subscription | | Subscription mode | Optional subscription |
And I press "Save and return to course" And I press "Save and return to course"
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1 And I am on the "Test forum name" "forum activity" page logged in as student1
And I follow "Test post subject" And I follow "Test post subject"
When I follow "Reply" When I follow "Reply"
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student2 And I am on the "Test forum name" "forum activity" page logged in as student2
And I follow "Test post subject" And I follow "Test post subject"
And I follow "Reply" And I follow "Reply"
@ -89,21 +80,19 @@ Feature: A user can control their default discussion subscription settings
@javascript @javascript
Scenario: Replying to an existing discussion in an automatic forum which has been unsubscribed from follows user preferences Scenario: Replying to an existing discussion in an automatic forum which has been unsubscribed from follows user preferences
Given I am on the "Test forum name" "forum activity editing" page logged in as admin Given the following forum discussions exist in course "Course 1":
| user | forum | name | message |
| admin | Test forum name | Test post subject | Test post message |
And I am on the "Test forum name" "forum activity editing" page logged in as admin
And I set the following fields to these values: And I set the following fields to these values:
| Subscription mode | Auto subscription | | Subscription mode | Auto subscription |
And I press "Save and return to course" And I press "Save and return to course"
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student1 And I am on the "Test forum name" "forum activity" page logged in as student1
And I click on "input[id^=subscription-toggle]" "css_element" in the "Test post subject" "table_row" And I click on "input[id^=subscription-toggle]" "css_element" in the "Test post subject" "table_row"
And I follow "Test post subject" And I follow "Test post subject"
When I follow "Reply" When I follow "Reply"
And I click on "Advanced" "button" And I click on "Advanced" "button"
And "input[name=discussionsubscribe][checked]" "css_element" should exist And "input[name=discussionsubscribe][checked]" "css_element" should exist
And I log out
And I am on the "Test forum name" "forum activity" page logged in as student2 And I am on the "Test forum name" "forum activity" page logged in as student2
And I click on "input[id^=subscription-toggle]" "css_element" in the "Test post subject" "table_row" And I click on "input[id^=subscription-toggle]" "css_element" in the "Test post subject" "table_row"
And I follow "Test post subject" And I follow "Test post subject"

View file

@ -24,11 +24,8 @@ Feature: A teacher can control the subscription to a forum
| activity | forum | | activity | forum |
| course | C1 | | course | C1 |
| idnumber | f01 | | idnumber | f01 |
| intro | Test forum description |
| name | Test forum name | | name | Test forum name |
When I log in as "teacher" When I am on the "Test forum name" "forum activity" page logged in as teacher
And I am on "Course 1" course homepage
And I follow "Test forum name"
And I navigate to "Subscriptions" in current page administration And I navigate to "Subscriptions" in current page administration
Then I select "Manage subscribers" from the "Subscribers" singleselect Then I select "Manage subscribers" from the "Subscribers" singleselect
And "Add" "button" should exist And "Add" "button" should exist

View file

@ -19,15 +19,12 @@ Feature: Changes to the subscription mode of a forum can change subcribers of a
| activity | forum | | activity | forum |
| idnumber | f01 | | idnumber | f01 |
| course | C1 | | course | C1 |
| intro | Test forum description |
| name | Test forum name | | name | Test forum name |
| type | general | | type | general |
| forcesubscribe | 1 | | forcesubscribe | 1 |
And I log in as "teacher"
And I am on "Course 1" course homepage
Scenario: A change from Forced subscription to Auto subcription causes all participants to be subscribed Scenario: A change from Forced subscription to Auto subcription causes all participants to be subscribed
Given I follow "Test forum name" Given I am on the "Test forum name" "forum activity" page logged in as teacher
And I navigate to "Subscriptions" in current page administration And I navigate to "Subscriptions" in current page administration
When I select "Auto subscription" from the "Subscription mode" singleselect When I select "Auto subscription" from the "Subscription mode" singleselect
Then I should not see "There are no subscribers yet for this forum" Then I should not see "There are no subscribers yet for this forum"

View file

@ -23,17 +23,18 @@ Feature: I can grade a students interaction across a forum
And the following "scales" exist: And the following "scales" exist:
| name | scale | | name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent | | Test Scale 1 | Disappointing, Good, Very good, Excellent |
And the following "activity" exists:
| activity | forum |
| course | C1 |
| idnumber | 0001 |
| name | Test Forum 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I change window size to "large" And I change window size to "large"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage with editing mode on
And I turn editing mode on
Scenario: Ensure that forum grade settings do not leak to Ratings Scenario: Ensure that forum grade settings do not leak to Ratings
Given I add a "Forum" to section "1" Given I am on the "Test Forum 1" "forum activity editing" page
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values:
| Forum name | Test Forum 1 |
| Description | Test |
# Fields should be hidden when grading is not set. # Fields should be hidden when grading is not set.
When I set the field "Whole forum grading > Type" to "None" When I set the field "Whole forum grading > Type" to "None"
@ -59,7 +60,6 @@ Feature: I can grade a students interaction across a forum
And I set the field "Whole forum grading > Grade to pass" to "4" And I set the field "Whole forum grading > Grade to pass" to "4"
When I press "Save and return to course" When I press "Save and return to course"
And I navigate to "View > Grader report" in the course gradebook And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
# There shouldn't be any Ratings grade item. # There shouldn't be any Ratings grade item.
Then I should see "Test Forum 1 whole forum" Then I should see "Test Forum 1 whole forum"
@ -74,11 +74,8 @@ Feature: I can grade a students interaction across a forum
And I should see "Tutor" in the "Parent category" "fieldset" And I should see "Tutor" in the "Parent category" "fieldset"
Scenario: Ensure that Ratings settings do not leak to Forum grading Scenario: Ensure that Ratings settings do not leak to Forum grading
Given I add a "Forum" to section "1" Given I am on the "Test Forum 1" "forum activity editing" page
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values:
| Forum name | Test Forum 1 |
| Description | Test |
# Fields should be hidden when grading is not set. # Fields should be hidden when grading is not set.
When I set the field "Ratings > Aggregate type" to "No ratings" When I set the field "Ratings > Aggregate type" to "No ratings"
@ -130,17 +127,9 @@ Feature: I can grade a students interaction across a forum
And I should see "Tutor" in the "Parent category" "fieldset" And I should see "Tutor" in the "Parent category" "fieldset"
Scenario: Setting both a rating and a whole forum grade does not bleed Scenario: Setting both a rating and a whole forum grade does not bleed
Given the following "activity" exists: Given I am on the "Test Forum 1" "forum activity editing" page
| activity | forum |
| course | C1 |
| idnumber | 0001 |
| name | Test Forum 1 |
| intro | Test |
| section | 1 |
And I am on "Course 1" course homepage
And I follow "Test Forum 1"
And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the field "Ratings > Aggregate type" to "Count of ratings" And I set the field "Ratings > Aggregate type" to "Count of ratings"
And I set the field "Ratings > Type" to "Point" And I set the field "Ratings > Type" to "Point"
And I set the field "Ratings > Maximum grade" to "100" And I set the field "Ratings > Maximum grade" to "100"
@ -152,7 +141,6 @@ Feature: I can grade a students interaction across a forum
And I set the field "Whole forum grading > Grade to pass" to "4" And I set the field "Whole forum grading > Grade to pass" to "4"
And I press "Save and return to course" And I press "Save and return to course"
And I navigate to "View > Grader report" in the course gradebook And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
# There shouldn't be any Whole forum grade gradeitem. # There shouldn't be any Whole forum grade gradeitem.
Then I should see "Test Forum 1 rating" Then I should see "Test Forum 1 rating"

View file

@ -22,7 +22,6 @@ Feature: View discussion while grading in a forum
And the following "activity" exists: And the following "activity" exists:
| activity | forum | | activity | forum |
| name | Gradable forum | | name | Gradable forum |
| intro | Standard forum description |
| course | C1 | | course | C1 |
| idnumber | forum1 | | idnumber | forum1 |
| grade_forum | 100 | | grade_forum | 100 |

View file

@ -26,13 +26,11 @@ Feature: Forums in 'No groups' mode allow posting to All participants for all us
| teacher1 | G2 | | teacher1 | G2 |
| student1 | G1 | | student1 | G1 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Standard forum name | Standard forum description | C1 | nogroups | 0 | | forum | Standard forum name | C1 | nogroups | 0 |
Scenario: Teacher can post Scenario: Teacher can post
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
And I should not see "Group A" And I should not see "Group A"
And I should not see "Group B" And I should not see "Group B"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
@ -46,9 +44,7 @@ Feature: Forums in 'No groups' mode allow posting to All participants for all us
And I should see "Teacher 1 -> Forum" And I should see "Teacher 1 -> Forum"
Scenario: Student can post Scenario: Student can post
Given I log in as "student1" Given I am on the "Standard forum name" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
And I should not see "Group A" And I should not see "Group A"
And I should not see "Group B" And I should not see "Group B"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"

View file

@ -22,8 +22,8 @@ Feature: Inline editing H5P content in mod_forum
| contextlevel | reference | contenttype | user | contentname | filepath | | contextlevel | reference | contenttype | user | contentname | filepath |
| Course | C1 | contenttype_h5p | admin | Greeting card | /h5p/tests/fixtures/greeting-card.h5p | | Course | C1 | contenttype_h5p | admin | Greeting card | /h5p/tests/fixtures/greeting-card.h5p |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | introformat | course | content | contentformat | idnumber | | activity | name | introformat | course | content | contentformat | idnumber |
| forum | ForumName1 | PageDesc1 | 1 | C1 | H5Ptest | 1 | 1 | | forum | ForumName1 | 1 | C1 | H5Ptest | 1 | 1 |
And the "displayh5p" filter is "on" And the "displayh5p" filter is "on"
# Override this capability to let teachers and students to Turn editing on. # Override this capability to let teachers and students to Turn editing on.
And the following "permission overrides" exist: And the following "permission overrides" exist:
@ -33,10 +33,8 @@ Feature: Inline editing H5P content in mod_forum
@javascript @repository_contentbank @javascript @repository_contentbank
Scenario: Edit H5P content from a forum intro using copy to content bank file Scenario: Edit H5P content from a forum intro using copy to content bank file
Given I am on the "C1" "Course" page logged in as "admin" Given I am on the "ForumName1" "forum activity editing" page logged in as admin
# Add H5P content to the forum description. # Add H5P content to the forum description.
And I am on the "ForumName1" "forum activity" page
And I navigate to "Settings" in current page administration
And I click on "Insert H5P" "button" in the "#fitem_id_introeditor" "css_element" And I click on "Insert H5P" "button" in the "#fitem_id_introeditor" "css_element"
And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue" And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
And I select "Content bank" repository in file picker And I select "Content bank" repository in file picker
@ -63,23 +61,20 @@ Feature: Inline editing H5P content in mod_forum
And I log out And I log out
# Check teacher2 (non-editing teacher) can't see the Edit button, because she can't edit the forum activity. # Check teacher2 (non-editing teacher) can't see the Edit button, because she can't edit the forum activity.
And I log in as "teacher2" And I log in as "teacher2"
And I turn editing mode on And I am on "Course 1" course homepage with editing mode on
And I am on "Course 1" course homepage
And I am on the "ForumName1" "forum activity" page And I am on the "ForumName1" "forum activity" page
And I should not see "Edit H5P content" And I should not see "Edit H5P content"
And I log out And I log out
# Check student1 can't see the Edit button. # Check student1 can't see the Edit button.
And I log in as "student1" And I log in as "student1"
And I turn editing mode on And I am on "Course 1" course homepage with editing mode on
And I am on "Course 1" course homepage
And I am on the "ForumName1" "forum activity" page And I am on the "ForumName1" "forum activity" page
And I should not see "Edit H5P content" And I should not see "Edit H5P content"
@javascript @repository_contentbank @javascript @repository_contentbank
Scenario: Edit H5P content from a forum post Scenario: Edit H5P content from a forum post
Given I am on the "C1" "Course" page logged in as "admin" Given I am on the "ForumName1" "forum activity" page logged in as admin
# Add H5P content to a forum post as admin. # Add H5P content to a forum post as admin.
And I am on the "ForumName1" "forum activity" page
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I set the following fields to these values: And I set the following fields to these values:
| Subject | Forum post by admin | | Subject | Forum post by admin |
@ -111,16 +106,14 @@ Feature: Inline editing H5P content in mod_forum
And I log out And I log out
# Check teacher2 (non-editing teacher) can see the Edit button because she can edit the post too. # Check teacher2 (non-editing teacher) can see the Edit button because she can edit the post too.
And I log in as "teacher2" And I log in as "teacher2"
And I turn editing mode on And I am on "Course 1" course homepage with editing mode on
And I am on "Course 1" course homepage
And I am on the "ForumName1" "forum activity" page And I am on the "ForumName1" "forum activity" page
And I follow "Forum post by admin" And I follow "Forum post by admin"
And I should see "Edit H5P content" And I should see "Edit H5P content"
And I log out And I log out
# Check student1 can't see the Edit button. # Check student1 can't see the Edit button.
And I log in as "student1" And I log in as "student1"
And I turn editing mode on And I am on "Course 1" course homepage with editing mode on
And I am on "Course 1" course homepage
And I am on the "ForumName1" "forum activity" page And I am on the "ForumName1" "forum activity" page
And I follow "Forum post by admin" And I follow "Forum post by admin"
And I should not see "Edit H5P content" And I should not see "Edit H5P content"

View file

@ -13,35 +13,30 @@ Feature: Students can reply to a discussion in page.
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
And I log in as "teacher1" And the following "activity" exists:
And I am on "Course 1" course homepage with editing mode on | activity | forum |
And I add a "Forum" to section "1" and I fill the form with: | course | C1 |
| Forum name | Test forum name | | idnumber | 0001 |
| Description | Test forum description | | name | Test forum name |
And I add a new discussion to "Test forum name" forum with: And the following "mod_forum > discussions" exist:
| Subject | Discussion 1 | | forum | course | user | name | message |
| Message | Discussion contents 1, first message | | 0001 | C1 | teacher1 | Discussion 1 | Discussion contents 1, first message |
And I add a new discussion to "Test forum name" forum with: | 0001 | C1 | teacher1 | Discussion 2 | Discussion contents 2, first message |
| Subject | Discussion 2 |
| Message | Discussion contents 2, first message |
And I log out
Scenario: Confirm inpage replies work Scenario: Confirm inpage replies work
Given I log in as "student1" Given I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage When I reply "Discussion 2" post from "Test forum name" forum using an inpage reply with:
Given I reply "Discussion 2" post from "Test forum name" forum using an inpage reply with:
| post | Discussion contents 1, third message | | post | Discussion contents 1, third message |
Then I should see "Discussion contents 1, third message" Then I should see "Discussion contents 1, third message"
When I reload the page And I reload the page
Then I should see "Discussion contents 1, third message" And I should see "Discussion contents 1, third message"
Scenario: Confirm inpage replies work - private reply Scenario: Confirm inpage replies work - private reply
Given I log in as "teacher1" Given I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage When I reply "Discussion 2" post from "Test forum name" forum using an inpage reply with:
And I reply "Discussion 2" post from "Test forum name" forum using an inpage reply with:
| post | Discussion contents 1, third message | | post | Discussion contents 1, third message |
| privatereply | 1 | | privatereply | 1 |
Then I should see "Discussion contents 1, third message" Then I should see "Discussion contents 1, third message"
Then I should see "This is a private reply. (Teachers and other users with the capability to view private replies can also see it.)" And I should see "This is a private reply. (Teachers and other users with the capability to view private replies can also see it.)"
When I reload the page And I reload the page
Then I should see "Discussion contents 1, third message" And I should see "Discussion contents 1, third message"

View file

@ -19,19 +19,13 @@ Feature: A teacher can move discussions between forums
Scenario: A teacher can move discussions Scenario: A teacher can move discussions
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Test forum 1 | Test forum 2 | C1 | forum | 0 | | forum | Test forum 1 | C1 | forum | 0 |
| forum | Test forum 2 | Test forum 1 | C1 | forum | 0 | | forum | Test forum 2 | C1 | forum | 0 |
And I log in as "student1" And the following forum discussions exist in course "Course 1":
And I am on "Course 1" course homepage | user | forum | name | message |
And I follow "Test forum 1" | student1 | Test forum 1 | Discussion 1 | Test post message |
And I add a new discussion to "Test forum 1" forum with: And I am on the "Test forum 1" "forum activity" page logged in as teacher1
| Subject | Discussion 1 |
| Message | Test post message |
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test forum 1"
And I follow "Discussion 1" And I follow "Discussion 1"
When I set the field "jump" to "Test forum 2" When I set the field "jump" to "Test forum 2"
And I press "Move" And I press "Move"

View file

@ -15,15 +15,15 @@ Feature: A user can view their posts and discussions
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Test forum name | Test forum | C1 | forum | 0 | | forum | Test forum name | C1 | forum | 0 |
And the following forum discussions exist in course "Course 1":
| user | forum | name | message |
| student1 | Test forum name | Forum discussion 1 | How awesome is this forum discussion? |
And the following forum replies exist in course "Course 1":
| user | forum | discussion | message |
| student1 | Test forum name | Forum discussion 1 | Actually, I've seen better. |
And I log in as "student1" And I log in as "student1"
And I am on "Course 1" course homepage
And I add a new discussion to "Test forum name" forum with:
| Subject | Forum discussion 1 |
| Message | How awesome is this forum discussion? |
And I reply "Forum discussion 1" post from "Test forum name" forum with:
| Message | Actually, I've seen better. |
When I follow "Profile" in the user menu When I follow "Profile" in the user menu
And I follow "Forum posts" And I follow "Forum posts"
Then I should see "How awesome is this forum discussion?" Then I should see "How awesome is this forum discussion?"

View file

@ -14,15 +14,13 @@ Feature: Posting to forums in a course with no groups behaves correctly
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Standard forum | Standard forum description | C1 | nogroups | 0 | | forum | Standard forum | C1 | nogroups | 0 |
| forum | Visible forum | Visible forum description | C1 | visgroups | 2 | | forum | Visible forum | C1 | visgroups | 2 |
| forum | Separate forum | Separate forum description | C1 | sepgroups | 1 | | forum | Separate forum | C1 | sepgroups | 1 |
Scenario: Teachers can post in standard forum Scenario: Teachers can post in standard forum
Given I log in as "teacher1" Given I am on the "Standard forum" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
Then I should not see "Post a copy to all groups" Then I should not see "Post a copy to all groups"
And I set the following fields to these values: And I set the following fields to these values:
@ -33,9 +31,7 @@ Feature: Posting to forums in a course with no groups behaves correctly
And I should see "Teacher -> All participants" And I should see "Teacher -> All participants"
Scenario: Teachers can post in forum with separate groups Scenario: Teachers can post in forum with separate groups
Given I log in as "teacher1" Given I am on the "Separate forum" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Separate forum"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
Then I should not see "Post a copy to all groups" Then I should not see "Post a copy to all groups"
And I set the following fields to these values: And I set the following fields to these values:
@ -46,9 +42,7 @@ Feature: Posting to forums in a course with no groups behaves correctly
And I should see "Teacher -> All participants" And I should see "Teacher -> All participants"
Scenario: Teachers can post in forum with visible groups Scenario: Teachers can post in forum with visible groups
Given I log in as "teacher1" Given I am on the "Visible forum" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Visible forum"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
Then I should not see "Post a copy to all groups" Then I should not see "Post a copy to all groups"
And I set the following fields to these values: And I set the following fields to these values:
@ -59,9 +53,7 @@ Feature: Posting to forums in a course with no groups behaves correctly
And I should see "Teacher -> All participants" And I should see "Teacher -> All participants"
Scenario: Students can post in standard forum Scenario: Students can post in standard forum
Given I log in as "student1" Given I am on the "Standard forum" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
And I follow "Standard forum"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
Then I should not see "Post a copy to all groups" Then I should not see "Post a copy to all groups"
And I set the following fields to these values: And I set the following fields to these values:
@ -72,15 +64,11 @@ Feature: Posting to forums in a course with no groups behaves correctly
And I should see "Student -> All participants" And I should see "Student -> All participants"
Scenario: Students cannot post in forum with separate groups Scenario: Students cannot post in forum with separate groups
Given I log in as "student1" When I am on the "Separate forum" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
When I follow "Separate forum"
Then I should see "You are not able to create a discussion because you are not a member of any group." Then I should see "You are not able to create a discussion because you are not a member of any group."
And I should not see "Add discussion topic" And I should not see "Add discussion topic"
Scenario: Students cannot post in forum with visible groups Scenario: Students cannot post in forum with visible groups
Given I log in as "student1" When I am on the "Visible forum" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
When I follow "Visible forum"
Then I should see "You are not able to create a discussion because you are not a member of any group." Then I should see "You are not able to create a discussion because you are not a member of any group."
And I should not see "Add discussion topic" And I should not see "Add discussion topic"

View file

@ -16,28 +16,22 @@ Feature: Ensure only users with appropriate permissions can export forum discuss
Scenario: A teacher can export discussions to a portfolio. Scenario: A teacher can export discussions to a portfolio.
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Test forum 1 | Test forum 2 | C1 | forum | 0 | | forum | Test forum 1 | C1 | forum | 0 |
And I log in as "admin" And I log in as "admin"
And the following config values are set as admin: And the following config values are set as admin:
| enableportfolios | 1 | | enableportfolios | 1 |
And I navigate to "Plugins > Portfolios > Manage portfolios" in site administration And I navigate to "Plugins > Portfolios > Manage portfolios" in site administration
And I set portfolio instance "File download" to "Enabled and visible" And I set portfolio instance "File download" to "Enabled and visible"
And I click on "Save" "button" And I click on "Save" "button"
And I log out When I am on the "Test forum 1" "forum activity" page logged in as student1
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test forum 1"
And I add a new discussion to "Test forum 1" forum with: And I add a new discussion to "Test forum 1" forum with:
| Subject | Discussion 1 | | Subject | Discussion 1 |
| Message | Test post message | | Message | Test post message |
And I reload the page And I reload the page
And I follow "Discussion 1" And I follow "Discussion 1"
Then "Export whole discussion to portfolio" "button" should not exist Then "Export whole discussion to portfolio" "button" should not exist
And I log out And I am on the "Test forum 1" "forum activity" page logged in as teacher1
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test forum 1"
And I follow "Discussion 1" And I follow "Discussion 1"
And "Export whole discussion to portfolio" "button" should exist And "Export whole discussion to portfolio" "button" should exist
And I press "Export whole discussion to portfolio" And I press "Export whole discussion to portfolio"

View file

@ -56,62 +56,34 @@ Feature: A user with access to multiple groups should be able to post a copy of
| G1 | C2G1 | | G1 | C2G1 |
| G1 | C2G2 | | G1 | C2G2 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | grouping | | activity | name | course | idnumber | groupmode | grouping |
| forum | No group forum | Test forum name | C1 | forum | 0 | | | forum | No group forum | C1 | forum | 0 | |
| forum | Separate group forum | Test forum name | C1 | forum | 1 | | | forum | Separate group forum | C1 | forum | 1 | |
| forum | Visible group forum | Test forum name | C1 | forum | 2 | | | forum | Visible group forum | C1 | forum | 2 | |
| forum | Groupings forum | Test forum name | C2 | forum | 1 | G1 | | forum | Groupings forum | C2 | forum | 1 | G1 |
And the following forum discussions exist in course "Course 1":
| user | forum | name | message | posttomygroups |
| teacher1 | Separate group forum | Discussion 1 | test | 1 |
| teacher1 | Visible group forum | Discussion 1 | test | 1 |
Scenario: Teacher is able to post a copy of a message to all groups in a separate group forum Scenario: Teacher is able to post a copy of a message to all groups in a separate group forum
Given I log in as "teacher1" When I am on the "Separate group forum" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
And I add a new discussion to "Separate group forum" forum with:
| Subject | Discussion 1 |
| Message | test |
| Post a copy to all groups | 1 |
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Separate group forum"
Then I should see "Discussion 1" Then I should see "Discussion 1"
And I log out And I am on the "Separate group forum" "forum activity" page logged in as student2
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Separate group forum"
And I should see "Discussion 1" And I should see "Discussion 1"
And I log out And I am on the "Separate group forum" "forum activity" page logged in as student3
And I log in as "student3"
And I am on "Course 1" course homepage
And I follow "Separate group forum"
And I should see "Discussion 1" And I should see "Discussion 1"
Scenario: Teacher is able to post a copy of a message to all groups in a visible group forum Scenario: Teacher is able to post a copy of a message to all groups in a visible group forum
Given I log in as "teacher1" When I am on the "Visible group forum" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
And I add a new discussion to "Visible group forum" forum with:
| Subject | Discussion 1 |
| Message | test |
| Post a copy to all groups | 1 |
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Visible group forum"
Then I should see "Discussion 1" Then I should see "Discussion 1"
And I log out And I am on the "Visible group forum" "forum activity" page logged in as student2
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Visible group forum"
And I should see "Discussion 1" And I should see "Discussion 1"
And I log out And I am on the "Visible group forum" "forum activity" page logged in as student2
And I log in as "student3"
And I am on "Course 1" course homepage
And I follow "Visible group forum"
And I should see "Discussion 1" And I should see "Discussion 1"
Scenario: Teacher is unable to post a copy of a message to all groups in a no group forum Scenario: Teacher is unable to post a copy of a message to all groups in a no group forum
Given I log in as "teacher1" Given I am on the "No group forum" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "No group forum"
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
Then I should not see "Post a copy to all groups" Then I should not see "Post a copy to all groups"
@ -122,13 +94,7 @@ Feature: A user with access to multiple groups should be able to post a copy of
| Subject | Discussion 1 | | Subject | Discussion 1 |
| Message | test | | Message | test |
| Post a copy to all groups | 1 | | Post a copy to all groups | 1 |
And I log out When I am on the "Groupings forum" "forum activity" page logged in as student1
And I log in as "student1"
And I am on "Course 2" course homepage
When I follow "Groupings forum"
Then I should see "Discussion 1" Then I should see "Discussion 1"
And I log out And I am on the "Groupings forum" "forum activity" page logged in as student2
And I log in as "student2"
And I am on "Course 2" course homepage
And I follow "Groupings forum"
And I should not see "Discussion 1" And I should not see "Discussion 1"

View file

@ -20,6 +20,14 @@ Feature: New discussions and discussions with recently added replies are display
| course | C1 | | course | C1 |
| activity | forum | | activity | forum |
| name | Course general forum | | name | Course general forum |
#
# Add three posts into the blog.
#
And the following forum discussions exist in course "Course 1":
| user | forum | name | message | timemodified |
| student1 | Course general forum | Forum post 1 | This is the first post | ##now +1 second## |
| student1 | Course general forum | Forum post 2 | This is the second post | ##now +2 second## |
| student1 | Course general forum | Forum post 3 | This is the third post | ##now +3 second## |
# #
# We need javascript/wait to prevent creation of the posts in the same second. The threads # We need javascript/wait to prevent creation of the posts in the same second. The threads
@ -30,18 +38,6 @@ Feature: New discussions and discussions with recently added replies are display
Scenario: Replying to a forum post or editing it puts the discussion to the front Scenario: Replying to a forum post or editing it puts the discussion to the front
Given I am on the "Course general forum" "forum activity" page logged in as student1 Given I am on the "Course general forum" "forum activity" page logged in as student1
# #
# Add three posts into the forum.
#
When I add a new discussion to "Course general forum" forum with:
| Subject | Forum post 1 |
| Message | This is the first post |
And I add a new discussion to "Course general forum" forum with:
| Subject | Forum post 2 |
| Message | This is the second post |
And I add a new discussion to "Course general forum" forum with:
| Subject | Forum post 3 |
| Message | This is the third post |
#
# Edit one of the forum posts. # Edit one of the forum posts.
# #
And I follow "Forum post 2" And I follow "Forum post 2"
@ -50,7 +46,6 @@ Feature: New discussions and discussions with recently added replies are display
| Subject | Edited forum post 2 | | Subject | Edited forum post 2 |
And I press "Save changes" And I press "Save changes"
And I wait to be redirected And I wait to be redirected
And I log out
# #
# Reply to another forum post. # Reply to another forum post.
# #

View file

@ -15,65 +15,38 @@ Feature: Forum posts can be replied to in private
| fullname | shortname | category | | fullname | shortname | category |
| Science 101 | C1 | 0 | | Science 101 | C1 | 0 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | | activity | name | course | idnumber |
| forum | Study discussions | Test forum description | C1 | forum | | forum | Study discussions | C1 | forum |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher | | teacher2 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And I log in as "student1" And the following forum discussions exist in course "Science 101":
And I am on "Science 101" course homepage | user | forum | name | message |
And I add a new discussion to "Study discussions" forum with: | student1 | Study discussions | Answers to the homework | Here are the answers to last night's homework. |
| Subject | Answers to the homework | And I am on the "Science 101" course page logged in as teacher1
| Message | Here are the answers to last night's homework. |
And I log out
And I log in as "teacher1"
And I am on "Science 101" course homepage
And I reply "Answers to the homework" post from "Study discussions" forum with: And I reply "Answers to the homework" post from "Study discussions" forum with:
| Message | How about you and I have a meeting after class about plagiarism? | | Message | How about you and I have a meeting after class about plagiarism? |
| Reply privately | 1 | | Reply privately | 1 |
Scenario: As a teacher I can see my own response Scenario: As a teacher I can see my own response
Given I follow "Study discussions" Given I am on the "Study discussions" "forum activity" page logged in as teacher1
And I follow "Answers to the homework" When I follow "Answers to the homework"
Then I should see "How about you and I have a meeting after class about plagiarism?" Then I should see "How about you and I have a meeting after class about plagiarism?"
Scenario: As a fellow teacher I can see the other teacher's response Scenario: As a fellow teacher I can see the other teacher's response
Given I log out Given I am on the "Study discussions" "forum activity" page logged in as teacher2
And I log in as "teacher2"
And I am on "Science 101" course homepage
And I follow "Study discussions"
When I follow "Answers to the homework" When I follow "Answers to the homework"
Then I should see "How about you and I have a meeting after class about plagiarism?" Then I should see "How about you and I have a meeting after class about plagiarism?"
Scenario: As the intended recipient I can see private response to me Scenario: As the intended recipient I can see my own response
Given I log out Given I am on the "Study discussions" "forum activity" page logged in as student1
And I log in as "student1"
And I am on "Science 101" course homepage
And I follow "Study discussions"
When I follow "Answers to the homework" When I follow "Answers to the homework"
Then I should see "How about you and I have a meeting after class about plagiarism?" Then I should see "How about you and I have a meeting after class about plagiarism?"
Scenario: As a non-privileged user I cannot see private response to others Scenario: As a non-privileged user I cannot see my own response
Given I log out Given I am on the "Study discussions" "forum activity" page logged in as student2
And I log in as "student2"
And I am on "Science 101" course homepage
And I follow "Study discussions"
When I follow "Answers to the homework" When I follow "Answers to the homework"
Then I should not see "How about you and I have a meeting after class about plagiarism?" Then I should not see "How about you and I have a meeting after class about plagiarism?"
Scenario: As privileged user that can post but not read private replies I can see my own private reply
Given I log out
And the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| mod/forum:postprivatereply | Allow | student | System | |
| mod/forum:readprivatereplies | Prohibit | student | System | |
And I log in as "student2"
And I am on "Science 101" course homepage
When I reply "Answers to the homework" post from "Study discussions" forum with:
| Message | Not yet. |
| Reply privately | 1 |
Then I should see "Not yet."
And I should not see "How about you and I have a meeting after class about plagiarism?"

View file

@ -29,12 +29,12 @@ Feature: Users can see the relevant recent forum posts from the recent activity
| teacher1 | G1 | | teacher1 | G1 |
| teacher1 | G2 | | teacher1 | G2 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | type | groupmode | visible | | activity | name | course | idnumber | type | groupmode | visible |
| forum | Separate groups forum | Separate groups description | C1 | forum1 | general | 1 | 1 | | forum | Separate groups forum | C1 | forum1 | general | 1 | 1 |
| forum | Visible groups forum | Visible groups description | C1 | forum2 | general | 2 | 1 | | forum | Visible groups forum | C1 | forum2 | general | 2 | 1 |
| forum | Standard forum | Standard description | C1 | forum3 | general | 0 | 1 | | forum | Standard forum | C1 | forum3 | general | 0 | 1 |
| forum | Hidden forum | Hidden description | C1 | forum4 | general | 0 | 0 | | forum | Hidden forum | C1 | forum4 | general | 0 | 0 |
| forum | Q&A forum | Q&A description | C1 | forum5 | qanda | 0 | 1 | | forum | Q&A forum | C1 | forum5 | qanda | 0 | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add the "Recent activity" block And I add the "Recent activity" block
@ -44,13 +44,9 @@ Feature: Users can see the relevant recent forum posts from the recent activity
| Subject | Group 1 separate discussion | | Subject | Group 1 separate discussion |
| Message | Group 1 members only | | Message | Group 1 members only |
| Group | Group 1 | | Group | Group 1 |
And I log out When I am on the "Course 1" course page logged in as student1
And I log in as "student1"
When I am on "Course 1" course homepage
Then I should see "Group 1 separate discussion" in the "Recent activity" "block" Then I should see "Group 1 separate discussion" in the "Recent activity" "block"
And I log out And I am on the "Course 1" course page logged in as student2
And I log in as "student2"
And I am on "Course 1" course homepage
And I should not see "Group 1 separate discussion" in the "Recent activity" "block" And I should not see "Group 1 separate discussion" in the "Recent activity" "block"
Scenario: Recent forum activity with visible groups discussion Scenario: Recent forum activity with visible groups discussion
@ -58,13 +54,9 @@ Feature: Users can see the relevant recent forum posts from the recent activity
| Subject | Group 1 visible discussion | | Subject | Group 1 visible discussion |
| Message | Not just for group 1 members | | Message | Not just for group 1 members |
| Group | Group 1 | | Group | Group 1 |
And I log out When I am on the "Course 1" course page logged in as student1
And I log in as "student1"
When I am on "Course 1" course homepage
Then I should see "Group 1 visible discussion" in the "Recent activity" "block" Then I should see "Group 1 visible discussion" in the "Recent activity" "block"
And I log out And I am on the "Course 1" course page logged in as student2
And I log in as "student2"
And I am on "Course 1" course homepage
And I should see "Group 1 visible discussion" in the "Recent activity" "block" And I should see "Group 1 visible discussion" in the "Recent activity" "block"
Scenario: Recent forum activity with recent post as a private reply Scenario: Recent forum activity with recent post as a private reply
@ -78,30 +70,24 @@ Feature: Users can see the relevant recent forum posts from the recent activity
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I should see "Standard forum discussion" in the "Recent activity" "block" And I should see "Standard forum discussion" in the "Recent activity" "block"
And I should see "Teacher's private reply" in the "Recent activity" "block" And I should see "Teacher's private reply" in the "Recent activity" "block"
And I log out When I am on the "Course 1" course page logged in as student1
When I log in as "student1"
And I am on "Course 1" course homepage
Then I should see "Standard forum discussion" in the "Recent activity" "block" Then I should see "Standard forum discussion" in the "Recent activity" "block"
But I should not see "Teacher's private reply" in the "Recent activity" "block" But I should not see "Teacher's private reply" in the "Recent activity" "block"
Scenario: Recent forum activity with recent post in a hidden forum Scenario: Recent forum activity with recent post in a hidden forum
Given I add a new discussion to "Hidden forum" forum with: Given the following forum discussions exist in course "Course 1":
| Subject | Hidden discussion | | user | forum | name | message |
| Message | Should be hidden! | | teacher1 | Hidden forum | Hidden discussion | Should be hidden! |
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I should see "Hidden discussion" in the "Recent activity" "block" And I should see "Hidden discussion" in the "Recent activity" "block"
And I log out When I am on the "Course 1" course page logged in as student1
And I log in as "student1"
When I am on "Course 1" course homepage
Then I should not see "Hidden discussion" in the "Recent activity" "block" Then I should not see "Hidden discussion" in the "Recent activity" "block"
Scenario: Recent forum activity with question and answer forum Scenario: Recent forum activity with question and answer forum
Given I add a new question to "Q&A forum" forum with: Given I add a new question to "Q&A forum" forum with:
| Subject | The egg vs the chicken | | Subject | The egg vs the chicken |
| Message | Which came first? The egg or the chicken? | | Message | Which came first? The egg or the chicken? |
And I log out And I am on the "Course 1" course page logged in as student1
And I log in as "student1"
And I am on "Course 1" course homepage
And I reply "The egg vs the chicken" post from "Q&A forum" forum with: And I reply "The egg vs the chicken" post from "Q&A forum" forum with:
| Subject | Student 1's answer | | Subject | Student 1's answer |
| Message | The egg! | | Message | The egg! |
@ -112,9 +98,7 @@ Feature: Users can see the relevant recent forum posts from the recent activity
And I log in as "admin" And I log in as "admin"
And the following config values are set as admin: And the following config values are set as admin:
| maxeditingtime | 1 | | maxeditingtime | 1 |
And I log out When I am on the "Course 1" course page logged in as student2
When I log in as "student2"
And I am on "Course 1" course homepage
Then I should see "The egg vs the chicken" in the "Recent activity" "block" Then I should see "The egg vs the chicken" in the "Recent activity" "block"
But I should not see "Student 1's answer" in the "Recent activity" "block" But I should not see "Student 1's answer" in the "Recent activity" "block"
And I reply "The egg vs the chicken" post from "Q&A forum" forum with: And I reply "The egg vs the chicken" post from "Q&A forum" forum with:
@ -135,7 +119,5 @@ Feature: Users can see the relevant recent forum posts from the recent activity
| timeend[day] | 1 | | timeend[day] | 1 |
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I should see "Timed discussion" in the "Recent activity" "block" And I should see "Timed discussion" in the "Recent activity" "block"
And I log out When I am on the "Course 1" course page logged in as student1
When I log in as "student1"
And I am on "Course 1" course homepage
Then I should not see "Timed discussion" in the "Recent activity" "block" Then I should not see "Timed discussion" in the "Recent activity" "block"

View file

@ -46,8 +46,8 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
| student2 | G2 | | student2 | G2 |
| student3 | G4 | | student3 | G4 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Standard forum name | Standard forum description | C1 | sepgroups | 1 | | forum | Standard forum name | C1 | sepgroups | 1 |
And the following "mod_forum > discussions" exist: And the following "mod_forum > discussions" exist:
| forum | name | subject | message | group | | forum | name | subject | message | group |
| sepgroups | Initial Disc ALL | Initial Disc ALL | Disc ALL content | All participants | | sepgroups | Initial Disc ALL | Initial Disc ALL | Disc ALL content | All participants |
@ -56,9 +56,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
| sepgroups | Initial Disc G3 | Initial Disc G3 | Disc G3 content | G3 | | sepgroups | Initial Disc G3 | Initial Disc G3 | Disc G3 content | G3 |
Scenario: Teacher with accessallgroups can view all groups Scenario: Teacher with accessallgroups can view all groups
Given I log in as "teacher1" When I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
When I follow "Standard forum name"
Then the "Separate groups" select box should contain "All participants" Then the "Separate groups" select box should contain "All participants"
And the "Separate groups" select box should contain "Group A" And the "Separate groups" select box should contain "Group A"
And the "Separate groups" select box should contain "Group B" And the "Separate groups" select box should contain "Group B"
@ -80,10 +78,8 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
But I should not see "Initial Disc G1" But I should not see "Initial Disc G1"
And I should not see "Initial Disc G3" And I should not see "Initial Disc G3"
Scenario: Teacher with accessallgroups can select any participation group when posting Scenario: Teacher with accessallgroups can select any group when posting
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
Then the "Group" select box should contain "All participants" Then the "Group" select box should contain "All participants"
@ -94,9 +90,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
And I should see "Post a copy to all groups" And I should see "Post a copy to all groups"
Scenario: Teacher with accessallgroups can post in groups they are a member of Scenario: Teacher with accessallgroups can post in groups they are a member of
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
And I select "Group A" from the "Separate groups" singleselect And I select "Group A" from the "Separate groups" singleselect
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
@ -125,9 +119,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
And I should not see "Teacher 1 -> Group B" And I should not see "Teacher 1 -> Group B"
Scenario: Teacher with accessallgroups can post in groups they are not a member of Scenario: Teacher with accessallgroups can post in groups they are not a member of
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
And I select "Group A" from the "Separate groups" singleselect And I select "Group A" from the "Separate groups" singleselect
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
@ -156,9 +148,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
And I should not see "Teacher 1 -> Group C" And I should not see "Teacher 1 -> Group C"
Scenario: Teacher with accessallgroups can post to all groups Scenario: Teacher with accessallgroups can post to all groups
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
And I set the following fields to these values: And I set the following fields to these values:
@ -184,9 +174,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
# No point testing the "All participants". # No point testing the "All participants".
Scenario: Students in one group can only post in their group Scenario: Students in one group can only post in their group
Given I log in as "student1" When I am on the "Standard forum name" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
When I follow "Standard forum name"
Then I should see "Group A" Then I should see "Group A"
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I should see "Group A" And I should see "Group A"
@ -202,27 +190,21 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
And I should not see "Group B" in the "Student -> B" "table_row" And I should not see "Group B" in the "Student -> B" "table_row"
Scenario: Students in no group can see all group discussions, but not post. Scenario: Students in no group can see all group discussions, but not post.
Given I log in as "student4" When I am on the "Standard forum name" "forum activity" page logged in as student4
And I am on "Course 1" course homepage
When I follow "Standard forum name"
Then I should see "All participants" Then I should see "All participants"
And I should see "Initial Disc ALL" And I should see "Initial Disc ALL"
And I should see "You are not able to create a discussion" And I should see "You are not able to create a discussion"
And I should not see "Add discussion topic" And I should not see "Add discussion topic"
Scenario: Students in non-participation groups can see all group discussions, but not post. Scenario: Students in non-participation groups can see all group discussions, but not post.
Given I log in as "student3" When I am on the "Standard forum name" "forum activity" page logged in as student3
And I am on "Course 1" course homepage
When I follow "Standard forum name"
Then I should see "All participants" Then I should see "All participants"
And I should see "Initial Disc ALL" And I should see "Initial Disc ALL"
And I should see "You are not able to create a discussion" And I should see "You are not able to create a discussion"
And I should not see "Add discussion topic" And I should not see "Add discussion topic"
Scenario: Students in multiple group can post in all of their group individually Scenario: Students in multiple group can post in all of their group individually
Given I log in as "student2" When I am on the "Standard forum name" "forum activity" page logged in as student2
And I am on "Course 1" course homepage
When I follow "Standard forum name"
And I select "Group A" from the "Separate groups" singleselect And I select "Group A" from the "Separate groups" singleselect
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
@ -266,13 +248,10 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
And I should not see "Student -> A" And I should not see "Student -> A"
Scenario: Teacher in all groups but without accessallgroups can only post in their groups Scenario: Teacher in all groups but without accessallgroups can only post in their groups
And I log in as "admin" Given I log in as "admin"
And I set the following system permissions of "Non-editing teacher" role: And I set the following system permissions of "Non-editing teacher" role:
| moodle/site:accessallgroups | Prohibit | | moodle/site:accessallgroups | Prohibit |
And I log out And I am on the "Standard forum name" "forum activity" page logged in as noneditor1
Given I log in as "noneditor1"
And I am on "Course 1" course homepage
And I follow "Standard forum name"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
Then the "Group" select box should not contain "All participants" Then the "Group" select box should not contain "All participants"
@ -281,13 +260,10 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
And I should see "Post a copy to all groups" And I should see "Post a copy to all groups"
Scenario: Teacher in some groups and without accessallgroups can only post in their groups Scenario: Teacher in some groups and without accessallgroups can only post in their groups
And I log in as "admin" Given I log in as "admin"
And I set the following system permissions of "Non-editing teacher" role: And I set the following system permissions of "Non-editing teacher" role:
| moodle/site:accessallgroups | Prohibit | | moodle/site:accessallgroups | Prohibit |
And I log out And I am on the "Standard forum name" "forum activity" page logged in as noneditor1
Given I log in as "noneditor1"
And I am on "Course 1" course homepage
And I follow "Standard forum name"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
Then the "Group" select box should not contain "All participants" Then the "Group" select box should not contain "All participants"
@ -296,7 +272,5 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
And I should see "Post a copy to all groups" And I should see "Post a copy to all groups"
Scenario: Students can view all participants discussions in separate groups mode Scenario: Students can view all participants discussions in separate groups mode
Given I log in as "student1" When I am on the "Standard forum name" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
When I follow "Standard forum name"
Then I should see "Initial Disc ALL" Then I should see "Initial Disc ALL"

View file

@ -32,18 +32,20 @@ Feature: I can grade a students by group with separate groups
| student1 | G3 | | student1 | G3 |
| student2 | G3 | | student2 | G3 |
| student3 | G3 | | student3 | G3 |
And the following "activity" exists:
| activity | forum |
| course | C1 |
| name | Test Forum 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage with editing mode on
And I turn editing mode on And I am on the "Test Forum 1" "forum activity editing" page
And I add a "Forum" to section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the following fields to these values: And I set the following fields to these values:
| Forum name | Test Forum 1 | | Forum name | Test Forum 1 |
| Description | Test | | Description | Test |
And I set the field "Whole forum grading > Type" to "Point" And I set the field "Whole forum grading > Type" to "Point"
And I set the field "Common module settings > Group mode" to "Separate groups" And I set the field "Common module settings > Group mode" to "Separate groups"
And I press "Save and return to course" And I press "Save and display"
And I am on the "Test Forum 1" "forum activity" page
@javascript @javascript
Scenario: Grade users by group A Scenario: Grade users by group A
@ -85,7 +87,6 @@ Feature: I can grade a students by group with separate groups
| user | group | | user | group |
| teacher2 | G2 | | teacher2 | G2 |
| teacher2 | G3 | | teacher2 | G3 |
And I log out
When I am on the "Test Forum 1" "forum activity" page logged in as student1 When I am on the "Test Forum 1" "forum activity" page logged in as student1
And I select "Group A" from the "Separate groups" singleselect And I select "Group A" from the "Separate groups" singleselect
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
@ -99,7 +100,6 @@ Feature: I can grade a students by group with separate groups
| Subject | Discussion subject C | | Subject | Discussion subject C |
| Message | Discussion message C | | Message | Discussion message C |
And I press "Post to forum" And I press "Post to forum"
And I log out
Then I am on the "Test Forum 1" "forum activity" page logged in as teacher2 Then I am on the "Test Forum 1" "forum activity" page logged in as teacher2
And I select "Group C" from the "Separate groups" singleselect And I select "Group C" from the "Separate groups" singleselect
And I click on "Grade users" "button" And I click on "Grade users" "button"

View file

@ -39,21 +39,18 @@ Feature: Posting to groups in a separate group discussion when restricted to gro
| G1 | G1G2 | | G1 | G1G2 |
| G2 | G2G1 | | G2 | G2G1 |
And the following "activities" exist: And the following "activities" exist:
| activity | course | idnumber | name | intro | type | section | groupmode | grouping | | activity | course | idnumber | name | type | groupmode | grouping |
| forum | C1 | 00001 | Multiple groups forum | Standard forum description | general | 1 | 1 | G1 | | forum | C1 | 00001 | Multiple groups forum | general | 1 | G1 |
| forum | C1 | 00001 | Single groups forum | Standard forum description | general | 1 | 1 | G2 | | forum | C1 | 00001 | Single groups forum | general | 1 | G2 |
Scenario: Teacher with accessallgroups can post in all groups Scenario: Teacher with accessallgroups can post in all groups
Given I log in as "teacher1" Given I am on the "Multiple groups forum" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Multiple groups forum"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
Then the "Group" select box should contain "All participants" Then the "Group" select box should contain "All participants"
And the "Group" select box should contain "G1G1" And the "Group" select box should contain "G1G1"
And the "Group" select box should contain "G1G2" And the "Group" select box should contain "G1G2"
And I am on "Course 1" course homepage And I am on the "Single groups forum" "forum activity" page
And I follow "Single groups forum"
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
And the "Group" select box should contain "All participants" And the "Group" select box should contain "All participants"
@ -61,16 +58,13 @@ Feature: Posting to groups in a separate group discussion when restricted to gro
And I should not see "Post a copy to all groups" And I should not see "Post a copy to all groups"
Scenario: Teacher in all groups but without accessallgroups can post in either group but not to All Participants Scenario: Teacher in all groups but without accessallgroups can post in either group but not to All Participants
Given I log in as "teacher2" Given I am on the "Multiple groups forum" "forum activity" page logged in as teacher2
And I am on "Course 1" course homepage
And I follow "Multiple groups forum"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
Then the "Group" select box should not contain "All participants" Then the "Group" select box should not contain "All participants"
And the "Group" select box should contain "G1G1" And the "Group" select box should contain "G1G1"
And the "Group" select box should contain "G1G2" And the "Group" select box should contain "G1G2"
And I am on "Course 1" course homepage And I am on the "Single groups forum" "forum activity" page
And I follow "Single groups forum"
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
And I should see "G2G1" And I should see "G2G1"

View file

@ -21,15 +21,12 @@ Feature: Single simple forum discussion type
| forum | Single discussion forum name | Single discussion forum description | single | C1 | forum | | forum | Single discussion forum name | Single discussion forum description | single | C1 | forum |
Scenario: Teacher can start the single simple discussion Scenario: Teacher can start the single simple discussion
Given I log in as "teacher1" When I am on the "Single discussion forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
When I follow "Single discussion forum name"
Then I should see "Single discussion forum description" in the "div.firstpost.starter" "css_element" Then I should see "Single discussion forum description" in the "div.firstpost.starter" "css_element"
And I should not see "Add a new discussion topic" And I should not see "Add a new discussion topic"
Scenario: Student can not add more discussions Scenario: Student can not add more discussions
And I log in as "student1" Given I am on the "Course 1" course page logged in as student1
And I am on "Course 1" course homepage
When I reply "Single discussion forum name" post from "Single discussion forum name" forum with: When I reply "Single discussion forum name" post from "Single discussion forum name" forum with:
| Subject | Reply to single discussion subject | | Subject | Reply to single discussion subject |
| Message | Reply to single discussion message | | Message | Reply to single discussion message |

View file

@ -19,34 +19,24 @@ Feature: Forum discussions can be split
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | type | | activity | name | course | idnumber | type |
| forum | Study discussions | Forum to discuss your coursework. | C1 | forump1 | general | | forum | Study discussions | C1 | forump1 | general |
And I log in as "teacher1" And the following "mod_forum > discussions" exist:
And I am on "Science 101" course homepage | forum | course | user | name | message |
And I add a new discussion to "Study discussions" forum with: | forump1 | C1 | teacher1 | Photosynthesis discussion | Lets discuss our learning about Photosynthesis this week in this thread. |
| Subject | Photosynthesis discussion | And the following "mod_forum > posts" exist:
| Message | Lets discuss our learning about Photosynthesis this week in this thread. | | user | parentsubject | message |
And I log out | student1 | Photosynthesis discussion | Can anyone tell me which number is the mass number in the periodic table? |
And I log in as "student1" And I am on the "Study discussions" "forum activity" page logged in as student2
And I am on "Science 101" course homepage
And I reply "Photosynthesis discussion" post from "Study discussions" forum with:
| Message | Can anyone tell me which number is the mass number in the periodic table? |
And I log out
And I log in as "student2"
And I am on "Science 101" course homepage
And I follow "Study discussions"
And I follow "Photosynthesis discussion" And I follow "Photosynthesis discussion"
And I click on "Reply" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Can anyone tell me which number is the mass number in the periodic table?')]" "xpath_element" And I click on "Reply" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Can anyone tell me which number is the mass number in the periodic table?')]" "xpath_element"
And I wait to be redirected And I wait to be redirected
And I set the following fields to these values: And I set the following fields to these values:
| Message | I would also like to know this | | Message | I would also like to know this |
And I press "Post to forum" And I press "Post to forum"
And I log out
Scenario: Split a forum discussion Scenario: Split a forum discussion
Given I log in as "teacher1" Given I am on the "Study discussions" "forum activity" page logged in as teacher1
And I am on "Science 101" course homepage
And I follow "Study discussions"
And I follow "Photosynthesis discussion" And I follow "Photosynthesis discussion"
When I follow "Split" When I follow "Split"
And I set the following fields to these values: And I set the following fields to these values:

View file

@ -15,8 +15,8 @@ Feature: Users can choose to set start and end time for display of their discuss
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | type | | activity | name | course | idnumber | type |
| forum | Test forum name | Test forum description | C1 | forump1 | general | | forum | Test forum name | C1 | forump1 | general |
And I log in as "admin" And I log in as "admin"
And the following config values are set as admin: And the following config values are set as admin:
| forum_enabletimedposts | 1 | | forum_enabletimedposts | 1 |
@ -33,15 +33,11 @@ Feature: Users can choose to set start and end time for display of their discuss
| Subject | Discussion 3 timed visible now | | Subject | Discussion 3 timed visible now |
| Message | Discussion contents 3, first message | | Message | Discussion contents 3, first message |
| timestart[enabled] | 1 | | timestart[enabled] | 1 |
And I am on "Course 1" course homepage And I am on the "Test forum name" "forum activity" page
And I follow "Test forum name"
And I should see "Discussion 2 timed" And I should see "Discussion 2 timed"
And I should see "Discussion 3 timed" And I should see "Discussion 3 timed"
And "[data-region=timed-label]" "css_element" should exist And "[data-region=timed-label]" "css_element" should exist
And I log out When I am on the "Test forum name" "forum activity" page logged in as student1
And I log in as "student1"
When I am on "Course 1" course homepage
And I follow "Test forum name"
Then I should see "Discussion 1" Then I should see "Discussion 1"
And I should not see "Discussion 2 timed" And I should not see "Discussion 2 timed"
And "[data-region=timed-label]" "css_element" should not exist And "[data-region=timed-label]" "css_element" should not exist

View file

@ -16,24 +16,22 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
| user | course | role | | user | course | role |
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And I log in as "admin"
Scenario: Tracking forum posts off Scenario: Tracking forum posts off
Given the following "activity" exists: Given the following "activity" exists:
| activity | forum | | activity | forum |
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | forum1 |
| type | general |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description |
| section | 1 |
| trackingtype | 0 | | trackingtype | 0 |
And I am on "Course 1" course homepage And the following "mod_forum > discussion" exists:
And I add a new discussion to "Test forum name" forum with: | forum | forum1 |
| Subject | Test post subject | | course | C1 |
| Message | Test post message | | user | admin |
And I log out | name | Test post subject |
When I log in as "student1" | message | Test post message |
And I am on "Course 1" course homepage When I am on the "Course 1" course page logged in as student1
Then I should not see "1 unread post" Then I should not see "1 unread post"
And I follow "Test forum name" And I follow "Test forum name"
And I should not see "Track unread posts" And I should not see "Track unread posts"
@ -42,19 +40,17 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Given the following "activity" exists: Given the following "activity" exists:
| activity | forum | | activity | forum |
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | forum1 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description | | type | general |
| section | 1 |
| type | generalforum |
| trackingtype | 1 | | trackingtype | 1 |
And I am on "Course 1" course homepage And the following "mod_forum > discussion" exists:
And I add a new discussion to "Test forum name" forum with: | forum | forum1 |
| Subject | Test post subject | | course | C1 |
| Message | Test post message | | user | admin |
And I log out | name | Test post subject |
When I log in as "student1" | message | Test post message |
And I am on "Course 1" course homepage When I am on the "Course 1" course page logged in as student1
Then I should see "1 unread post" Then I should see "1 unread post"
And I follow "Test forum name" And I follow "Test forum name"
And I follow "Don't track unread posts" And I follow "Don't track unread posts"
@ -74,17 +70,15 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | 00001 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description | | type | general |
| section | 1 |
| type | generalforum |
| trackingtype | 1 | | trackingtype | 1 |
And I am on "Course 1" course homepage And the following "mod_forum > discussion" exists:
And I add a new discussion to "Test forum name" forum with: | forum | 00001 |
| Subject | Test post subject | | course | C1 |
| Message | Test post message | | user | admin |
And I log out | name | Test post subject |
When I log in as "student2" | message | Test post message |
And I am on "Course 1" course homepage When I am on the "Course 1" course page logged in as student2
Then I should not see "1 unread post" Then I should not see "1 unread post"
And I follow "Test forum name" And I follow "Test forum name"
And I should not see "Track unread posts" And I should not see "Track unread posts"
@ -97,17 +91,15 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | 00001 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description | | type | general |
| section | 1 |
| type | generalforum |
| trackingtype | 2 | | trackingtype | 2 |
And I am on "Course 1" course homepage And the following "mod_forum > discussion" exists:
And I add a new discussion to "Test forum name" forum with: | forum | 00001 |
| Subject | Test post subject | | course | C1 |
| Message | Test post message | | user | admin |
And I log out | name | Test post subject |
When I log in as "student1" | message | Test post message |
And I am on "Course 1" course homepage When I am on the "Course 1" course page logged in as student1
Then I should see "1 unread post" Then I should see "1 unread post"
And I am on the "Test forum name" "forum activity" page And I am on the "Test forum name" "forum activity" page
And I should not see "Don't track unread posts" And I should not see "Don't track unread posts"
@ -123,17 +115,15 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | 00001 |
| name | Test forum name | | name | Test forum name |
| intro | Test forum description | | type | general |
| section | 1 |
| type | generalforum |
| trackingtype | 2 | | trackingtype | 2 |
And I am on "Course 1" course homepage And the following "mod_forum > discussion" exists:
And I add a new discussion to "Test forum name" forum with: | forum | 00001 |
| Subject | Test post subject | | course | C1 |
| Message | Test post message | | user | admin |
And I log out | name | Test post subject |
When I log in as "student2" | message | Test post message |
And I am on "Course 1" course homepage When I am on the "Course 1" course page logged in as student2
Then I should see "1 unread post" Then I should see "1 unread post"
And I am on the "Test forum name" "forum activity" page And I am on the "Test forum name" "forum activity" page
And I should not see "Don't track unread posts" And I should not see "Don't track unread posts"
@ -149,19 +139,17 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | 00001 |
| name | Test forum name | | name | Test forum name |
| description | Test forum description | | type | general |
| section | 1 |
| type | generalforum |
| trackingtype | 2 | | trackingtype | 2 |
And I am on "Course 1" course homepage And the following "mod_forum > discussion" exists:
And I add a new discussion to "Test forum name" forum with: | forum | 00001 |
| Subject | Test post subject | | course | C1 |
| Message | Test post message | | user | admin |
| name | Test post subject |
| message | Test post message |
And the following config values are set as admin: And the following config values are set as admin:
| forum_allowforcedreadtracking | 0 | | forum_allowforcedreadtracking | 0 |
And I log out When I am on the "Course 1" course page logged in as student1
When I log in as "student1"
And I am on "Course 1" course homepage
Then I should see "1 unread post" Then I should see "1 unread post"
And I follow "Test forum name" And I follow "Test forum name"
And I follow "Don't track unread posts" And I follow "Don't track unread posts"
@ -183,19 +171,17 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
| course | C1 | | course | C1 |
| idnumber | 00001 | | idnumber | 00001 |
| name | Test forum name | | name | Test forum name |
| description | Test forum description | | type | general |
| section | 1 |
| type | generalforum |
| trackingtype | 2 | | trackingtype | 2 |
And I am on "Course 1" course homepage And the following "mod_forum > discussion" exists:
And I add a new discussion to "Test forum name" forum with: | forum | 00001 |
| Subject | Test post subject | | course | C1 |
| Message | Test post message | | user | admin |
| name | Test post subject |
| message | Test post message |
And the following config values are set as admin: And the following config values are set as admin:
| forum_allowforcedreadtracking | 0 | | forum_allowforcedreadtracking | 0 |
And I log out When I am on the "Course 1" course page logged in as student2
When I log in as "student2"
And I am on "Course 1" course homepage
Then I should not see "1 unread post" Then I should not see "1 unread post"
And I follow "Test forum name" And I follow "Test forum name"
And I should not see "Track unread posts" And I should not see "Track unread posts"

View file

@ -37,8 +37,8 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
| student2 | G2 | | student2 | G2 |
| student3 | G4 | | student3 | G4 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | Standard forum name | Standard forum description | C1 | groups | 2 | | forum | Standard forum name | C1 | groups | 2 |
And the following "mod_forum > discussions" exist: And the following "mod_forum > discussions" exist:
| forum | name | subject | message | group | | forum | name | subject | message | group |
| groups | Initial Disc ALL | Initial Disc ALL | Disc ALL content | All participants | | groups | Initial Disc ALL | Initial Disc ALL | Disc ALL content | All participants |
@ -47,9 +47,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
| groups | Initial Disc G3 | Initial Disc G3 | Disc G3 content | G3 | | groups | Initial Disc G3 | Initial Disc G3 | Disc G3 content | G3 |
Scenario: Teacher with accessallgroups can view all groups Scenario: Teacher with accessallgroups can view all groups
Given I log in as "teacher1" When I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
When I follow "Standard forum name"
Then the "Visible groups" select box should contain "All participants" Then the "Visible groups" select box should contain "All participants"
And the "Visible groups" select box should contain "Group A" And the "Visible groups" select box should contain "Group A"
And the "Visible groups" select box should contain "Group B" And the "Visible groups" select box should contain "Group B"
@ -72,9 +70,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
And I should not see "Initial Disc G3" And I should not see "Initial Disc G3"
Scenario: Teacher with accessallgroups can select any group when posting Scenario: Teacher with accessallgroups can select any group when posting
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
Then the "Group" select box should contain "All participants" Then the "Group" select box should contain "All participants"
@ -85,9 +81,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
And I should see "Post a copy to all groups" And I should see "Post a copy to all groups"
Scenario: Teacher with accessallgroups can post in groups they are a member of Scenario: Teacher with accessallgroups can post in groups they are a member of
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
And I select "Group A" from the "Visible groups" singleselect And I select "Group A" from the "Visible groups" singleselect
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
@ -116,9 +110,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
And I should not see "Teacher 1 -> Group B" And I should not see "Teacher 1 -> Group B"
Scenario: Teacher with accessallgroups can post in groups they are not a member of Scenario: Teacher with accessallgroups can post in groups they are not a member of
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
And I select "Group A" from the "Visible groups" singleselect And I select "Group A" from the "Visible groups" singleselect
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
@ -147,9 +139,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
And I should not see "Teacher 1 -> Group C" And I should not see "Teacher 1 -> Group C"
Scenario: Teacher with accessallgroups can post to all groups Scenario: Teacher with accessallgroups can post to all groups
Given I log in as "teacher1" Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
And I am on "Course 1" course homepage
And I follow "Standard forum name"
When I click on "Add discussion topic" "link" When I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
And I set the following fields to these values: And I set the following fields to these values:
@ -175,9 +165,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
# No point testing the "All participants". # No point testing the "All participants".
Scenario: Students can view all groups Scenario: Students can view all groups
Given I log in as "student1" When I am on the "Standard forum name" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
When I follow "Standard forum name"
Then the "Visible groups" select box should contain "All participants" Then the "Visible groups" select box should contain "All participants"
And the "Visible groups" select box should contain "Group A" And the "Visible groups" select box should contain "Group A"
And the "Visible groups" select box should contain "Group B" And the "Visible groups" select box should contain "Group B"
@ -200,9 +188,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
And I should not see "Initial Disc G3" And I should not see "Initial Disc G3"
Scenario: Students in one group can only post in their group Scenario: Students in one group can only post in their group
Given I log in as "student1" When I am on the "Standard forum name" "forum activity" page logged in as student1
And I am on "Course 1" course homepage
When I follow "Standard forum name"
Then I should see "Group A" Then I should see "Group A"
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"
@ -220,9 +206,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
And I should not see "Group B" in the "Student -> B" "table_row" And I should not see "Group B" in the "Student -> B" "table_row"
Scenario: Students in multiple group can post in all of their group individually Scenario: Students in multiple group can post in all of their group individually
Given I log in as "student2" When I am on the "Standard forum name" "forum activity" page logged in as student2
And I am on "Course 1" course homepage
When I follow "Standard forum name"
And I select "Group A" from the "Visible groups" singleselect And I select "Group A" from the "Visible groups" singleselect
And I click on "Add discussion topic" "link" And I click on "Add discussion topic" "link"
And I click on "Advanced" "button" And I click on "Advanced" "button"

View file

@ -19,16 +19,15 @@ Feature: Filter an outline report
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | description | course | idnumber | section | | activity | name | course | idnumber | section |
| forum | Forum name | Forum description | C1 | FORUM01 | 1 | | forum | Forum name | C1 | FORUM01 | 1 |
| book | Book name | | C1 | BOOK01 | 1 | | book | Book name | C1 | BOOK01 | 1 |
When I am on the "Course 1" course page logged in as admin When I am on the "Course 1" course page logged in as admin
Scenario: Filter the outline report by start date Scenario: Filter the outline report by start date
Given I navigate to "Plugins > Logging > Manage log stores" in site administration Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And "Disable" "link" should exist in the "Standard log" "table_row" And "Disable" "link" should exist in the "Standard log" "table_row"
And I am on the "Course 1" course page logged in as student1 And I am on the "Forum name" "forum activity" page logged in as student1
And I follow "Forum name"
And the log timestamp for "student1" and "FORUM01" is set to "12 June 2017 12:49:00" And the log timestamp for "student1" and "FORUM01" is set to "12 June 2017 12:49:00"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Book name" And I follow "Book name"
@ -52,8 +51,7 @@ Feature: Filter an outline report
Scenario: Filter the outline report by end date Scenario: Filter the outline report by end date
Given I navigate to "Plugins > Logging > Manage log stores" in site administration Given I navigate to "Plugins > Logging > Manage log stores" in site administration
And "Disable" "link" should exist in the "Standard log" "table_row" And "Disable" "link" should exist in the "Standard log" "table_row"
And I am on the "Course 1" course page logged in as student1 And I am on the "Forum name" "forum activity" page logged in as student1
And I follow "Forum name"
And the log timestamp for "student1" and "FORUM01" is set to "12 June 2017 12:49:00" And the log timestamp for "student1" and "FORUM01" is set to "12 June 2017 12:49:00"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Book name" And I follow "Book name"

View file

@ -19,9 +19,9 @@ Feature: View an outline report
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | | activity | name | course | idnumber |
| forum | Forum name | Forum description | C1 | forum1 | | forum | Forum name | C1 | forum1 |
| book | Book name | | C1 | book1 | | book | Book name | C1 | book1 |
When I am on the "Course 1" course page logged in as admin When I am on the "Course 1" course page logged in as admin
Scenario: View the outline report when only the standard log reader is enabled Scenario: View the outline report when only the standard log reader is enabled

View file

@ -53,8 +53,8 @@ Feature: View the user page for the outline report
Scenario: View the user complete report page when there is a no-grade forum Scenario: View the user complete report page when there is a no-grade forum
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | description | course | idnumber | | activity | name | course | idnumber |
| forum | forum1 | C1 first forum | C1 | forum1 | | forum | forum1 | C1 | forum1 |
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
When I follow "Participants" When I follow "Participants"
And I follow "Student 1" And I follow "Student 1"

View file

@ -30,7 +30,7 @@ Feature: Select content bank files using the content bank files repository
| System | | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p | | System | | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | introformat | course | idnumber | | activity | name | intro | introformat | course | idnumber |
| forum | Forum | ForumDesc | 1 | mscC1 | forum1 | | forum | Forum | | 1 | mscC1 | forum1 |
| folder | Folder | FolderDesc | 1 | mscC1 | folder1 | | folder | Folder | FolderDesc | 1 | mscC1 | folder1 |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |

View file

@ -101,8 +101,8 @@ Feature: Use global search interface
| A Group | F1 | G1 | | A Group | F1 | G1 |
| B Group | F1 | G2 | | B Group | F1 | G2 |
And the following "activities" exist: And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | | activity | name | course | idnumber | groupmode |
| forum | ForumSG | ForumDesc1 | F1 | FORUM2 | 1 | | forum | ForumSG | F1 | FORUM2 | 1 |
When I am on the ForumSG "Forum activity" page When I am on the ForumSG "Forum activity" page
And global search expects the query "frogs" and will return: And global search expects the query "frogs" and will return:
| type | idnumber | | type | idnumber |