Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 71... Línea 71...
71
    }
71
    }
Línea 72... Línea 72...
72
 
72
 
73
    /**
73
    /**
74
     * Quick test to make sure that get_metadata returns something.
74
     * Quick test to make sure that get_metadata returns something.
75
     */
75
     */
76
    public function test_get_metadata() {
76
    public function test_get_metadata(): void {
77
        $collection = new \core_privacy\local\metadata\collection('assignsubmission_file');
77
        $collection = new \core_privacy\local\metadata\collection('assignsubmission_file');
78
        $collection = \assignsubmission_file\privacy\provider::get_metadata($collection);
78
        $collection = \assignsubmission_file\privacy\provider::get_metadata($collection);
79
        $this->assertNotEmpty($collection);
79
        $this->assertNotEmpty($collection);
Línea 80... Línea 80...
80
    }
80
    }
81
 
81
 
82
    /**
82
    /**
83
     * Test that submission files are exported for a user.
83
     * Test that submission files are exported for a user.
84
     */
84
     */
85
    public function test_export_submission_user_data() {
85
    public function test_export_submission_user_data(): void {
86
        $this->resetAfterTest();
86
        $this->resetAfterTest();
87
        // Create course, assignment, submission, and then a feedback comment.
87
        // Create course, assignment, submission, and then a feedback comment.
88
        $course = $this->getDataGenerator()->create_course();
88
        $course = $this->getDataGenerator()->create_course();
Línea 112... Línea 112...
112
    }
112
    }
Línea 113... Línea 113...
113
 
113
 
114
    /**
114
    /**
115
     * Test that all submission files are deleted for this context.
115
     * Test that all submission files are deleted for this context.
116
     */
116
     */
117
    public function test_delete_submission_for_context() {
117
    public function test_delete_submission_for_context(): void {
118
        $this->resetAfterTest();
118
        $this->resetAfterTest();
119
        // Create course, assignment, submission, and then a feedback comment.
119
        // Create course, assignment, submission, and then a feedback comment.
120
        $course = $this->getDataGenerator()->create_course();
120
        $course = $this->getDataGenerator()->create_course();
121
        // Student.
121
        // Student.
Línea 143... Línea 143...
143
    }
143
    }
Línea 144... Línea 144...
144
 
144
 
145
    /**
145
    /**
146
     * Test that the comments for a user are deleted.
146
     * Test that the comments for a user are deleted.
147
     */
147
     */
148
    public function test_delete_submission_for_userid() {
148
    public function test_delete_submission_for_userid(): void {
149
        $this->resetAfterTest();
149
        $this->resetAfterTest();
150
        // Create course, assignment, submission, and then a feedback comment.
150
        // Create course, assignment, submission, and then a feedback comment.
151
        $course = $this->getDataGenerator()->create_course();
151
        $course = $this->getDataGenerator()->create_course();
152
        // Student.
152
        // Student.
Línea 175... Línea 175...
175
    }
175
    }
Línea 176... Línea 176...
176
 
176
 
177
    /**
177
    /**
178
     * Test deletion of bulk submissions for a context.
178
     * Test deletion of bulk submissions for a context.
179
     */
179
     */
180
    public function test_delete_submissions() {
180
    public function test_delete_submissions(): void {
Línea 181... Línea 181...
181
        global $DB;
181
        global $DB;
182
 
182
 
183
        $this->resetAfterTest();
183
        $this->resetAfterTest();