Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 41... Línea 41...
41
 *
41
 *
42
 * @package    mod_h5pactivity
42
 * @package    mod_h5pactivity
43
 * @copyright  2020 Ferran Recio <ferran@moodle.com>
43
 * @copyright  2020 Ferran Recio <ferran@moodle.com>
44
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
44
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
45
 */
45
 */
46
class get_results_test extends externallib_advanced_testcase {
46
final class get_results_test extends externallib_advanced_testcase {
Línea 47... Línea 47...
47
 
47
 
48
    /**
48
    /**
49
     * Test the behaviour of get_results.
49
     * Test the behaviour of get_results.
50
     *
50
     *
Línea 144... Línea 144...
144
    /**
144
    /**
145
     * Data provider for the test_execute tests.
145
     * Data provider for the test_execute tests.
146
     *
146
     *
147
     * @return  array
147
     * @return  array
148
     */
148
     */
149
    public function execute_data(): array {
149
    public static function execute_data(): array {
150
        return [
150
        return [
151
            'Teacher reviewing an attempt' => [
151
            'Teacher reviewing an attempt' => [
152
                1, manager::REVIEWCOMPLETION, 'editingteacher', 'student', true, 1
152
                1, manager::REVIEWCOMPLETION, 'editingteacher', 'student', true, 1
153
            ],
153
            ],
154
            'Teacher try to review an inexistent attempt' => [
154
            'Teacher try to review an inexistent attempt' => [
Línea 275... Línea 275...
275
    /**
275
    /**
276
     * Data provider for the test_execute_multipleattempts tests.
276
     * Data provider for the test_execute_multipleattempts tests.
277
     *
277
     *
278
     * @return  array
278
     * @return  array
279
     */
279
     */
280
    public function execute_multipleattempts_data(): array {
280
    public static function execute_multipleattempts_data(): array {
281
        return [
281
        return [
282
            // Teacher cases.
282
            // Teacher cases.
283
            'Teacher reviewing students attempts' => [
283
            'Teacher reviewing students attempts' => [
284
                'editingteacher', ['student1_1', 'student2_1'], [], ['student1_1', 'student2_1']
284
                'editingteacher', ['student1_1', 'student2_1'], [], ['student1_1', 'student2_1']
285
            ],
285
            ],
Línea 406... Línea 406...
406
    /**
406
    /**
407
     * Data provider for the test_execute_multipleattempts tests.
407
     * Data provider for the test_execute_multipleattempts tests.
408
     *
408
     *
409
     * @return  array
409
     * @return  array
410
     */
410
     */
411
    public function execute_mixactivities_data(): array {
411
    public static function execute_mixactivities_data(): array {
412
        return [
412
        return [
413
            // Teacher cases.
413
            // Teacher cases.
414
            'Correct activity id' => [
414
            'Correct activity id' => [
415
                '11', '11', '', '11'
415
                '11', '11', '', '11'
416
            ],
416
            ],