Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 41... Línea 41...
41
    use \completion_creation;
41
    use \completion_creation;
Línea 42... Línea 42...
42
 
42
 
43
    /**
43
    /**
44
     * Test joining course completion data to an sql statement.
44
     * Test joining course completion data to an sql statement.
45
     */
45
     */
46
    public function test_get_course_completion_join_sql() {
46
    public function test_get_course_completion_join_sql(): void {
47
        global $DB;
47
        global $DB;
48
        $this->resetAfterTest();
48
        $this->resetAfterTest();
49
        $user = $this->getDataGenerator()->create_user();
49
        $user = $this->getDataGenerator()->create_user();
50
        $this->create_course_completion();
50
        $this->create_course_completion();
Línea 61... Línea 61...
61
    }
61
    }
Línea 62... Línea 62...
62
 
62
 
63
    /**
63
    /**
64
     * Test fetching users' course completion by context and adding to a userlist.
64
     * Test fetching users' course completion by context and adding to a userlist.
65
     */
65
     */
66
    public function test_add_course_completion_users_to_userlist() {
66
    public function test_add_course_completion_users_to_userlist(): void {
Línea 67... Línea 67...
67
        $this->resetAfterTest();
67
        $this->resetAfterTest();
68
 
68
 
69
        $user1 = $this->getDataGenerator()->create_user();
69
        $user1 = $this->getDataGenerator()->create_user();
Línea 91... Línea 91...
91
    }
91
    }
Línea 92... Línea 92...
92
 
92
 
93
    /**
93
    /**
94
     * Test getting course completion information.
94
     * Test getting course completion information.
95
     */
95
     */
96
    public function test_get_course_completion_info() {
96
    public function test_get_course_completion_info(): void {
97
        $this->resetAfterTest();
97
        $this->resetAfterTest();
98
        $user = $this->getDataGenerator()->create_user();
98
        $user = $this->getDataGenerator()->create_user();
99
        $this->create_course_completion();
99
        $this->create_course_completion();
100
        $this->complete_course($user);
100
        $this->complete_course($user);
Línea 104... Línea 104...
104
    }
104
    }
Línea 105... Línea 105...
105
 
105
 
106
    /**
106
    /**
107
     * Test getting activity completion information.
107
     * Test getting activity completion information.
108
     */
108
     */
109
    public function test_get_activity_completion_info() {
109
    public function test_get_activity_completion_info(): void {
110
        $this->resetAfterTest();
110
        $this->resetAfterTest();
111
        $user = $this->getDataGenerator()->create_user();
111
        $user = $this->getDataGenerator()->create_user();
112
        $this->create_course_completion();
112
        $this->create_course_completion();
113
        $this->complete_course($user);
113
        $this->complete_course($user);
Línea 119... Línea 119...
119
    }
119
    }
Línea 120... Línea 120...
120
 
120
 
121
    /**
121
    /**
122
     * Test deleting activity completion information for a user.
122
     * Test deleting activity completion information for a user.
123
     */
123
     */
124
    public function test_delete_completion_activity_user() {
124
    public function test_delete_completion_activity_user(): void {
125
        $this->resetAfterTest();
125
        $this->resetAfterTest();
126
        $user = $this->getDataGenerator()->create_user();
126
        $user = $this->getDataGenerator()->create_user();
127
        $this->create_course_completion();
127
        $this->create_course_completion();
128
        $this->complete_course($user);
128
        $this->complete_course($user);
Línea 133... Línea 133...
133
    }
133
    }
Línea 134... Línea 134...
134
 
134
 
135
    /**
135
    /**
136
     * Test deleting course completion information.
136
     * Test deleting course completion information.
137
     */
137
     */
138
    public function test_delete_completion_course() {
138
    public function test_delete_completion_course(): void {
139
        $this->resetAfterTest();
139
        $this->resetAfterTest();
140
        $user = $this->getDataGenerator()->create_user();
140
        $user = $this->getDataGenerator()->create_user();
141
        $this->create_course_completion();
141
        $this->create_course_completion();
142
        $this->complete_course($user);
142
        $this->complete_course($user);
Línea 148... Línea 148...
148
    }
148
    }
Línea 149... Línea 149...
149
 
149
 
150
    /**
150
    /**
151
     * Test deleting course completion information by approved userlist.
151
     * Test deleting course completion information by approved userlist.
152
     */
152
     */
153
    public function test_delete_completion_by_approved_userlist() {
153
    public function test_delete_completion_by_approved_userlist(): void {
154
        $this->resetAfterTest();
154
        $this->resetAfterTest();
155
        $user1 = $this->getDataGenerator()->create_user();
155
        $user1 = $this->getDataGenerator()->create_user();
156
        $user2 = $this->getDataGenerator()->create_user();
156
        $user2 = $this->getDataGenerator()->create_user();
157
        $user3 = $this->getDataGenerator()->create_user();
157
        $user3 = $this->getDataGenerator()->create_user();
Línea 205... Línea 205...
205
    }
205
    }
Línea 206... Línea 206...
206
 
206
 
207
    /**
207
    /**
208
     * Test getting course completion information with completion disabled.
208
     * Test getting course completion information with completion disabled.
209
     */
209
     */
210
    public function test_get_course_completion_info_completion_disabled() {
210
    public function test_get_course_completion_info_completion_disabled(): void {
Línea 211... Línea 211...
211
        $this->resetAfterTest();
211
        $this->resetAfterTest();
Línea 212... Línea 212...
212
 
212