Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 70... Línea 70...
70
        $group2 = $this->getDataGenerator()->create_group(['courseid' => $course->id]);
70
        $group2 = $this->getDataGenerator()->create_group(['courseid' => $course->id]);
71
        groups_add_member($group1->id, $student1->id);
71
        groups_add_member($group1->id, $student1->id);
72
        groups_add_member($group1->id, $teacher->id);
72
        groups_add_member($group1->id, $teacher->id);
73
        groups_add_member($group2->id, $student2->id);
73
        groups_add_member($group2->id, $student2->id);
Línea 74... Línea 74...
74
 
74
 
75
        $assignment = $this->getDataGenerator()->create_module('assign', ['name' => "Test assign", 'course' => $course->id]);
75
        $assignment = $this->getDataGenerator()->create_module('assign', ['name' => "Test assign & grade items", 'course' => $course->id]);
76
        $modcontext = get_coursemodule_from_instance('assign', $assignment->id, $course->id);
76
        $modcontext = get_coursemodule_from_instance('assign', $assignment->id, $course->id);
Línea 77... Línea 77...
77
        $assignment->cmidnumber = $modcontext->id;
77
        $assignment->cmidnumber = $modcontext->id;
78
 
78
 
Línea 93... Línea 93...
93
    }
93
    }
Línea 94... Línea 94...
94
 
94
 
95
    /**
95
    /**
96
     * Test get_grades_table function case teacher
96
     * Test get_grades_table function case teacher
97
     */
97
     */
Línea 98... Línea 98...
98
    public function test_get_grades_table_teacher() {
98
    public function test_get_grades_table_teacher(): void {
Línea 99... Línea 99...
99
 
99
 
100
        $this->resetAfterTest(true);
100
        $this->resetAfterTest(true);
Línea 127... Línea 127...
127
    }
127
    }
Línea 128... Línea 128...
128
 
128
 
129
    /**
129
    /**
130
     * Test get_grades_table function case student
130
     * Test get_grades_table function case student
131
     */
131
     */
132
    public function test_get_grades_table_student() {
132
    public function test_get_grades_table_student(): void {
Línea 133... Línea 133...
133
        global $CFG, $DB;
133
        global $CFG, $DB;
Línea 134... Línea 134...
134
 
134
 
Línea 171... Línea 171...
171
    }
171
    }
Línea 172... Línea 172...
172
 
172
 
173
    /**
173
    /**
174
     * Test get_grades_table function case incorrect permissions
174
     * Test get_grades_table function case incorrect permissions
175
     */
175
     */
176
    public function test_get_grades_table_permissions() {
176
    public function test_get_grades_table_permissions(): void {
Línea 177... Línea 177...
177
        global $CFG, $DB;
177
        global $CFG, $DB;
Línea 178... Línea 178...
178
 
178
 
Línea 195... Línea 195...
195
    }
195
    }
Línea 196... Línea 196...
196
 
196
 
197
    /**
197
    /**
198
     * Test view_grade_report function
198
     * Test view_grade_report function
199
     */
199
     */
200
    public function test_view_grade_report() {
200
    public function test_view_grade_report(): void {
Línea 201... Línea 201...
201
        global $USER;
201
        global $USER;
Línea 202... Línea 202...
202
 
202
 
Línea 244... Línea 244...
244
    }
244
    }
Línea 245... Línea 245...
245
 
245
 
246
    /**
246
    /**
247
     * Test get_grades_items function case teacher
247
     * Test get_grades_items function case teacher
248
     */
248
     */
Línea 249... Línea 249...
249
    public function test_get_grade_items_teacher() {
249
    public function test_get_grade_items_teacher(): void {
Línea 250... Línea 250...
250
 
250
 
251
        $this->resetAfterTest(true);
251
        $this->resetAfterTest(true);
Línea 348... Línea 348...
348
    }
348
    }
Línea 349... Línea 349...
349
 
349
 
350
    /**
350
    /**
351
     * Test get_grades_items function case student
351
     * Test get_grades_items function case student
352
     */
352
     */
Línea 353... Línea 353...
353
    public function test_get_grade_items_student() {
353
    public function test_get_grade_items_student(): void {
Línea 354... Línea 354...
354
 
354
 
355
        $this->resetAfterTest(true);
355
        $this->resetAfterTest(true);