| Línea 56... |
Línea 56... |
| 56 |
|
56 |
|
| 57 |
/**
|
57 |
/**
|
| 58 |
* Ensure that the forum_post_is_visible_privately function reports that a post is visible to a user when another
|
58 |
* Ensure that the forum_post_is_visible_privately function reports that a post is visible to a user when another
|
| 59 |
* user wrote the post, and it is not private.
|
59 |
* user wrote the post, and it is not private.
|
| 60 |
*/
|
60 |
*/
|
| 61 |
public function test_forum_post_is_visible_privately_not_private() {
|
61 |
public function test_forum_post_is_visible_privately_not_private(): void {
|
| Línea 62... |
Línea 62... |
| 62 |
$this->resetAfterTest();
|
62 |
$this->resetAfterTest();
|
| 63 |
|
63 |
|
| 64 |
$course = $this->getDataGenerator()->create_course();
|
64 |
$course = $this->getDataGenerator()->create_course();
|
| Línea 78... |
Línea 78... |
| 78 |
|
78 |
|
| 79 |
/**
|
79 |
/**
|
| 80 |
* Ensure that the forum_post_is_visible_privately function reports that a post is visible to a user when another
|
80 |
* Ensure that the forum_post_is_visible_privately function reports that a post is visible to a user when another
|
| 81 |
* user wrote the post, and the user under test is the intended recipient.
|
81 |
* user wrote the post, and the user under test is the intended recipient.
|
| 82 |
*/
|
82 |
*/
|
| 83 |
public function test_forum_post_is_visible_privately_private_to_user() {
|
83 |
public function test_forum_post_is_visible_privately_private_to_user(): void {
|
| Línea 84... |
Línea 84... |
| 84 |
$this->resetAfterTest();
|
84 |
$this->resetAfterTest();
|
| 85 |
|
85 |
|
| 86 |
$course = $this->getDataGenerator()->create_course();
|
86 |
$course = $this->getDataGenerator()->create_course();
|
| Línea 102... |
Línea 102... |
| 102 |
|
102 |
|
| 103 |
/**
|
103 |
/**
|
| 104 |
* Ensure that the forum_post_is_visible_privately function reports that a post is visible to a user when another
|
104 |
* Ensure that the forum_post_is_visible_privately function reports that a post is visible to a user when another
|
| 105 |
* user wrote the post, and the user under test is a role with the view capability.
|
105 |
* user wrote the post, and the user under test is a role with the view capability.
|
| 106 |
*/
|
106 |
*/
|
| 107 |
public function test_forum_post_is_visible_privately_private_to_user_view_as_teacher() {
|
107 |
public function test_forum_post_is_visible_privately_private_to_user_view_as_teacher(): void {
|
| Línea 108... |
Línea 108... |
| 108 |
$this->resetAfterTest();
|
108 |
$this->resetAfterTest();
|
| 109 |
|
109 |
|
| 110 |
$course = $this->getDataGenerator()->create_course();
|
110 |
$course = $this->getDataGenerator()->create_course();
|
| Línea 126... |
Línea 126... |
| 126 |
|
126 |
|
| 127 |
/**
|
127 |
/**
|
| 128 |
* Ensure that the forum_post_is_visible_privately function reports that a post is not visible to a user when
|
128 |
* Ensure that the forum_post_is_visible_privately function reports that a post is not visible to a user when
|
| 129 |
* another user wrote the post, and the user under test is a role without the view capability.
|
129 |
* another user wrote the post, and the user under test is a role without the view capability.
|
| 130 |
*/
|
130 |
*/
|
| 131 |
public function test_forum_post_is_visible_privately_private_to_user_view_as_other_student() {
|
131 |
public function test_forum_post_is_visible_privately_private_to_user_view_as_other_student(): void {
|
| Línea 132... |
Línea 132... |
| 132 |
$this->resetAfterTest();
|
132 |
$this->resetAfterTest();
|
| 133 |
|
133 |
|
| 134 |
$course = $this->getDataGenerator()->create_course();
|
134 |
$course = $this->getDataGenerator()->create_course();
|
| Línea 150... |
Línea 150... |
| 150 |
|
150 |
|
| 151 |
/**
|
151 |
/**
|
| 152 |
* Ensure that the forum_post_is_visible_privately function reports that a post is visible to a user who wrote a
|
152 |
* Ensure that the forum_post_is_visible_privately function reports that a post is visible to a user who wrote a
|
| 153 |
* private reply, but not longer holds the view capability.
|
153 |
* private reply, but not longer holds the view capability.
|
| 154 |
*/
|
154 |
*/
|
| 155 |
public function test_forum_post_is_visible_privately_private_to_user_view_as_author() {
|
155 |
public function test_forum_post_is_visible_privately_private_to_user_view_as_author(): void {
|
| Línea 156... |
Línea 156... |
| 156 |
$this->resetAfterTest();
|
156 |
$this->resetAfterTest();
|
| 157 |
|
157 |
|
| 158 |
$course = $this->getDataGenerator()->create_course();
|
158 |
$course = $this->getDataGenerator()->create_course();
|
| Línea 175... |
Línea 175... |
| 175 |
}
|
175 |
}
|
| Línea 176... |
Línea 176... |
| 176 |
|
176 |
|
| 177 |
/**
|
177 |
/**
|
| 178 |
* Ensure that the forum_user_can_reply_privately returns true for a teacher replying to a forum post.
|
178 |
* Ensure that the forum_user_can_reply_privately returns true for a teacher replying to a forum post.
|
| 179 |
*/
|
179 |
*/
|
| 180 |
public function test_forum_user_can_reply_privately_as_teacher() {
|
180 |
public function test_forum_user_can_reply_privately_as_teacher(): void {
|
| Línea 181... |
Línea 181... |
| 181 |
$this->resetAfterTest();
|
181 |
$this->resetAfterTest();
|
| 182 |
|
182 |
|
| 183 |
$course = $this->getDataGenerator()->create_course();
|
183 |
$course = $this->getDataGenerator()->create_course();
|
| Línea 196... |
Línea 196... |
| 196 |
}
|
196 |
}
|
| Línea 197... |
Línea 197... |
| 197 |
|
197 |
|
| 198 |
/**
|
198 |
/**
|
| 199 |
* Ensure that the forum_user_can_reply_privately returns true for a teacher replying to a forum post.
|
199 |
* Ensure that the forum_user_can_reply_privately returns true for a teacher replying to a forum post.
|
| 200 |
*/
|
200 |
*/
|
| 201 |
public function test_forum_user_can_reply_privately_as_student() {
|
201 |
public function test_forum_user_can_reply_privately_as_student(): void {
|
| Línea 202... |
Línea 202... |
| 202 |
$this->resetAfterTest();
|
202 |
$this->resetAfterTest();
|
| 203 |
|
203 |
|
| 204 |
$course = $this->getDataGenerator()->create_course();
|
204 |
$course = $this->getDataGenerator()->create_course();
|
| Línea 216... |
Línea 216... |
| 216 |
}
|
216 |
}
|
| Línea 217... |
Línea 217... |
| 217 |
|
217 |
|
| 218 |
/**
|
218 |
/**
|
| 219 |
* Ensure that the forum_user_can_reply_privately returns false where the parent post is already a private reply.
|
219 |
* Ensure that the forum_user_can_reply_privately returns false where the parent post is already a private reply.
|
| 220 |
*/
|
220 |
*/
|
| 221 |
public function test_forum_user_can_reply_privately_parent_is_already_private() {
|
221 |
public function test_forum_user_can_reply_privately_parent_is_already_private(): void {
|
| Línea 222... |
Línea 222... |
| 222 |
$this->resetAfterTest();
|
222 |
$this->resetAfterTest();
|
| 223 |
|
223 |
|
| 224 |
$course = $this->getDataGenerator()->create_course();
|
224 |
$course = $this->getDataGenerator()->create_course();
|