Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 62... Línea 62...
62
    }
62
    }
Línea 63... Línea 63...
63
 
63
 
64
    /**
64
    /**
65
     * Test for create_attempt method.
65
     * Test for create_attempt method.
66
     */
66
     */
67
    public function test_create_attempt() {
67
    public function test_create_attempt(): void {
68
        global $CFG, $DB;
68
        global $CFG, $DB;
Línea 69... Línea 69...
69
        require_once($CFG->dirroot.'/lib/xapi/tests/helper.php');
69
        require_once($CFG->dirroot.'/lib/xapi/tests/helper.php');
70
 
70
 
Línea 102... Línea 102...
102
    }
102
    }
Línea 103... Línea 103...
103
 
103
 
104
    /**
104
    /**
105
     * Test for last_attempt method
105
     * Test for last_attempt method
106
     */
106
     */
Línea 107... Línea 107...
107
    public function test_last_attempt() {
107
    public function test_last_attempt(): void {
Línea 108... Línea 108...
108
 
108
 
109
        list($cm, $student) = $this->generate_testing_scenario();
109
        list($cm, $student) = $this->generate_testing_scenario();
Línea 144... Línea 144...
144
     * @param string $subcontent subcontent identifier
144
     * @param string $subcontent subcontent identifier
145
     * @param bool $hasdefinition generate definition
145
     * @param bool $hasdefinition generate definition
146
     * @param bool $hasresult generate result
146
     * @param bool $hasresult generate result
147
     * @param array $results 0 => insert ok, 1 => maxscore, 2 => rawscore, 3 => count
147
     * @param array $results 0 => insert ok, 1 => maxscore, 2 => rawscore, 3 => count
148
     */
148
     */
149
    public function test_save_statement(string $subcontent, bool $hasdefinition, bool $hasresult, array $results) {
149
    public function test_save_statement(string $subcontent, bool $hasdefinition, bool $hasresult, array $results): void {
Línea 150... Línea 150...
150
 
150
 
Línea 151... Línea 151...
151
        list($cm, $student) = $this->generate_testing_scenario();
151
        list($cm, $student) = $this->generate_testing_scenario();
152
 
152
 
Línea 210... Línea 210...
210
    }
210
    }
Línea 211... Línea 211...
211
 
211
 
212
    /**
212
    /**
213
     * Test delete results from attempt.
213
     * Test delete results from attempt.
214
     */
214
     */
Línea 215... Línea 215...
215
    public function test_delete_results() {
215
    public function test_delete_results(): void {
Línea 216... Línea 216...
216
 
216
 
217
        list($cm, $student) = $this->generate_testing_scenario();
217
        list($cm, $student) = $this->generate_testing_scenario();
Línea 222... Línea 222...
222
    }
222
    }
Línea 223... Línea 223...
223
 
223
 
224
    /**
224
    /**
225
     * Test delete attempt.
225
     * Test delete attempt.
226
     */
226
     */
227
    public function test_delete_attempt() {
227
    public function test_delete_attempt(): void {
Línea 228... Línea 228...
228
        global $DB;
228
        global $DB;
Línea 229... Línea 229...
229
 
229
 
Línea 263... Línea 263...
263
     *
263
     *
264
     * @dataProvider delete_all_attempts_data
264
     * @dataProvider delete_all_attempts_data
265
     * @param bool $hasstudent if user is specificed
265
     * @param bool $hasstudent if user is specificed
266
     * @param int[] 0-3 => statements count results, 4-5 => totals
266
     * @param int[] 0-3 => statements count results, 4-5 => totals
267
     */
267
     */
268
    public function test_delete_all_attempts(bool $hasstudent, array $results) {
268
    public function test_delete_all_attempts(bool $hasstudent, array $results): void {
269
        global $DB;
269
        global $DB;
Línea 270... Línea 270...
270
 
270
 
Línea 271... Línea 271...
271
        list($cm, $student, $course) = $this->generate_testing_scenario();
271
        list($cm, $student, $course) = $this->generate_testing_scenario();