| Server IP : 104.21.80.248 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/myschool/triamudom/tuprblearn/mod/forum/tests/behat/ |
Upload File : |
@mod @mod_forum
Feature: Forum posts can be replied to in private
In order to post feedback to my students
As a Teacher
I need to be able to reply privately to students
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | [email protected] |
| teacher2 | Teacher | 2 | [email protected] |
| student1 | Student | 1 | [email protected] |
| student2 | Student | 2 | [email protected] |
And the following "courses" exist:
| 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 |
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 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 "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"
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 my own response
Given I log out
And I log in as "student1"
And I am on "Science 101" course homepage
And I follow "Study discussions"
When I follow "Answers to the homework"
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 my own response
Given I log out
And I log in as "student2"
And I am on "Science 101" course homepage
And I follow "Study discussions"
When I follow "Answers to the homework"
Then I should not see "How about you and I have a meeting after class about plagiarism?"