Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 46... Línea 46...
46
     *
46
     *
47
     * @param array|stdClass $record data for module being generated.
47
     * @param array|stdClass $record data for module being generated.
48
     * @param null|array $options general options for course module.
48
     * @param null|array $options general options for course module.
49
     * @return stdClass record from module-defined table with additional field cmid
49
     * @return stdClass record from module-defined table with additional field cmid
50
     */
50
     */
51
    public function create_instance($record = null, array $options = null) {
51
    public function create_instance($record = null, ?array $options = null) {
52
        // Prior to creating the instance, make sure that the BigBlueButton module is enabled.
52
        // Prior to creating the instance, make sure that the BigBlueButton module is enabled.
53
        $modules = \core_plugin_manager::instance()->get_plugins_of_type('mod');
53
        $modules = \core_plugin_manager::instance()->get_plugins_of_type('mod');
54
        if (!$modules['bigbluebuttonbn']->is_enabled()) {
54
        if (!$modules['bigbluebuttonbn']->is_enabled()) {
55
            mod::enable_plugin('bigbluebuttonbn', true);
55
            mod::enable_plugin('bigbluebuttonbn', true);
56
        }
56
        }
Línea 64... Línea 64...
64
            "viewerpass" => "ap",
64
            "viewerpass" => "ap",
65
            "participants" => "{}",
65
            "participants" => "{}",
66
            "timecreated" => $now,
66
            "timecreated" => $now,
67
            "timemodified" => $now,
67
            "timemodified" => $now,
68
            "presentation" => null,
68
            "presentation" => null,
69
            "recordings_preview" => 0
69
            "recordings_preview" => 0,
-
 
70
            "grade" => 0,
70
        ];
71
        ];
Línea 71... Línea 72...
71
 
72
 
Línea 72... Línea 73...
72
        $record = (array) $record;
73
        $record = (array) $record;
Línea 373... Línea 374...
373
     * Create a log record
374
     * Create a log record
374
     *
375
     *
375
     * @param mixed $record
376
     * @param mixed $record
376
     * @param array|null $options
377
     * @param array|null $options
377
     */
378
     */
378
    public function create_log($record, array $options = null) {
379
    public function create_log($record, ?array $options = null) {
379
        $instance = instance::get_from_instanceid($record['bigbluebuttonbnid']);
380
        $instance = instance::get_from_instanceid($record['bigbluebuttonbnid']);
Línea 380... Línea 381...
380
 
381
 
381
        $record = array_merge([
382
        $record = array_merge([
382
            'meetingid' => $instance->get_meeting_id(),
383
            'meetingid' => $instance->get_meeting_id(),