mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Merge branch 'MDL-70152-master' of https://github.com/andelacruz/moodle
This commit is contained in:
commit
9611669cae
81 changed files with 638 additions and 1258 deletions
|
@ -19,8 +19,8 @@ Feature: Message users in the summary report
|
|||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber |
|
||||
| forum | forum1 | C1 first forum | C1 | forum1 |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | forum1 | C1 | forum1 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| teacher1 | forum1 | discussion1 | t1 earliest |
|
||||
|
|
|
@ -24,11 +24,11 @@ Feature: Course level forum summary report
|
|||
| student2 | C2 | student |
|
||||
| student3 | C2 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber |
|
||||
| forum | forum1 | C1 forum 1 | C1 | forum1 |
|
||||
| forum | forum2 | C1 forum 2 | C1 | forum2 |
|
||||
| forum | forum3 | C1 forum 3 | C1 | forum3 |
|
||||
| forum | forum4 | C2 forum 1 | C2 | forum4 |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | forum1 | C1 | forum1 |
|
||||
| forum | forum2 | C1 | forum2 |
|
||||
| forum | forum3 | C1 | forum3 |
|
||||
| forum | forum4 | C2 | forum4 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | created |
|
||||
| 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:
|
||||
| capability | permission | role | contextlevel | reference |
|
||||
| forumreport/summary:view | Allow | student | Course | C1 |
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "forum1"
|
||||
When I am on the "forum1" "forum activity" page logged in as student1
|
||||
And I navigate to "Reports" in current page administration
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies | | |
|
||||
|
|
|
@ -23,10 +23,10 @@ Feature: forum report shows post/reply/word counts correctly
|
|||
| student2 | C1 | student | self |
|
||||
| teacher1 | C2 | editingteacher | manual |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber |
|
||||
| forum | forum1 | C1 first forum | C1 | forum1 |
|
||||
| forum | forum2 | C1 second forum | C1 | forum2 |
|
||||
| forum | forum1 | C2 first forum | C2 | forum1 |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | forum1 | C1 | forum1 |
|
||||
| forum | forum2 | C1 | forum2 |
|
||||
| forum | forum1 | C2 | forum1 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | attachments | inlineattachments |
|
||||
| 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":
|
||||
| user | forum | name | message | attachments | inlineattachments |
|
||||
| teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | |
|
||||
When I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I am on the "Course 1" course page logged in as teacher1
|
||||
And I follow "forum1"
|
||||
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"
|
||||
|
|
|
@ -21,8 +21,8 @@ Feature: Include private replies in the summary report
|
|||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber |
|
||||
| forum | forum1 | C1 first forum | C1 | forum1 |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | forum1 | C1 | forum1 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| 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 | discussion2 | t1 latest | t1 latest |
|
||||
| student1 | forum1 | discussion1 | s1 earliest | s1 earliest |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "Course 1" course page logged in as teacher1
|
||||
And I reply "s1 earliest" post from "discussion1" forum with:
|
||||
| Message | This is a private reply |
|
||||
| Reply privately | 1 |
|
||||
And I log out
|
||||
|
||||
Scenario: Private replies are counted for Teacher
|
||||
When I am on the forum1 "forum activity" page logged in as teacher2
|
||||
|
|
|
@ -19,8 +19,8 @@ Feature: Report relevant content availability
|
|||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber |
|
||||
| forum | forum1 | C1 forum | C1 | forum1 |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | forum1 | C1 | forum1 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | attachments | inlineattachments |
|
||||
| teacher1 | forum1 | discussion1 | message 1 | | |
|
||||
|
|
|
@ -21,10 +21,10 @@ Feature: Attachments count column data available
|
|||
| student2 | C1 | student |
|
||||
| teacher1 | C2 | editingteacher |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber |
|
||||
| forum | forum1 | C1 first forum | C1 | forum1C1 |
|
||||
| forum | forum2 | C1 second forum | C1 | forum2C1 |
|
||||
| forum | forum1 | C2 first forum | C2 | forum1C2 |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | forum1 | C1 | forum1C1 |
|
||||
| forum | forum2 | C1 | forum2C1 |
|
||||
| forum | forum1 | C2 | forum1C2 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | attachments | inlineattachments |
|
||||
| teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | |
|
||||
|
|
|
@ -21,10 +21,10 @@ Feature: Post date columns data available
|
|||
| student2 | C1 | student |
|
||||
| teacher1 | C2 | editingteacher |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber |
|
||||
| forum | forum1 | C1 first forum | C1 | forum1C1 |
|
||||
| forum | forum2 | C1 second forum | C1 | forum2C1 |
|
||||
| forum | forum1 | C2 first forum | C2 | forum1C2 |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | forum1 | C1 | forum1C1 |
|
||||
| forum | forum2 | C1 | forum2C1 |
|
||||
| forum | forum1 | C2 | forum1C2 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | created |
|
||||
| teacher1 | forum1 | discussion1 | t1 earliest | ##2018-01-02 09:00:00## |
|
||||
|
|
|
@ -34,10 +34,10 @@ Feature: Groups report filter is available if groups exist
|
|||
| teacher1 | G3 |
|
||||
| student1 | G3 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber | groupmode |
|
||||
| forum | forum1 | C1 first forum | C1 | c1forum1 | 1 |
|
||||
| forum | forum2 | C1 second forum | C1 | c1forum2 | 2 |
|
||||
| forum | forum1 | C2 first forum | C2 | c2forum1 | 0 |
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | forum1 | C1 | c1forum1 | 1 |
|
||||
| forum | forum2 | C1 | c1forum2 | 2 |
|
||||
| forum | forum1 | C2 | c2forum1 | 0 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | group | created |
|
||||
| teacher1 | forum1 | discussion1 | D1 message | G1 | ## 1 month ago ## |
|
||||
|
|
|
@ -27,10 +27,10 @@ Feature: Groups report filter is not available if no groups exist
|
|||
| user | group |
|
||||
| teacher1 | G1 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | description | course | idnumber | groupmode |
|
||||
| forum | forum1 | C1 first forum | C1 | forum1C1 | 0 |
|
||||
| forum | forum2 | C1 second forum | C1 | forum2C1 | 0 |
|
||||
| forum | forum1 | C2 first forum | C2 | forum1C2 | 2 |
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | forum1 | C1 | forum1C1 | 0 |
|
||||
| forum | forum2 | C1 | forum2C1 | 0 |
|
||||
| forum | forum1 | C2 | forum1C2 | 2 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | created |
|
||||
| teacher1 | forum1 | discussion1 | D1 message | ## 1 month ago ## |
|
||||
|
|
|
@ -17,22 +17,16 @@ Feature: Add forum activities and discussions
|
|||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And I log 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 |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Forum post 1 |
|
||||
| Message | This is the body |
|
||||
And I log out
|
||||
And the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| name | Test forum name |
|
||||
| type | general |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | attachments |
|
||||
| teacher1 | Test forum name | Forum post 1 | this is the body | |
|
||||
| student1 | Test forum name | Post with attachment | this is the body | empty.txt |
|
||||
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:
|
||||
| Subject | Reply with attachment |
|
||||
| Message | This is the body |
|
||||
|
|
|
@ -13,20 +13,21 @@ Feature: Add forum activities and discussions utilizing the inline add discussio
|
|||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And I log 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 |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Forum post 1 |
|
||||
| Message | This is the body |
|
||||
And I log out
|
||||
And the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | 0001 |
|
||||
| name | Test forum name |
|
||||
| type | general |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 0001 |
|
||||
| course | C1 |
|
||||
| user | teacher1 |
|
||||
| name | Forum post 1 |
|
||||
| message | This is the body |
|
||||
|
||||
Scenario: Student can add a discussion via the inline form
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I am on the "Course 1" course page logged in as student1
|
||||
Then I add a new discussion to "Test forum name" forum inline with:
|
||||
| Subject | Post with attachment |
|
||||
| Message | This is the body |
|
||||
|
|
|
@ -15,22 +15,17 @@ Feature: As a teacher, you can manually lock individual discussions when viewing
|
|||
| course | C1 |
|
||||
| activity | forum |
|
||||
| name | Test forum name |
|
||||
And I am on the "Course 1" course page logged in as admin
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Discussion 1 |
|
||||
| Message | Discussion contents 1, first message |
|
||||
And I reply "Discussion 1" post from "Test forum name" forum with:
|
||||
| Subject | Reply 1 to discussion 1 |
|
||||
| Message | Discussion contents 1, second message |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| 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 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Discussion 1 | Discussion contents 1, first message |
|
||||
| admin | Test forum name | Discussion 2 | Discussion contents 2, first message |
|
||||
And the following forum replies exist in course "Course 1":
|
||||
| user | forum | discussion | subject | message |
|
||||
| admin | Test forum name | Discussion 1 | Reply 1 to discussion 1 | Discussion contents 1, second message |
|
||||
| admin | Test forum name | Discussion 2 | Reply 1 to discussion 2 | Discussion contents 2, second message |
|
||||
|
||||
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 press "Settings"
|
||||
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 follow "Discussion 2"
|
||||
Then I should not see "This discussion has been locked so you can no longer reply to it."
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "Course 1" course page logged in as student1
|
||||
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."
|
||||
And "Reply" "link" should not be visible
|
||||
|
||||
@accessibility
|
||||
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
|
||||
When I reply "Discussion 1" post from "Test forum name" forum with:
|
||||
| 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"
|
||||
# Check discussion view accessibility with info notification shown when discussion is locked.
|
||||
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
|
||||
# Check discussion list accessibility with danger pill shown when discussion is locked.
|
||||
And the page should meet accessibility standards with "wcag143" extra tests
|
||||
|
|
|
@ -31,11 +31,9 @@ Feature: A user can navigate to previous and next discussions
|
|||
|
||||
Scenario: A user can navigate between discussions
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Test forum name | Test forum name | C1 | forum | 0 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Test forum name | C1 | forum | 0 |
|
||||
And I am on the "Test forum name" "forum activity" page logged in as teacher1
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Discussion 1 |
|
||||
| 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
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Test forum name | Test forum name | C1 | forum | 2 |
|
||||
And I log 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:
|
||||
| Subject | Discussion 1 Group 0 |
|
||||
| Message | Test post message |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Discussion 2 Group 0 |
|
||||
| Message | Test post message |
|
||||
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"
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Test forum name | C1 | forum | 2 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | group |
|
||||
| teacher1 | Test forum name | Discussion 1 Group 0 | Test post message | |
|
||||
| teacher1 | Test forum name | Discussion 2 Group 0 | Test post message | |
|
||||
| teacher1 | Test forum name | Discussion 1 Group 1 | Test post message | G1 |
|
||||
| teacher1 | Test forum name | Discussion 2 Group 1 | Test post message | G1 |
|
||||
| teacher1 | Test forum name | Discussion 1 Group 2 | Test post message | G2 |
|
||||
| teacher1 | Test forum name | Discussion 2 Group 2 | Test post message | G2 |
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
And I select "All participants" from the "Visible groups" singleselect
|
||||
And I follow "Discussion 1 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
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Test forum name | Test forum name | C1 | forum | 1 |
|
||||
And I log 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:
|
||||
| Subject | Discussion 1 Group 0 |
|
||||
| Message | Test post message |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Discussion 2 Group 0 |
|
||||
| Message | Test post message |
|
||||
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"
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Test forum name | C1 | forum | 1 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message | group |
|
||||
| teacher1 | Test forum name | Discussion 1 Group 0 | Test post message | |
|
||||
| teacher1 | Test forum name | Discussion 2 Group 0 | Test post message | |
|
||||
| teacher1 | Test forum name | Discussion 1 Group 1 | Test post message | G1 |
|
||||
| teacher1 | Test forum name | Discussion 2 Group 1 | Test post message | G1 |
|
||||
| teacher1 | Test forum name | Discussion 1 Group 2 | Test post message | G2 |
|
||||
| teacher1 | Test forum name | Discussion 2 Group 2 | Test post message | G2 |
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
And I follow "Discussion 1 Group 1"
|
||||
Then I should see "Discussion 2 Group 0"
|
||||
And I should see "Discussion 2 Group 1"
|
||||
|
|
|
@ -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 click on "Test post subject two" "link"
|
||||
And I should not see "Reply"
|
||||
And I log out
|
||||
# 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 should see "Add discussion topic"
|
||||
|
|
|
@ -14,7 +14,6 @@ Feature: A user can control their own subscription preferences for a discussion
|
|||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
And I log in as "admin"
|
||||
|
||||
@javascript
|
||||
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 |
|
||||
| idnumber | forum1 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| type | general |
|
||||
| forcesubscribe | 0 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
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 the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Test post subject one | Test post message one |
|
||||
| admin | Test forum name | Test post subject two | Test post message two |
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
Then I can subscribe to this forum
|
||||
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 |
|
||||
| idnumber | forum1 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| type | general |
|
||||
| forcesubscribe | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
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 the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Test post subject one | Test post message one |
|
||||
| admin | Test forum name | Test post subject two | Test post message two |
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
Then I can unsubscribe from this forum
|
||||
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 |
|
||||
| idnumber | forum1 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| type | general |
|
||||
| forcesubscribe | 0 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
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 the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Test post subject one | Test post message one |
|
||||
| admin | Test forum name | Test post subject two | Test post message two |
|
||||
And I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
And I can subscribe to this forum
|
||||
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 "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 I log out
|
||||
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 am on the "Test forum name" "forum activity editing" page logged in as admin
|
||||
And I set the following fields to these values:
|
||||
| Subscription mode | Auto subscription |
|
||||
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 can unsubscribe from this forum
|
||||
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 |
|
||||
| idnumber | forum1 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| type | general |
|
||||
| forcesubscribe | 0 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
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 the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Test post subject one | Test post message one |
|
||||
| admin | Test forum name | Test post subject two | Test post message two |
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
And I should see "Subscribe to forum"
|
||||
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 |
|
||||
| idnumber | forum1 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| type | general |
|
||||
| forcesubscribe | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject two |
|
||||
| Message | Test post message two |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Test post subject one | Test post message one |
|
||||
| admin | Test forum name | Test post subject two | Test post message two |
|
||||
# added for this scenario
|
||||
And the following "users" exist:
|
||||
| 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:
|
||||
| user | course | role |
|
||||
| student2 | C1 | student |
|
||||
And I log out
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student2
|
||||
And I should see "Unsubscribe from forum"
|
||||
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
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | section | idnumber | type |
|
||||
| forum | Test forum name | Test forum description | Acceptance test site | 1 | forum1 | general |
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
And I log out
|
||||
When I log in as "guest"
|
||||
And I follow "Test forum name"
|
||||
| activity | name | course | section | idnumber | type |
|
||||
| forum | Test forum name | Acceptance test site | 1 | forum1 | general |
|
||||
And the following forum discussions exist in course "Acceptance test site":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Test post subject one | Test post message one |
|
||||
When I am on the "Test forum name" "forum activity" page logged in as guest
|
||||
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 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
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | section | idnumber | type |
|
||||
| forum | Test forum name | Test forum description | Acceptance test site | 1 | forum1 | general |
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
And I log out
|
||||
When I follow "Test forum name"
|
||||
| activity | name | course | section | idnumber | type |
|
||||
| forum | Test forum name | Acceptance test site | 1 | forum1 | general |
|
||||
And the following forum discussions exist in course "Acceptance test site":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Test post subject one | Test post message one |
|
||||
When I am on site homepage
|
||||
And I follow "Test forum name"
|
||||
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 I follow "Test post subject one"
|
||||
|
@ -273,14 +238,11 @@ Feature: A user can control their own subscription preferences for a discussion
|
|||
| course | C1 |
|
||||
| idnumber | forum1 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| type | general |
|
||||
| forcesubscribe | 0 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
And I log out
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Test post subject one | Test post message one |
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
Then "Subscribe to forum" "link" should exist
|
||||
And I follow "Test post subject one"
|
||||
|
|
|
@ -15,10 +15,9 @@ Feature: Students can edit or delete their forum posts within a set time limit
|
|||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| forum | Test forum name | Test forum description | C1 | forum |
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
| activity | name | course | idnumber |
|
||||
| forum | Test forum name | C1 | forum |
|
||||
And I am on the "Course 1" course page logged in as student1
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Forum post subject |
|
||||
| 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 |
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Recent activity" block
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "Course 1" course page logged in as student1
|
||||
And I should see "New forum posts:" in the "Recent activity" "block"
|
||||
And I should see "Forum post subject" in the "Recent activity" "block"
|
||||
When I wait "2" seconds
|
||||
|
|
|
@ -17,25 +17,17 @@ Feature: Teachers can edit or delete any forum post
|
|||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | section | idnumber |
|
||||
| forum | Test forum name | Test forum description | C1 | 1 | forum1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Teacher post subject |
|
||||
| Message | Teacher post message |
|
||||
And I log out
|
||||
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 |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | Test forum name | C1 | forum1 |
|
||||
And the following "mod_forum > discussions" exist:
|
||||
| forum | course | user | name | message |
|
||||
| forum1 | C1 | teacher1 | Teacher post subject | Teacher post message |
|
||||
And the following "mod_forum > posts" exist:
|
||||
| user | parentsubject | subject | message |
|
||||
| student1 | Teacher post subject | Student post subject | Student post message |
|
||||
|
||||
Scenario: A teacher can delete another user's posts
|
||||
Given I log out
|
||||
And I log in as "teacher1"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I am on the "Test forum name" "forum activity" page logged in as teacher1
|
||||
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 press "Continue"
|
||||
|
@ -43,10 +35,7 @@ Feature: Teachers can edit or delete any forum post
|
|||
And I should not see "Student post message"
|
||||
|
||||
Scenario: A teacher can edit another user's posts
|
||||
Given I log out
|
||||
And I log in as "teacher1"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I am on the "Test forum name" "forum activity" page logged in as teacher1
|
||||
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 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"
|
||||
|
||||
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"
|
||||
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"
|
||||
|
|
|
@ -20,11 +20,9 @@ Feature: Edited forum posts handle tags correctly
|
|||
| course | C1 |
|
||||
| activity | forum |
|
||||
| name | Test forum name |
|
||||
And I am on the "Course 1" Course page logged in as teacher1
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Teacher post subject |
|
||||
| Message | Teacher post message |
|
||||
And I log out
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| teacher1 | Test forum name | Teacher post subject | Teacher post message |
|
||||
|
||||
@javascript
|
||||
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 set the field "Enter comma-separated list of new tags" to "OT1, OT2, OT3"
|
||||
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 click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
|
|
|
@ -15,14 +15,12 @@ Feature: A student can favourite a discussion via the forum settings menu
|
|||
| course | C1 |
|
||||
| activity | forum |
|
||||
| name | Test forum name |
|
||||
And I am on the "Course 1" Course page logged in as admin
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Discussion 1 |
|
||||
| Message | Discussion contents 1, first message |
|
||||
And I reply "Discussion 1" post from "Test forum name" forum with:
|
||||
| Subject | Reply 1 to discussion 1 |
|
||||
| Message | Discussion contents 1, second message |
|
||||
And I log out
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| admin | Test forum name | Discussion 1 | Discussion contents 1, first message |
|
||||
And the following forum replies exist in course "Course 1":
|
||||
| user | forum | discussion | name | message |
|
||||
| admin | Test forum name | Discussion 1 | Reply 1 to discussion 1 | Discussion contents 1, second message |
|
||||
|
||||
Scenario: Student can favourite a discussion from within an individual discussion
|
||||
Given I am on the "Course 1" Course page logged in as student1
|
||||
|
|
|
@ -14,7 +14,6 @@ Feature: A teacher or admin can view breadcrumbs in the reply, delete, split, ed
|
|||
And the following "activity" exists:
|
||||
| course | C1 |
|
||||
| activity | forum |
|
||||
| intro | Test forum description |
|
||||
| name | Test forum name |
|
||||
|
||||
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"
|
||||
|
||||
Scenario: A teacher adds posts and then verifies the breadcrumbs in the links
|
||||
Given I log in as "teacher"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I am on the "Course 1" course page logged in as teacher
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject one |
|
||||
| Message | Test post message one |
|
||||
|
|
|
@ -21,7 +21,6 @@ Feature: View activity completion in the forum activity
|
|||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
And I am on the "Music history" "forum activity editing" page logged in as teacher1
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
|
@ -36,7 +35,6 @@ Feature: View activity completion in the forum activity
|
|||
| completionrepliesenabled | 1 |
|
||||
| completionreplies | 1 |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
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 "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 I log out
|
||||
# Grade the student
|
||||
And I am on the "Music history" "forum activity" page logged in as teacher1
|
||||
And I press "Grade users"
|
||||
And I set the field "grade" to "33"
|
||||
And I press "Save"
|
||||
And I press "Close grader"
|
||||
And I log out
|
||||
# All conditions should now be completed.
|
||||
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"
|
||||
|
@ -90,14 +86,12 @@ Feature: View activity completion in the forum activity
|
|||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given I am on the "Music history" "forum activity" page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
Given I am on the "Music history" "forum activity editing" page logged in as teacher1
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
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"
|
||||
|
|
|
@ -16,8 +16,7 @@ Feature: Completion pass grade view activity completion in the forum activity
|
|||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "Course 1" course page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
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 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
And I am on the "Music history" "forum activity" page
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I am on the "Music history" "forum activity editing" page
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Whole forum grading > Type | Point |
|
||||
|
@ -47,7 +44,6 @@ Feature: Completion pass grade view activity completion in the forum activity
|
|||
| completionrepliesenabled | 1 |
|
||||
| completionreplies | 1 |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
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 "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 I log out
|
||||
# Grade the student
|
||||
And I am on the "Music history" "forum activity" page logged in as teacher1
|
||||
And I press "Grade users"
|
||||
And I set the field "grade" to "33"
|
||||
And I press "Save"
|
||||
And I press "Close grader"
|
||||
And I log out
|
||||
# All conditions should now be completed.
|
||||
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"
|
||||
|
@ -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 "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 I log out
|
||||
# Grade the student
|
||||
And I am on the "Music history" "forum activity" page logged in as teacher1
|
||||
And I press "Grade users"
|
||||
And I set the field "grade" to "60"
|
||||
And I press "Save"
|
||||
And I press "Close grader"
|
||||
And I log out
|
||||
# All conditions should now be completed.
|
||||
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"
|
||||
|
|
|
@ -18,8 +18,8 @@ Feature: Export forum
|
|||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | type | course | idnumber |
|
||||
| forum | Test forum 1 | Test forum 1 description | general | C1 | 123 |
|
||||
| activity | name | type | course | idnumber |
|
||||
| forum | Test forum 1 | general | C1 | 123 |
|
||||
|
||||
Scenario: Teacher can export forum
|
||||
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"
|
||||
# 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 log out
|
||||
|
||||
Scenario: Students cannot export forum by default
|
||||
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
|
||||
And I log out
|
||||
|
||||
Scenario: User with the capability can export
|
||||
Given the following "permission overrides" exist:
|
||||
|
|
|
@ -14,7 +14,6 @@ Feature: A teacher or admin can view subscriptions tab
|
|||
And the following "activity" exists:
|
||||
| course | C1 |
|
||||
| activity | forum |
|
||||
| intro | Test forum description |
|
||||
| name | Test forum name |
|
||||
|
||||
Scenario: A teacher views view subscribers by default and views the Subscribers heading
|
||||
|
|
|
@ -14,7 +14,6 @@ Feature: A teacher or admin when changes the subscription mode should land in th
|
|||
And the following "activity" exists:
|
||||
| course | C1 |
|
||||
| activity | forum |
|
||||
| intro | Test forum description |
|
||||
| name | Test forum name |
|
||||
|
||||
Scenario: A teacher views subscriptions tab and changes the subscriptions mode to forced mode and lands in subscription tab
|
||||
|
|
|
@ -14,84 +14,42 @@ Feature: A user can control their own subscription preferences for a forum
|
|||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| 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"
|
||||
|
||||
Scenario: A disallowed subscription forum cannot be subscribed to
|
||||
Given the following "activity" exists:
|
||||
| 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
|
||||
Given I am on the "Test forum name" "forum activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Subscription mode | Subscription disabled |
|
||||
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
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
Then I should not see "Subscribe to 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 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
|
||||
Given the following "activity" exists:
|
||||
| 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
|
||||
Given I am on the "Test forum name" "forum activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Subscription mode | Forced subscription |
|
||||
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
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
Then I should not see "Subscribe to 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 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
|
||||
Given the following "activity" exists:
|
||||
| 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
|
||||
Given I am on the "Test forum name" "forum activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Subscription mode | Optional subscription |
|
||||
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
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
Then I should see "Subscribe to forum"
|
||||
And I should not see "Unsubscribe from 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"
|
||||
|
||||
Scenario: An Automatic forum can be unsubscribed from
|
||||
Given the following "activity" exists:
|
||||
| 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
|
||||
Given I am on the "Test forum name" "forum activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Subscription mode | Auto subscription |
|
||||
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
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
Then I should see "Unsubscribe from forum"
|
||||
And I should not see "Subscribe to forum"
|
||||
And I follow "Unsubscribe from forum"
|
||||
|
|
|
@ -34,17 +34,17 @@ Feature: As a teacher I need to see an accurate list of subscribed users
|
|||
And the following "grouping groups" exist:
|
||||
| grouping | group |
|
||||
| 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 am on "Course 1" course homepage with editing mode on
|
||||
|
||||
@javascript
|
||||
Scenario: A forced forum lists all subscribers
|
||||
When I add a "Forum" to section "1" and I fill the form with:
|
||||
| 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
|
||||
When I am on the "Forced Forum 1" "forum activity" page
|
||||
And I navigate to "Subscriptions" in current page administration
|
||||
Then I should see "Student 1"
|
||||
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"
|
||||
|
||||
Scenario: A forced forum does not allow to edit the subscribers
|
||||
Given the following "activity" exists:
|
||||
| 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
|
||||
Given I am on the "Forced Forum 2" "forum activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Subscription mode | Forced subscription |
|
||||
| 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"
|
||||
|
||||
Scenario: A forced and hidden forum lists only teachers
|
||||
Given the following "activity" exists:
|
||||
| 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
|
||||
Given I am on the "Forced Forum 2" "forum activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Subscription mode | Forced subscription |
|
||||
| Availability | Hide on course page |
|
||||
|
@ -108,19 +90,13 @@ Feature: As a teacher I need to see an accurate list of subscribed users
|
|||
|
||||
@javascript
|
||||
Scenario: An automatic forum lists all subscribers
|
||||
When I add a "Forum" to section "1" and I fill the form with:
|
||||
| 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
|
||||
When I am on the "Forced Forum 3" "forum activity" page
|
||||
And I navigate to "Subscriptions" in current page administration
|
||||
Then I should see "Student 1"
|
||||
And I should see "Teacher Teacher"
|
||||
And I should see "Student 2"
|
||||
And I should see "Student 3"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "Forced Forum 1" "forum activity editing" page
|
||||
And I am on the "Forced Forum 3" "forum activity editing" page
|
||||
And I expand all fieldsets
|
||||
And I click on "Add restriction..." "button"
|
||||
And I click on "Grouping" "button" in the "Add restriction..." "dialogue"
|
||||
|
|
|
@ -17,36 +17,31 @@ Feature: A user can control their default discussion subscription settings
|
|||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | type | section |
|
||||
| forum | Test forum name | Test forum description | C1 | forump1 | general | 1 |
|
||||
| activity | name | course | idnumber | type |
|
||||
| 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 set the following fields to these values:
|
||||
| Subscription mode | Optional subscription |
|
||||
And I press "Save and return to course"
|
||||
And I log out
|
||||
|
||||
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
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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 click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist
|
||||
|
||||
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
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And I log out
|
||||
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" page logged in as student1
|
||||
And I follow "Test post subject"
|
||||
When I follow "Reply"
|
||||
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 follow "Test post subject"
|
||||
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:
|
||||
| Subscription mode | Auto subscription |
|
||||
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
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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 click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist
|
||||
|
||||
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:
|
||||
| Subscription mode | Optional subscription |
|
||||
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 follow "Test post subject"
|
||||
When I follow "Reply"
|
||||
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 follow "Test post subject"
|
||||
And I follow "Reply"
|
||||
|
@ -89,21 +80,19 @@ Feature: A user can control their default discussion subscription settings
|
|||
|
||||
@javascript
|
||||
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:
|
||||
| Subscription mode | Auto subscription |
|
||||
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 click on "input[id^=subscription-toggle]" "css_element" in the "Test post subject" "table_row"
|
||||
And I follow "Test post subject"
|
||||
When I follow "Reply"
|
||||
And I click on "Advanced" "button"
|
||||
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 click on "input[id^=subscription-toggle]" "css_element" in the "Test post subject" "table_row"
|
||||
And I follow "Test post subject"
|
||||
|
|
|
@ -24,11 +24,8 @@ Feature: A teacher can control the subscription to a forum
|
|||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | f01 |
|
||||
| intro | Test forum description |
|
||||
| name | Test forum name |
|
||||
When I log in as "teacher"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I am on the "Test forum name" "forum activity" page logged in as teacher
|
||||
And I navigate to "Subscriptions" in current page administration
|
||||
Then I select "Manage subscribers" from the "Subscribers" singleselect
|
||||
And "Add" "button" should exist
|
||||
|
|
|
@ -19,15 +19,12 @@ Feature: Changes to the subscription mode of a forum can change subcribers of a
|
|||
| activity | forum |
|
||||
| idnumber | f01 |
|
||||
| course | C1 |
|
||||
| intro | Test forum description |
|
||||
| name | Test forum name |
|
||||
| type | general |
|
||||
| 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
|
||||
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
|
||||
When I select "Auto subscription" from the "Subscription mode" singleselect
|
||||
Then I should not see "There are no subscribers yet for this forum"
|
||||
|
|
|
@ -23,17 +23,18 @@ Feature: I can grade a students interaction across a forum
|
|||
And the following "scales" exist:
|
||||
| name | scale |
|
||||
| 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 change window size to "large"
|
||||
And I am on "Course 1" course homepage
|
||||
And I turn editing mode on
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
|
||||
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 set the following fields to these values:
|
||||
| Forum name | Test Forum 1 |
|
||||
| Description | Test |
|
||||
|
||||
# Fields should be hidden when grading is not set.
|
||||
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"
|
||||
When I press "Save and return to course"
|
||||
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.
|
||||
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"
|
||||
|
||||
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 set the following fields to these values:
|
||||
| Forum name | Test Forum 1 |
|
||||
| Description | Test |
|
||||
|
||||
# Fields should be hidden when grading is not set.
|
||||
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"
|
||||
|
||||
Scenario: Setting both a rating and a whole forum grade does not bleed
|
||||
Given the following "activity" exists:
|
||||
| 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
|
||||
Given I am on the "Test Forum 1" "forum activity editing" page
|
||||
And I expand all fieldsets
|
||||
|
||||
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 > 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 press "Save and return to course"
|
||||
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.
|
||||
Then I should see "Test Forum 1 rating"
|
||||
|
|
|
@ -22,7 +22,6 @@ Feature: View discussion while grading in a forum
|
|||
And the following "activity" exists:
|
||||
| activity | forum |
|
||||
| name | Gradable forum |
|
||||
| intro | Standard forum description |
|
||||
| course | C1 |
|
||||
| idnumber | forum1 |
|
||||
| grade_forum | 100 |
|
||||
|
|
|
@ -26,13 +26,11 @@ Feature: Forums in 'No groups' mode allow posting to All participants for all us
|
|||
| teacher1 | G2 |
|
||||
| student1 | G1 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Standard forum name | Standard forum description | C1 | nogroups | 0 |
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Standard forum name | C1 | nogroups | 0 |
|
||||
|
||||
Scenario: Teacher can post
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
And I should not see "Group A"
|
||||
And I should not see "Group B"
|
||||
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"
|
||||
|
||||
Scenario: Student can post
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as student1
|
||||
And I should not see "Group A"
|
||||
And I should not see "Group B"
|
||||
When I click on "Add discussion topic" "link"
|
||||
|
|
|
@ -22,8 +22,8 @@ Feature: Inline editing H5P content in mod_forum
|
|||
| contextlevel | reference | contenttype | user | contentname | filepath |
|
||||
| Course | C1 | contenttype_h5p | admin | Greeting card | /h5p/tests/fixtures/greeting-card.h5p |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | introformat | course | content | contentformat | idnumber |
|
||||
| forum | ForumName1 | PageDesc1 | 1 | C1 | H5Ptest | 1 | 1 |
|
||||
| activity | name | introformat | course | content | contentformat | idnumber |
|
||||
| forum | ForumName1 | 1 | C1 | H5Ptest | 1 | 1 |
|
||||
And the "displayh5p" filter is "on"
|
||||
# Override this capability to let teachers and students to Turn editing on.
|
||||
And the following "permission overrides" exist:
|
||||
|
@ -33,10 +33,8 @@ Feature: Inline editing H5P content in mod_forum
|
|||
|
||||
@javascript @repository_contentbank
|
||||
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.
|
||||
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 "Browse repositories..." "button" in the "Insert H5P" "dialogue"
|
||||
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
|
||||
# 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 turn editing mode on
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I am on the "ForumName1" "forum activity" page
|
||||
And I should not see "Edit H5P content"
|
||||
And I log out
|
||||
# Check student1 can't see the Edit button.
|
||||
And I log in as "student1"
|
||||
And I turn editing mode on
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I am on the "ForumName1" "forum activity" page
|
||||
And I should not see "Edit H5P content"
|
||||
|
||||
@javascript @repository_contentbank
|
||||
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.
|
||||
And I am on the "ForumName1" "forum activity" page
|
||||
And I click on "Add discussion topic" "link"
|
||||
And I set the following fields to these values:
|
||||
| Subject | Forum post by admin |
|
||||
|
@ -111,16 +106,14 @@ Feature: Inline editing H5P content in mod_forum
|
|||
And I log out
|
||||
# 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 turn editing mode on
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I am on the "ForumName1" "forum activity" page
|
||||
And I follow "Forum post by admin"
|
||||
And I should see "Edit H5P content"
|
||||
And I log out
|
||||
# Check student1 can't see the Edit button.
|
||||
And I log in as "student1"
|
||||
And I turn editing mode on
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I am on the "ForumName1" "forum activity" page
|
||||
And I follow "Forum post by admin"
|
||||
And I should not see "Edit H5P content"
|
||||
|
|
|
@ -13,35 +13,30 @@ Feature: Students can reply to a discussion in page.
|
|||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log 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 |
|
||||
| Description | Test forum description |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Discussion 1 |
|
||||
| Message | Discussion contents 1, first message |
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Discussion 2 |
|
||||
| Message | Discussion contents 2, first message |
|
||||
And I log out
|
||||
And the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | 0001 |
|
||||
| name | Test forum name |
|
||||
And the following "mod_forum > discussions" exist:
|
||||
| forum | course | user | name | message |
|
||||
| 0001 | C1 | teacher1 | Discussion 1 | Discussion contents 1, first message |
|
||||
| 0001 | C1 | teacher1 | Discussion 2 | Discussion contents 2, first message |
|
||||
|
||||
Scenario: Confirm inpage replies work
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I reply "Discussion 2" post from "Test forum name" forum using an inpage reply with:
|
||||
Given I am on the "Course 1" course page logged in as student1
|
||||
When I reply "Discussion 2" post from "Test forum name" forum using an inpage reply with:
|
||||
| post | Discussion contents 1, third message |
|
||||
Then I should see "Discussion contents 1, third message"
|
||||
When I reload the page
|
||||
Then I should see "Discussion contents 1, third message"
|
||||
And I reload the page
|
||||
And I should see "Discussion contents 1, third message"
|
||||
|
||||
Scenario: Confirm inpage replies work - private reply
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I reply "Discussion 2" post from "Test forum name" forum using an inpage reply with:
|
||||
Given I am on the "Course 1" course page logged in as teacher1
|
||||
When I reply "Discussion 2" post from "Test forum name" forum using an inpage reply with:
|
||||
| post | Discussion contents 1, third message |
|
||||
| privatereply | 1 |
|
||||
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.)"
|
||||
When I reload the page
|
||||
Then I should see "Discussion contents 1, third message"
|
||||
And 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 reload the page
|
||||
And I should see "Discussion contents 1, third message"
|
||||
|
|
|
@ -19,19 +19,13 @@ Feature: A teacher can move discussions between forums
|
|||
|
||||
Scenario: A teacher can move discussions
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Test forum 1 | Test forum 2 | C1 | forum | 0 |
|
||||
| forum | Test forum 2 | Test forum 1 | C1 | forum | 0 |
|
||||
And 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:
|
||||
| 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"
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Test forum 1 | C1 | forum | 0 |
|
||||
| forum | Test forum 2 | C1 | forum | 0 |
|
||||
And the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| student1 | Test forum 1 | Discussion 1 | Test post message |
|
||||
And I am on the "Test forum 1" "forum activity" page logged in as teacher1
|
||||
And I follow "Discussion 1"
|
||||
When I set the field "jump" to "Test forum 2"
|
||||
And I press "Move"
|
||||
|
|
|
@ -15,15 +15,15 @@ Feature: A user can view their posts and discussions
|
|||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Test forum name | Test forum | C1 | forum | 0 |
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| 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 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
|
||||
And I follow "Forum posts"
|
||||
Then I should see "How awesome is this forum discussion?"
|
||||
|
|
|
@ -14,15 +14,13 @@ Feature: Posting to forums in a course with no groups behaves correctly
|
|||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Standard forum | Standard forum description | C1 | nogroups | 0 |
|
||||
| forum | Visible forum | Visible forum description | C1 | visgroups | 2 |
|
||||
| forum | Separate forum | Separate forum description | C1 | sepgroups | 1 |
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Standard forum | C1 | nogroups | 0 |
|
||||
| forum | Visible forum | C1 | visgroups | 2 |
|
||||
| forum | Separate forum | C1 | sepgroups | 1 |
|
||||
|
||||
Scenario: Teachers can post in standard forum
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum"
|
||||
Given I am on the "Standard forum" "forum activity" page logged in as teacher1
|
||||
When I click on "Add discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
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"
|
||||
|
||||
Scenario: Teachers can post in forum with separate groups
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Separate forum"
|
||||
Given I am on the "Separate forum" "forum activity" page logged in as teacher1
|
||||
When I click on "Add discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
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"
|
||||
|
||||
Scenario: Teachers can post in forum with visible groups
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Visible forum"
|
||||
Given I am on the "Visible forum" "forum activity" page logged in as teacher1
|
||||
When I click on "Add discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
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"
|
||||
|
||||
Scenario: Students can post in standard forum
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum"
|
||||
Given I am on the "Standard forum" "forum activity" page logged in as student1
|
||||
When I click on "Add discussion topic" "link"
|
||||
Then I should not see "Post a copy to all groups"
|
||||
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"
|
||||
|
||||
Scenario: Students cannot post in forum with separate groups
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Separate forum"
|
||||
When I am on the "Separate forum" "forum activity" page logged in as student1
|
||||
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"
|
||||
|
||||
Scenario: Students cannot post in forum with visible groups
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Visible forum"
|
||||
When I am on the "Visible forum" "forum activity" page logged in as student1
|
||||
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"
|
||||
|
|
|
@ -16,28 +16,22 @@ Feature: Ensure only users with appropriate permissions can export forum discuss
|
|||
|
||||
Scenario: A teacher can export discussions to a portfolio.
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Test forum 1 | Test forum 2 | C1 | forum | 0 |
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Test forum 1 | C1 | forum | 0 |
|
||||
And I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| enableportfolios | 1 |
|
||||
And I navigate to "Plugins > Portfolios > Manage portfolios" in site administration
|
||||
And I set portfolio instance "File download" to "Enabled and visible"
|
||||
And I click on "Save" "button"
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum 1"
|
||||
When I am on the "Test forum 1" "forum activity" page logged in as student1
|
||||
And I add a new discussion to "Test forum 1" forum with:
|
||||
| Subject | Discussion 1 |
|
||||
| Message | Test post message |
|
||||
And I reload the page
|
||||
And I follow "Discussion 1"
|
||||
Then "Export whole discussion to portfolio" "button" should not exist
|
||||
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 am on the "Test forum 1" "forum activity" page logged in as teacher1
|
||||
And I follow "Discussion 1"
|
||||
And "Export whole discussion to portfolio" "button" should exist
|
||||
And I press "Export whole discussion to portfolio"
|
||||
|
|
|
@ -56,62 +56,34 @@ Feature: A user with access to multiple groups should be able to post a copy of
|
|||
| G1 | C2G1 |
|
||||
| G1 | C2G2 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode | grouping |
|
||||
| forum | No group forum | Test forum name | C1 | forum | 0 | |
|
||||
| forum | Separate group forum | Test forum name | C1 | forum | 1 | |
|
||||
| forum | Visible group forum | Test forum name | C1 | forum | 2 | |
|
||||
| forum | Groupings forum | Test forum name | C2 | forum | 1 | G1 |
|
||||
| activity | name | course | idnumber | groupmode | grouping |
|
||||
| forum | No group forum | C1 | forum | 0 | |
|
||||
| forum | Separate group forum | C1 | forum | 1 | |
|
||||
| forum | Visible group forum | C1 | forum | 2 | |
|
||||
| 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
|
||||
Given I log in as "teacher1"
|
||||
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"
|
||||
When I am on the "Separate group forum" "forum activity" page logged in as student1
|
||||
Then I should see "Discussion 1"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Separate group forum"
|
||||
And I am on the "Separate group forum" "forum activity" page logged in as student2
|
||||
And I should see "Discussion 1"
|
||||
And I log out
|
||||
And I log in as "student3"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Separate group forum"
|
||||
And I am on the "Separate group forum" "forum activity" page logged in as student3
|
||||
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
|
||||
Given I log in as "teacher1"
|
||||
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"
|
||||
When I am on the "Visible group forum" "forum activity" page logged in as student1
|
||||
Then I should see "Discussion 1"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Visible group forum"
|
||||
And I am on the "Visible group forum" "forum activity" page logged in as student2
|
||||
And I should see "Discussion 1"
|
||||
And I log out
|
||||
And I log in as "student3"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Visible group forum"
|
||||
And I am on the "Visible group forum" "forum activity" page logged in as student2
|
||||
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
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "No group forum"
|
||||
Given I am on the "No group forum" "forum activity" page logged in as teacher1
|
||||
And I click on "Add discussion topic" "link"
|
||||
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 |
|
||||
| Message | test |
|
||||
| Post a copy to all groups | 1 |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 2" course homepage
|
||||
When I follow "Groupings forum"
|
||||
When I am on the "Groupings forum" "forum activity" page logged in as student1
|
||||
Then I should see "Discussion 1"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 2" course homepage
|
||||
And I follow "Groupings forum"
|
||||
And I am on the "Groupings forum" "forum activity" page logged in as student2
|
||||
And I should not see "Discussion 1"
|
||||
|
|
|
@ -20,6 +20,14 @@ Feature: New discussions and discussions with recently added replies are display
|
|||
| course | C1 |
|
||||
| activity | 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
|
||||
|
@ -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
|
||||
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.
|
||||
#
|
||||
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 |
|
||||
And I press "Save changes"
|
||||
And I wait to be redirected
|
||||
And I log out
|
||||
#
|
||||
# Reply to another forum post.
|
||||
#
|
||||
|
|
|
@ -15,65 +15,38 @@ Feature: Forum posts can be replied to in private
|
|||
| fullname | shortname | category |
|
||||
| Science 101 | C1 | 0 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| forum | Study discussions | Test forum description | C1 | forum |
|
||||
| activity | name | course | idnumber |
|
||||
| forum | Study discussions | C1 | forum |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| teacher2 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And I log in as "student1"
|
||||
And I am on "Science 101" course homepage
|
||||
And I add a new discussion to "Study discussions" forum with:
|
||||
| Subject | Answers to the homework |
|
||||
| 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 the following forum discussions exist in course "Science 101":
|
||||
| user | forum | name | message |
|
||||
| student1 | Study discussions | Answers to the homework | Here are the answers to last night's homework. |
|
||||
And I am on the "Science 101" course page logged in as teacher1
|
||||
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? |
|
||||
| Reply privately | 1 |
|
||||
|
||||
Scenario: As a teacher I can see my own response
|
||||
Given I follow "Study discussions"
|
||||
And I follow "Answers to the homework"
|
||||
Given I am on the "Study discussions" "forum activity" page logged in as teacher1
|
||||
When I follow "Answers to the homework"
|
||||
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
|
||||
Given I log out
|
||||
And I log in as "teacher2"
|
||||
And I am on "Science 101" course homepage
|
||||
And I follow "Study discussions"
|
||||
Given I am on the "Study discussions" "forum activity" page logged in as teacher2
|
||||
When I follow "Answers to the homework"
|
||||
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
|
||||
Given I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Science 101" course homepage
|
||||
And I follow "Study discussions"
|
||||
Scenario: As the intended recipient I can see my own response
|
||||
Given I am on the "Study discussions" "forum activity" page logged in as student1
|
||||
When I follow "Answers to the homework"
|
||||
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
|
||||
Given I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Science 101" course homepage
|
||||
And I follow "Study discussions"
|
||||
Scenario: As a non-privileged user I cannot see my own response
|
||||
Given I am on the "Study discussions" "forum activity" page logged in as student2
|
||||
When I follow "Answers to the homework"
|
||||
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?"
|
||||
|
|
|
@ -29,12 +29,12 @@ Feature: Users can see the relevant recent forum posts from the recent activity
|
|||
| teacher1 | G1 |
|
||||
| teacher1 | G2 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | type | groupmode | visible |
|
||||
| forum | Separate groups forum | Separate groups description | C1 | forum1 | general | 1 | 1 |
|
||||
| forum | Visible groups forum | Visible groups description | C1 | forum2 | general | 2 | 1 |
|
||||
| forum | Standard forum | Standard description | C1 | forum3 | general | 0 | 1 |
|
||||
| forum | Hidden forum | Hidden description | C1 | forum4 | general | 0 | 0 |
|
||||
| forum | Q&A forum | Q&A description | C1 | forum5 | qanda | 0 | 1 |
|
||||
| activity | name | course | idnumber | type | groupmode | visible |
|
||||
| forum | Separate groups forum | C1 | forum1 | general | 1 | 1 |
|
||||
| forum | Visible groups forum | C1 | forum2 | general | 2 | 1 |
|
||||
| forum | Standard forum | C1 | forum3 | general | 0 | 1 |
|
||||
| forum | Hidden forum | C1 | forum4 | general | 0 | 0 |
|
||||
| forum | Q&A forum | C1 | forum5 | qanda | 0 | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
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 |
|
||||
| Message | Group 1 members only |
|
||||
| Group | Group 1 |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
When I am on "Course 1" course homepage
|
||||
When I am on the "Course 1" course page logged in as student1
|
||||
Then I should see "Group 1 separate discussion" in the "Recent activity" "block"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "Course 1" course page logged in as student2
|
||||
And I should not see "Group 1 separate discussion" in the "Recent activity" "block"
|
||||
|
||||
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 |
|
||||
| Message | Not just for group 1 members |
|
||||
| Group | Group 1 |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
When I am on "Course 1" course homepage
|
||||
When I am on the "Course 1" course page logged in as student1
|
||||
Then I should see "Group 1 visible discussion" in the "Recent activity" "block"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "Course 1" course page logged in as student2
|
||||
And I should see "Group 1 visible discussion" in the "Recent activity" "block"
|
||||
|
||||
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 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 log out
|
||||
When I log in as "student1"
|
||||
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 "Standard forum discussion" 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
|
||||
Given I add a new discussion to "Hidden forum" forum with:
|
||||
| Subject | Hidden discussion |
|
||||
| Message | Should be hidden! |
|
||||
Given the following forum discussions exist in course "Course 1":
|
||||
| user | forum | name | message |
|
||||
| teacher1 | Hidden forum | Hidden discussion | Should be hidden! |
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "Hidden discussion" in the "Recent activity" "block"
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
When 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 "Hidden discussion" in the "Recent activity" "block"
|
||||
|
||||
Scenario: Recent forum activity with question and answer forum
|
||||
Given I add a new question to "Q&A forum" forum with:
|
||||
| Subject | The egg vs the chicken |
|
||||
| Message | Which came first? The egg or the chicken? |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "Course 1" course page logged in as student1
|
||||
And I reply "The egg vs the chicken" post from "Q&A forum" forum with:
|
||||
| Subject | Student 1's answer |
|
||||
| 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 the following config values are set as admin:
|
||||
| maxeditingtime | 1 |
|
||||
And I log out
|
||||
When I log in as "student2"
|
||||
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 "The egg vs the chicken" 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:
|
||||
|
@ -135,7 +119,5 @@ Feature: Users can see the relevant recent forum posts from the recent activity
|
|||
| timeend[day] | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "Timed discussion" in the "Recent activity" "block"
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
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 "Timed discussion" in the "Recent activity" "block"
|
||||
|
|
|
@ -46,8 +46,8 @@ Feature: Posting to all groups in a separate group discussion is restricted to u
|
|||
| student2 | G2 |
|
||||
| student3 | G4 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Standard forum name | Standard forum description | C1 | sepgroups | 1 |
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Standard forum name | C1 | sepgroups | 1 |
|
||||
And the following "mod_forum > discussions" exist:
|
||||
| forum | name | subject | message | group |
|
||||
| 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 |
|
||||
|
||||
Scenario: Teacher with accessallgroups can view all groups
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
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 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"
|
||||
And I should not see "Initial Disc G3"
|
||||
|
||||
Scenario: Teacher with accessallgroups can select any participation group when posting
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Scenario: Teacher with accessallgroups can select any group when posting
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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"
|
||||
|
||||
Scenario: Teacher with accessallgroups can post in groups they are a member of
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
And I select "Group A" from the "Separate groups" singleselect
|
||||
When I click on "Add discussion topic" "link"
|
||||
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"
|
||||
|
||||
Scenario: Teacher with accessallgroups can post in groups they are not a member of
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
And I select "Group A" from the "Separate groups" singleselect
|
||||
When I click on "Add discussion topic" "link"
|
||||
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"
|
||||
|
||||
Scenario: Teacher with accessallgroups can post to all groups
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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".
|
||||
|
||||
Scenario: Students in one group can only post in their group
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as student1
|
||||
Then I should see "Group A"
|
||||
And I click on "Add discussion topic" "link"
|
||||
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"
|
||||
|
||||
Scenario: Students in no group can see all group discussions, but not post.
|
||||
Given I log in as "student4"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as student4
|
||||
Then I should see "All participants"
|
||||
And I should see "Initial Disc ALL"
|
||||
And I should see "You are not able to create a discussion"
|
||||
And I should not see "Add discussion topic"
|
||||
|
||||
Scenario: Students in non-participation groups can see all group discussions, but not post.
|
||||
Given I log in as "student3"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as student3
|
||||
Then I should see "All participants"
|
||||
And I should see "Initial Disc ALL"
|
||||
And I should see "You are not able to create a discussion"
|
||||
And I should not see "Add discussion topic"
|
||||
|
||||
Scenario: Students in multiple group can post in all of their group individually
|
||||
Given I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as student2
|
||||
And I select "Group A" from the "Separate groups" singleselect
|
||||
And I click on "Add discussion topic" "link"
|
||||
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"
|
||||
|
||||
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:
|
||||
| moodle/site:accessallgroups | Prohibit |
|
||||
And I log out
|
||||
Given I log in as "noneditor1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
And I am on the "Standard forum name" "forum activity" page logged in as noneditor1
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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"
|
||||
|
||||
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:
|
||||
| moodle/site:accessallgroups | Prohibit |
|
||||
And I log out
|
||||
Given I log in as "noneditor1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
And I am on the "Standard forum name" "forum activity" page logged in as noneditor1
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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"
|
||||
|
||||
Scenario: Students can view all participants discussions in separate groups mode
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as student1
|
||||
Then I should see "Initial Disc ALL"
|
||||
|
|
|
@ -32,18 +32,20 @@ Feature: I can grade a students by group with separate groups
|
|||
| student1 | G3 |
|
||||
| student2 | G3 |
|
||||
| student3 | G3 |
|
||||
And the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| name | Test Forum 1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I turn editing mode on
|
||||
And I add a "Forum" to section "1"
|
||||
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 expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Forum name | Test Forum 1 |
|
||||
| Description | Test |
|
||||
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 press "Save and return to course"
|
||||
And I am on the "Test Forum 1" "forum activity" page
|
||||
And I press "Save and display"
|
||||
|
||||
@javascript
|
||||
Scenario: Grade users by group A
|
||||
|
@ -85,7 +87,6 @@ Feature: I can grade a students by group with separate groups
|
|||
| user | group |
|
||||
| teacher2 | G2 |
|
||||
| teacher2 | G3 |
|
||||
And I log out
|
||||
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 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 |
|
||||
| Message | Discussion message C |
|
||||
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
|
||||
And I select "Group C" from the "Separate groups" singleselect
|
||||
And I click on "Grade users" "button"
|
||||
|
|
|
@ -39,21 +39,18 @@ Feature: Posting to groups in a separate group discussion when restricted to gro
|
|||
| G1 | G1G2 |
|
||||
| G2 | G2G1 |
|
||||
And the following "activities" exist:
|
||||
| activity | course | idnumber | name | intro | type | section | groupmode | grouping |
|
||||
| forum | C1 | 00001 | Multiple groups forum | Standard forum description | general | 1 | 1 | G1 |
|
||||
| forum | C1 | 00001 | Single groups forum | Standard forum description | general | 1 | 1 | G2 |
|
||||
| activity | course | idnumber | name | type | groupmode | grouping |
|
||||
| forum | C1 | 00001 | Multiple groups forum | general | 1 | G1 |
|
||||
| forum | C1 | 00001 | Single groups forum | general | 1 | G2 |
|
||||
|
||||
Scenario: Teacher with accessallgroups can post in all groups
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Multiple groups forum"
|
||||
Given I am on the "Multiple groups forum" "forum activity" page logged in as teacher1
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
Then the "Group" select box should contain "All participants"
|
||||
And the "Group" select box should contain "G1G1"
|
||||
And the "Group" select box should contain "G1G2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Single groups forum"
|
||||
And I am on the "Single groups forum" "forum activity" page
|
||||
And I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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"
|
||||
|
||||
Scenario: Teacher in all groups but without accessallgroups can post in either group but not to All Participants
|
||||
Given I log in as "teacher2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Multiple groups forum"
|
||||
Given I am on the "Multiple groups forum" "forum activity" page logged in as teacher2
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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 "G1G2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Single groups forum"
|
||||
And I am on the "Single groups forum" "forum activity" page
|
||||
And I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
And I should see "G2G1"
|
||||
|
|
|
@ -21,15 +21,12 @@ Feature: Single simple forum discussion type
|
|||
| forum | Single discussion forum name | Single discussion forum description | single | C1 | forum |
|
||||
|
||||
Scenario: Teacher can start the single simple discussion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Single discussion forum name"
|
||||
When I am on the "Single discussion forum name" "forum activity" page logged in as teacher1
|
||||
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"
|
||||
|
||||
Scenario: Student can not add more discussions
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I am on the "Course 1" course page logged in as student1
|
||||
When I reply "Single discussion forum name" post from "Single discussion forum name" forum with:
|
||||
| Subject | Reply to single discussion subject |
|
||||
| Message | Reply to single discussion message |
|
||||
|
|
|
@ -19,34 +19,24 @@ Feature: Forum discussions can be split
|
|||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | type |
|
||||
| forum | Study discussions | Forum to discuss your coursework. | C1 | forump1 | general |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Science 101" course homepage
|
||||
And I add a new discussion to "Study discussions" forum with:
|
||||
| Subject | Photosynthesis discussion |
|
||||
| Message | Lets discuss our learning about Photosynthesis this week in this thread. |
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
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"
|
||||
| activity | name | course | idnumber | type |
|
||||
| forum | Study discussions | C1 | forump1 | general |
|
||||
And the following "mod_forum > discussions" exist:
|
||||
| forum | course | user | name | message |
|
||||
| forump1 | C1 | teacher1 | Photosynthesis discussion | Lets discuss our learning about Photosynthesis this week in this thread. |
|
||||
And the following "mod_forum > posts" exist:
|
||||
| user | parentsubject | message |
|
||||
| student1 | Photosynthesis discussion | Can anyone tell me which number is the mass number in the periodic table? |
|
||||
And I am on the "Study discussions" "forum activity" page logged in as student2
|
||||
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 wait to be redirected
|
||||
And I set the following fields to these values:
|
||||
| Message | I would also like to know this |
|
||||
And I press "Post to forum"
|
||||
And I log out
|
||||
|
||||
Scenario: Split a forum discussion
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Science 101" course homepage
|
||||
And I follow "Study discussions"
|
||||
Given I am on the "Study discussions" "forum activity" page logged in as teacher1
|
||||
And I follow "Photosynthesis discussion"
|
||||
When I follow "Split"
|
||||
And I set the following fields to these values:
|
||||
|
|
|
@ -15,8 +15,8 @@ Feature: Users can choose to set start and end time for display of their discuss
|
|||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | type |
|
||||
| forum | Test forum name | Test forum description | C1 | forump1 | general |
|
||||
| activity | name | course | idnumber | type |
|
||||
| forum | Test forum name | C1 | forump1 | general |
|
||||
And I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| 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 |
|
||||
| Message | Discussion contents 3, first message |
|
||||
| timestart[enabled] | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
And I am on the "Test forum name" "forum activity" page
|
||||
And I should see "Discussion 2 timed"
|
||||
And I should see "Discussion 3 timed"
|
||||
And "[data-region=timed-label]" "css_element" should exist
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "Test forum name"
|
||||
When I am on the "Test forum name" "forum activity" page logged in as student1
|
||||
Then I should see "Discussion 1"
|
||||
And I should not see "Discussion 2 timed"
|
||||
And "[data-region=timed-label]" "css_element" should not exist
|
||||
|
|
|
@ -16,45 +16,41 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
|||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And I log in as "admin"
|
||||
|
||||
Scenario: Tracking forum posts off
|
||||
Given the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| trackingtype | 0 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| 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
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | forum1 |
|
||||
| type | general |
|
||||
| name | Test forum name |
|
||||
| trackingtype | 0 |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | forum1 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
When I am on the "Course 1" course page logged in as student1
|
||||
Then I should not see "1 unread post"
|
||||
And I follow "Test forum name"
|
||||
And I should not see "Track unread posts"
|
||||
|
||||
Scenario: Tracking forum posts optional with user tracking on
|
||||
Given the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| trackingtype | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| 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
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | forum1 |
|
||||
| name | Test forum name |
|
||||
| type | general |
|
||||
| trackingtype | 1 |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | forum1 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
When I am on the "Course 1" course page logged in as student1
|
||||
Then I should see "1 unread post"
|
||||
And I follow "Test forum name"
|
||||
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 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And I log out
|
||||
When I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
When I am on the "Course 1" course page logged in as student2
|
||||
Then I should not see "1 unread post"
|
||||
And I follow "Test forum name"
|
||||
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 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| 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 the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
When I am on the "Course 1" course page logged in as student1
|
||||
Then I should see "1 unread post"
|
||||
And I am on the "Test forum name" "forum activity" page
|
||||
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 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And I log out
|
||||
When I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
When I am on the "Course 1" course page logged in as student2
|
||||
Then I should see "1 unread post"
|
||||
And I am on the "Test forum name" "forum activity" page
|
||||
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 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| description | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
And the following config values are set as admin:
|
||||
| forum_allowforcedreadtracking | 0 |
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
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"
|
||||
And I follow "Test forum name"
|
||||
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 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| description | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
And the following config values are set as admin:
|
||||
| forum_allowforcedreadtracking | 0 |
|
||||
And I log out
|
||||
When I log in as "student2"
|
||||
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"
|
||||
And I follow "Test forum name"
|
||||
And I should not see "Track unread posts"
|
||||
|
|
|
@ -37,8 +37,8 @@ Feature: Posting to all groups in a visible group discussion is restricted to us
|
|||
| student2 | G2 |
|
||||
| student3 | G4 |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Standard forum name | Standard forum description | C1 | groups | 2 |
|
||||
| activity | name | course | idnumber | groupmode |
|
||||
| forum | Standard forum name | C1 | groups | 2 |
|
||||
And the following "mod_forum > discussions" exist:
|
||||
| forum | name | subject | message | group |
|
||||
| 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 |
|
||||
|
||||
Scenario: Teacher with accessallgroups can view all groups
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
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 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"
|
||||
|
||||
Scenario: Teacher with accessallgroups can select any group when posting
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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"
|
||||
|
||||
Scenario: Teacher with accessallgroups can post in groups they are a member of
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
And I select "Group A" from the "Visible groups" singleselect
|
||||
When I click on "Add discussion topic" "link"
|
||||
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"
|
||||
|
||||
Scenario: Teacher with accessallgroups can post in groups they are not a member of
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
And I select "Group A" from the "Visible groups" singleselect
|
||||
When I click on "Add discussion topic" "link"
|
||||
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"
|
||||
|
||||
Scenario: Teacher with accessallgroups can post to all groups
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Standard forum name"
|
||||
Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
|
||||
When I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
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".
|
||||
|
||||
Scenario: Students can view all groups
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as student1
|
||||
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 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"
|
||||
|
||||
Scenario: Students in one group can only post in their group
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as student1
|
||||
Then I should see "Group A"
|
||||
And I click on "Add discussion topic" "link"
|
||||
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"
|
||||
|
||||
Scenario: Students in multiple group can post in all of their group individually
|
||||
Given I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Standard forum name"
|
||||
When I am on the "Standard forum name" "forum activity" page logged in as student2
|
||||
And I select "Group A" from the "Visible groups" singleselect
|
||||
And I click on "Add discussion topic" "link"
|
||||
And I click on "Advanced" "button"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue