Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 65... Línea 65...
65
    }
65
    }
Línea 66... Línea 66...
66
 
66
 
67
    /**
67
    /**
68
     * Quick test to make sure that get_metadata returns something.
68
     * Quick test to make sure that get_metadata returns something.
69
     */
69
     */
70
    public function test_get_metadata() {
70
    public function test_get_metadata(): void {
71
        $collection = new \core_privacy\local\metadata\collection('assignsubmission_onlinetext');
71
        $collection = new \core_privacy\local\metadata\collection('assignsubmission_onlinetext');
72
        $collection = \assignsubmission_onlinetext\privacy\provider::get_metadata($collection);
72
        $collection = \assignsubmission_onlinetext\privacy\provider::get_metadata($collection);
73
        $this->assertNotEmpty($collection);
73
        $this->assertNotEmpty($collection);
Línea 74... Línea 74...
74
    }
74
    }
75
 
75
 
76
    /**
76
    /**
77
     * Test that submission files and text are exported for a user.
77
     * Test that submission files and text are exported for a user.
78
     */
78
     */
79
    public function test_export_submission_user_data() {
79
    public function test_export_submission_user_data(): void {
80
        $this->resetAfterTest();
80
        $this->resetAfterTest();
81
        // Create course, assignment, submission, and then a feedback comment.
81
        // Create course, assignment, submission, and then a feedback comment.
82
        $course = $this->getDataGenerator()->create_course();
82
        $course = $this->getDataGenerator()->create_course();
Línea 101... Línea 101...
101
    }
101
    }
Línea 102... Línea 102...
102
 
102
 
103
    /**
103
    /**
104
     * Test that all submission files are deleted for this context.
104
     * Test that all submission files are deleted for this context.
105
     */
105
     */
106
    public function test_delete_submission_for_context() {
106
    public function test_delete_submission_for_context(): void {
107
        $this->resetAfterTest();
107
        $this->resetAfterTest();
108
        // Create course, assignment, submission, and then a feedback comment.
108
        // Create course, assignment, submission, and then a feedback comment.
109
        $course = $this->getDataGenerator()->create_course();
109
        $course = $this->getDataGenerator()->create_course();
110
        // Student.
110
        // Student.
Línea 132... Línea 132...
132
    }
132
    }
Línea 133... Línea 133...
133
 
133
 
134
    /**
134
    /**
135
     * Test that the comments for a user are deleted.
135
     * Test that the comments for a user are deleted.
136
     */
136
     */
137
    public function test_delete_submission_for_userid() {
137
    public function test_delete_submission_for_userid(): void {
138
        $this->resetAfterTest();
138
        $this->resetAfterTest();
139
        // Create course, assignment, submission, and then a feedback comment.
139
        // Create course, assignment, submission, and then a feedback comment.
140
        $course = $this->getDataGenerator()->create_course();
140
        $course = $this->getDataGenerator()->create_course();
141
        // Student.
141
        // Student.
Línea 161... Línea 161...
161
        $this->assertTrue($plugin->is_empty($submission));
161
        $this->assertTrue($plugin->is_empty($submission));
162
        // But there is for the second submission.
162
        // But there is for the second submission.
163
        $this->assertFalse($plugin2->is_empty($submission2));
163
        $this->assertFalse($plugin2->is_empty($submission2));
164
    }
164
    }
Línea 165... Línea 165...
165
 
165
 
166
    public function test_delete_submissions() {
166
    public function test_delete_submissions(): void {
Línea 167... Línea 167...
167
        global $DB;
167
        global $DB;
Línea 168... Línea 168...
168
 
168