Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 45... Línea 45...
45
        unset($enabled['cohort']);
45
        unset($enabled['cohort']);
46
        $enabled = array_keys($enabled);
46
        $enabled = array_keys($enabled);
47
        set_config('enrol_plugins_enabled', implode(',', $enabled));
47
        set_config('enrol_plugins_enabled', implode(',', $enabled));
48
    }
48
    }
Línea 49... Línea 49...
49
 
49
 
50
    public function test_handler_sync() {
50
    public function test_handler_sync(): void {
Línea 51... Línea 51...
51
        global $DB;
51
        global $DB;
52
 
52
 
Línea 321... Línea 321...
321
        $this->assertEquals(0, $DB->count_records('role_assignments', array('component'=>'enrol_cohort', 'itemid'=>$cohortinstance1->id)));
321
        $this->assertEquals(0, $DB->count_records('role_assignments', array('component'=>'enrol_cohort', 'itemid'=>$cohortinstance1->id)));
322
        $this->assertEquals(2, $DB->count_records('groups_members', array()));
322
        $this->assertEquals(2, $DB->count_records('groups_members', array()));
323
        $this->assertEquals(0, $DB->count_records('groups_members', array('component'=>'enrol_cohort', 'itemid'=>$cohortinstance1->id)));
323
        $this->assertEquals(0, $DB->count_records('groups_members', array('component'=>'enrol_cohort', 'itemid'=>$cohortinstance1->id)));
324
    }
324
    }
Línea 325... Línea 325...
325
 
325
 
326
    public function test_sync_course() {
326
    public function test_sync_course(): void {
327
        global $DB;
327
        global $DB;
Línea 328... Línea 328...
328
        $this->resetAfterTest();
328
        $this->resetAfterTest();
Línea 533... Línea 533...
533
        cohort_remove_member($cohort1->id, $user4->id);
533
        cohort_remove_member($cohort1->id, $user4->id);
534
        $this->assertTrue(groups_is_member($group1->id, $user4->id));
534
        $this->assertTrue(groups_is_member($group1->id, $user4->id));
535
        $this->assertTrue(groups_is_member($group2->id, $user4->id));
535
        $this->assertTrue(groups_is_member($group2->id, $user4->id));
536
    }
536
    }
Línea 537... Línea 537...
537
 
537
 
538
    public function test_sync_all_courses() {
538
    public function test_sync_all_courses(): void {
Línea 539... Línea 539...
539
        global $DB;
539
        global $DB;
Línea 540... Línea 540...
540
 
540