Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 92... Línea 92...
92
    }
92
    }
Línea 93... Línea 93...
93
 
93
 
94
    /**
94
    /**
95
     * An unkown event type should not change the quiz instance.
95
     * An unkown event type should not change the quiz instance.
96
     */
96
     */
97
    public function test_mod_quiz_core_calendar_event_timestart_updated_unknown_event() {
97
    public function test_mod_quiz_core_calendar_event_timestart_updated_unknown_event(): void {
Línea 98... Línea 98...
98
        global $DB;
98
        global $DB;
99
 
99
 
100
        $this->resetAfterTest(true);
100
        $this->resetAfterTest(true);
Línea 116... Línea 116...
116
 
116
 
117
    /**
117
    /**
118
     * A QUIZ_EVENT_TYPE_OPEN event should update the timeopen property of
118
     * A QUIZ_EVENT_TYPE_OPEN event should update the timeopen property of
119
     * the quiz activity.
119
     * the quiz activity.
120
     */
120
     */
121
    public function test_mod_quiz_core_calendar_event_timestart_updated_open_event() {
121
    public function test_mod_quiz_core_calendar_event_timestart_updated_open_event(): void {
Línea 122... Línea 122...
122
        global $DB;
122
        global $DB;
123
 
123
 
124
        $this->resetAfterTest(true);
124
        $this->resetAfterTest(true);
Línea 150... Línea 150...
150
 
150
 
151
    /**
151
    /**
152
     * A QUIZ_EVENT_TYPE_CLOSE event should update the timeclose property of
152
     * A QUIZ_EVENT_TYPE_CLOSE event should update the timeclose property of
153
     * the quiz activity.
153
     * the quiz activity.
154
     */
154
     */
155
    public function test_mod_quiz_core_calendar_event_timestart_updated_close_event() {
155
    public function test_mod_quiz_core_calendar_event_timestart_updated_close_event(): void {
Línea 156... Línea 156...
156
        global $DB;
156
        global $DB;
157
 
157
 
158
        $this->resetAfterTest(true);
158
        $this->resetAfterTest(true);
Línea 184... Línea 184...
184
 
184
 
185
    /**
185
    /**
186
     * A QUIZ_EVENT_TYPE_OPEN event should not update the timeopen property of
186
     * A QUIZ_EVENT_TYPE_OPEN event should not update the timeopen property of
187
     * the quiz activity if it's an override.
187
     * the quiz activity if it's an override.
188
     */
188
     */
189
    public function test_mod_quiz_core_calendar_event_timestart_updated_open_event_override() {
189
    public function test_mod_quiz_core_calendar_event_timestart_updated_open_event_override(): void {
Línea 190... Línea 190...
190
        global $DB;
190
        global $DB;
191
 
191
 
192
        $this->resetAfterTest(true);
192
        $this->resetAfterTest(true);
Línea 227... Línea 227...
227
    /**
227
    /**
228
     * If a student somehow finds a way to update the quiz calendar event
228
     * If a student somehow finds a way to update the quiz calendar event
229
     * then the callback should not update the quiz activity otherwise that
229
     * then the callback should not update the quiz activity otherwise that
230
     * would be a security issue.
230
     * would be a security issue.
231
     */
231
     */
232
    public function test_student_role_cant_update_quiz_activity() {
232
    public function test_student_role_cant_update_quiz_activity(): void {
233
        global $DB;
233
        global $DB;
Línea 234... Línea 234...
234
 
234
 
235
        $this->resetAfterTest();
235
        $this->resetAfterTest();
Línea 271... Línea 271...
271
    /**
271
    /**
272
     * A teacher with the capability to modify a quiz module should be
272
     * A teacher with the capability to modify a quiz module should be
273
     * able to update the quiz activity dates by changing the calendar
273
     * able to update the quiz activity dates by changing the calendar
274
     * event.
274
     * event.
275
     */
275
     */
276
    public function test_teacher_role_can_update_quiz_activity() {
276
    public function test_teacher_role_can_update_quiz_activity(): void {
277
        global $DB;
277
        global $DB;
Línea 278... Línea 278...
278
 
278
 
279
        $this->resetAfterTest();
279
        $this->resetAfterTest();
Línea 325... Línea 325...
325
 
325
 
326
 
326
 
327
    /**
327
    /**
328
     * An unkown event type should not have any limits
328
     * An unkown event type should not have any limits
329
     */
329
     */
Línea 330... Línea 330...
330
    public function test_mod_quiz_core_calendar_get_valid_event_timestart_range_unknown_event() {
330
    public function test_mod_quiz_core_calendar_get_valid_event_timestart_range_unknown_event(): void {
331
        global $DB;
331
        global $DB;
332
 
332
 
Línea 349... Línea 349...
349
    }
349
    }
Línea 350... Línea 350...
350
 
350
 
351
    /**
351
    /**
352
     * The open event should be limited by the quiz's timeclose property, if it's set.
352
     * The open event should be limited by the quiz's timeclose property, if it's set.
353
     */
353
     */
354
    public function test_mod_quiz_core_calendar_get_valid_event_timestart_range_open_event() {
354
    public function test_mod_quiz_core_calendar_get_valid_event_timestart_range_open_event(): void {
Línea 355... Línea 355...
355
        global $DB;
355
        global $DB;
356
 
356
 
357
        $this->resetAfterTest(true);
357
        $this->resetAfterTest(true);
Línea 382... Línea 382...
382
    }
382
    }
Línea 383... Línea 383...
383
 
383
 
384
    /**
384
    /**
385
     * An override event should not have any limits.
385
     * An override event should not have any limits.
386
     */
386
     */
387
    public function test_mod_quiz_core_calendar_get_valid_event_timestart_range_override_event() {
387
    public function test_mod_quiz_core_calendar_get_valid_event_timestart_range_override_event(): void {
Línea 388... Línea 388...
388
        global $DB;
388
        global $DB;
389
 
389
 
390
        $this->resetAfterTest(true);
390
        $this->resetAfterTest(true);
Línea 418... Línea 418...
418
    }
418
    }
Línea 419... Línea 419...
419
 
419
 
420
    /**
420
    /**
421
     * The close event should be limited by the quiz's timeopen property, if it's set.
421
     * The close event should be limited by the quiz's timeopen property, if it's set.
422
     */
422
     */
423
    public function test_mod_quiz_core_calendar_get_valid_event_timestart_range_close_event() {
423
    public function test_mod_quiz_core_calendar_get_valid_event_timestart_range_close_event(): void {
Línea 424... Línea 424...
424
        global $DB;
424
        global $DB;
425
 
425
 
426
        $this->resetAfterTest(true);
426
        $this->resetAfterTest(true);
Línea 452... Línea 452...
452
 
452
 
453
    /**
453
    /**
454
     * When the close date event is changed and it results in the time close value of
454
     * When the close date event is changed and it results in the time close value of
455
     * the quiz being updated then the open quiz attempts should also be updated.
455
     * the quiz being updated then the open quiz attempts should also be updated.
456
     */
456
     */
457
    public function test_core_calendar_event_timestart_updated_update_quiz_attempt() {
457
    public function test_core_calendar_event_timestart_updated_update_quiz_attempt(): void {
Línea 458... Línea 458...
458
        global $DB;
458
        global $DB;
459
 
459