Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 36... Línea 36...
36
 * @copyright  2021 Catalyst IT Australia Pty Ltd
36
 * @copyright  2021 Catalyst IT Australia Pty Ltd
37
 * @author     Ghaly Marc-Alexandre <marc-alexandreghaly@catalyst-ca.net>
37
 * @author     Ghaly Marc-Alexandre <marc-alexandreghaly@catalyst-ca.net>
38
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
38
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
39
 * @covers \qbank_columnsortorder\column_manager
39
 * @covers \qbank_columnsortorder\column_manager
40
 */
40
 */
41
class column_manager_test extends advanced_testcase {
41
final class column_manager_test extends advanced_testcase {
Línea 42... Línea 42...
42
 
42
 
43
    /**
43
    /**
44
     * Generate a course and return a question bank view for the course context.
44
     * Generate a course and return a question bank view for the course context.
45
     *
45
     *
46
     * @return view
46
     * @return view
47
     */
47
     */
48
    protected static function get_question_bank(): view {
48
    protected static function get_question_bank(): view {
-
 
49
        $course = self::getDataGenerator()->create_course();
-
 
50
        $qbank = self::getDataGenerator()->create_module('qbank', ['course' => $course->id]);
49
        $course = self::getDataGenerator()->create_course();
51
        $cm = get_coursemodule_from_id('qbank', $qbank->cmid);
50
        $questionbank = new view(
52
        $questionbank = new view(
51
            new question_edit_contexts(context_course::instance($course->id)),
53
            new question_edit_contexts(\context_module::instance($qbank->cmid)),
52
            new moodle_url('/'),
54
            new moodle_url('/'),
-
 
55
            $course,
53
            $course
56
            $cm
54
        );
57
        );
55
        return $questionbank;
58
        return $questionbank;
Línea 56... Línea 59...
56
    }
59
    }