| Línea 40... |
Línea 40... |
| 40 |
* @dataProvider get_feedback_provider
|
40 |
* @dataProvider get_feedback_provider
|
| 41 |
* @param string|null $feedback The feedback text added for the grade item.
|
41 |
* @param string|null $feedback The feedback text added for the grade item.
|
| 42 |
* @param array $expected The expected feedback data.
|
42 |
* @param array $expected The expected feedback data.
|
| 43 |
* @return void
|
43 |
* @return void
|
| 44 |
*/
|
44 |
*/
|
| 45 |
public function test_get_feedback(?string $feedback, array $expected) {
|
45 |
public function test_get_feedback(?string $feedback, array $expected): void {
|
| Línea 46... |
Línea 46... |
| 46 |
|
46 |
|
| 47 |
$this->resetAfterTest(true);
|
47 |
$this->resetAfterTest(true);
|
| 48 |
$course = $this->getDataGenerator()->create_course();
|
48 |
$course = $this->getDataGenerator()->create_course();
|
| 49 |
$user = $this->getDataGenerator()->create_user(['firstname' => 'John', 'lastname' => 'Doe',
|
49 |
$user = $this->getDataGenerator()->create_user(['firstname' => 'John', 'lastname' => 'Doe',
|
| Línea 109... |
Línea 109... |
| 109 |
* @param bool $feedbacknotincourse Whether to request a feedback for a grade item which is not a part of the course.
|
109 |
* @param bool $feedbacknotincourse Whether to request a feedback for a grade item which is not a part of the course.
|
| 110 |
* @param array $expectedexception The expected exception.
|
110 |
* @param array $expectedexception The expected exception.
|
| 111 |
* @return void
|
111 |
* @return void
|
| 112 |
*/
|
112 |
*/
|
| 113 |
public function test_get_feedback_invalid_request(string $loggeduserrole, bool $feedbacknotincourse,
|
113 |
public function test_get_feedback_invalid_request(string $loggeduserrole, bool $feedbacknotincourse,
|
| 114 |
array $expectedexception = []) {
|
114 |
array $expectedexception = []): void {
|
| Línea 115... |
Línea 115... |
| 115 |
|
115 |
|
| 116 |
$this->resetAfterTest(true);
|
116 |
$this->resetAfterTest(true);
|
| 117 |
// Create a course with a user and a grade item.
|
117 |
// Create a course with a user and a grade item.
|
| 118 |
$course = $this->getDataGenerator()->create_course();
|
118 |
$course = $this->getDataGenerator()->create_course();
|