Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 40... Línea 40...
40
    /**
40
    /**
41
     * Tests grade_report_grader::process_data()
41
     * Tests grade_report_grader::process_data()
42
     *
42
     *
43
     * process_data() processes submitted grade and feedback data
43
     * process_data() processes submitted grade and feedback data
44
     */
44
     */
45
    public function test_process_data() {
45
    public function test_process_data(): void {
46
        global $DB, $CFG;
46
        global $DB, $CFG;
Línea 47... Línea 47...
47
 
47
 
Línea 48... Línea 48...
48
        $this->resetAfterTest(true);
48
        $this->resetAfterTest(true);
Línea 110... Línea 110...
110
 
110
 
111
        $studentgrade = \grade_grade::fetch(array('itemid' => $forum1->id, '' => $student->id));
111
        $studentgrade = \grade_grade::fetch(array('itemid' => $forum1->id, '' => $student->id));
112
        $this->assertEquals($studentgrade->finalgrade, $toobig);
112
        $this->assertEquals($studentgrade->finalgrade, $toobig);
Línea 113... Línea 113...
113
    }
113
    }
114
 
114
 
Línea 115... Línea 115...
115
    public function test_collapsed_preferences() {
115
    public function test_collapsed_preferences(): void {
Línea 116... Línea 116...
116
        $this->resetAfterTest(true);
116
        $this->resetAfterTest(true);
Línea 237... Línea 237...
237
     * Test some special cases of the conversion from old preferences to new ones
237
     * Test some special cases of the conversion from old preferences to new ones
238
     *
238
     *
239
     * @covers \grade_report_grader::get_collapsed_preferences
239
     * @covers \grade_report_grader::get_collapsed_preferences
240
     * @covers \grade_report_grader::filter_collapsed_categories
240
     * @covers \grade_report_grader::filter_collapsed_categories
241
     */
241
     */
242
    public function test_old_collapsed_preferences() {
242
    public function test_old_collapsed_preferences(): void {
243
        $this->resetAfterTest(true);
243
        $this->resetAfterTest(true);
Línea 244... Línea 244...
244
 
244
 
245
        $user1 = $this->getDataGenerator()->create_user();
245
        $user1 = $this->getDataGenerator()->create_user();
246
        $course1 = $this->getDataGenerator()->create_course();
246
        $course1 = $this->getDataGenerator()->create_course();
Línea 457... Línea 457...
457
     * Tests the get_right_rows function with one 'normal' and one 'ungraded' quiz.
457
     * Tests the get_right_rows function with one 'normal' and one 'ungraded' quiz.
458
     *
458
     *
459
     * Previously, with an ungraded quiz (which results in a grade item with type GRADETYPE_NONE)
459
     * Previously, with an ungraded quiz (which results in a grade item with type GRADETYPE_NONE)
460
     * there was a bug in get_right_rows in some situations.
460
     * there was a bug in get_right_rows in some situations.
461
     */
461
     */
462
    public function test_get_right_rows() {
462
    public function test_get_right_rows(): void {
463
        global $USER, $DB;
463
        global $USER, $DB;
464
        $this->resetAfterTest(true);
464
        $this->resetAfterTest(true);
Línea 465... Línea 465...
465
 
465
 
466
        // Create manager and student on a course.
466
        // Create manager and student on a course.