1 |
efrain |
1 |
@core @core_blog
|
|
|
2 |
Feature: Blogs can be set to be only visible by the author.
|
|
|
3 |
In order to make blogs personal only
|
|
|
4 |
As a user
|
|
|
5 |
I need to set the blog level to Users can only see their own blogs.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| testuser | Test | User | moodle@example.com |
|
|
|
11 |
| testuser2 | Test2 | User2 | moodle2@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname |
|
|
|
14 |
| Course 1 | C1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| testuser | C1 | student |
|
|
|
18 |
| testuser2 | C1 | student |
|
|
|
19 |
And I log in as "admin"
|
|
|
20 |
And I am on site homepage
|
|
|
21 |
And I navigate to "Appearance > Blog" in site administration
|
|
|
22 |
And I set the following fields to these values:
|
|
|
23 |
| Blog visibility | Users can only see their own blog |
|
|
|
24 |
And I press "Save changes"
|
|
|
25 |
|
|
|
26 |
Scenario: A student can not see another student's blog entries.
|
|
|
27 |
Given I am on the "Course 1" course page logged in as testuser
|
|
|
28 |
And I navigate to course participants
|
|
|
29 |
When I follow "Test2 User2"
|
|
|
30 |
And I should see "Miscellaneous"
|
|
|
31 |
Then I should not see "Blog entries"
|
|
|
32 |
And I follow "Profile" in the user menu
|
|
|
33 |
And I follow "Blog entries"
|
|
|
34 |
And I should see "User blog: Test User"
|