Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 77... Línea 77...
77
    }
77
    }
Línea 78... Línea 78...
78
 
78
 
79
    /**
79
    /**
80
     * Test that getting the contexts for a user works.
80
     * Test that getting the contexts for a user works.
81
     */
81
     */
82
    public function test_get_contexts_for_userid() {
82
    public function test_get_contexts_for_userid(): void {
83
        global $DB;
83
        global $DB;
Línea 84... Línea 84...
84
        $this->resetAfterTest();
84
        $this->resetAfterTest();
85
 
85
 
Línea 149... Línea 149...
149
    }
149
    }
Línea 150... Línea 150...
150
 
150
 
151
    /**
151
    /**
152
     * Test returning a list of user IDs related to a context (assign).
152
     * Test returning a list of user IDs related to a context (assign).
153
     */
153
     */
154
    public function test_get_users_in_context() {
154
    public function test_get_users_in_context(): void {
Línea 155... Línea 155...
155
        global $DB;
155
        global $DB;
Línea 156... Línea 156...
156
 
156
 
Línea 238... Línea 238...
238
    }
238
    }
Línea 239... Línea 239...
239
 
239
 
240
    /**
240
    /**
241
     * Test that a student with multiple submissions and grades is returned with the correct data.
241
     * Test that a student with multiple submissions and grades is returned with the correct data.
242
     */
242
     */
243
    public function test_export_user_data_student() {
243
    public function test_export_user_data_student(): void {
244
        global $DB;
244
        global $DB;
245
        $this->resetAfterTest();
245
        $this->resetAfterTest();
246
        $course = $this->getDataGenerator()->create_course();
246
        $course = $this->getDataGenerator()->create_course();
Línea 333... Línea 333...
333
    }
333
    }
Línea 334... Línea 334...
334
 
334
 
335
    /**
335
    /**
336
     * Tests the data returned for a teacher.
336
     * Tests the data returned for a teacher.
337
     */
337
     */
338
    public function test_export_user_data_teacher() {
338
    public function test_export_user_data_teacher(): void {
339
        $this->resetAfterTest();
339
        $this->resetAfterTest();
340
        $course = $this->getDataGenerator()->create_course();
340
        $course = $this->getDataGenerator()->create_course();
Línea 341... Línea 341...
341
        $coursecontext = \context_course::instance($course->id);
341
        $coursecontext = \context_course::instance($course->id);
Línea 442... Línea 442...
442
    }
442
    }
Línea 443... Línea 443...
443
 
443
 
444
    /**
444
    /**
445
     * A test for deleting all user data for a given context.
445
     * A test for deleting all user data for a given context.
446
     */
446
     */
447
    public function test_delete_data_for_all_users_in_context() {
447
    public function test_delete_data_for_all_users_in_context(): void {
448
        global $DB;
448
        global $DB;
449
        $this->resetAfterTest();
449
        $this->resetAfterTest();
Línea 450... Línea 450...
450
        $course = $this->getDataGenerator()->create_course();
450
        $course = $this->getDataGenerator()->create_course();
Línea 545... Línea 545...
545
    }
545
    }
Línea 546... Línea 546...
546
 
546
 
547
    /**
547
    /**
548
     * A test for deleting all user data for one user.
548
     * A test for deleting all user data for one user.
549
     */
549
     */
550
    public function test_delete_data_for_user() {
550
    public function test_delete_data_for_user(): void {
551
        global $DB;
551
        global $DB;
552
        $this->resetAfterTest();
552
        $this->resetAfterTest();
Línea 553... Línea 553...
553
        $course = $this->getDataGenerator()->create_course();
553
        $course = $this->getDataGenerator()->create_course();
Línea 670... Línea 670...
670
    }
670
    }
Línea 671... Línea 671...
671
 
671
 
672
    /**
672
    /**
673
     * A test for deleting all user data for a bunch of users.
673
     * A test for deleting all user data for a bunch of users.
674
     */
674
     */
675
    public function test_delete_data_for_users() {
675
    public function test_delete_data_for_users(): void {
Línea 676... Línea 676...
676
        global $DB;
676
        global $DB;
Línea 677... Línea 677...
677
 
677