Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 263... Línea 263...
263
 
263
 
264
        // Room name for the communication provider.
264
        // Room name for the communication provider.
265
        $mform->insertElementBefore(
265
        $mform->insertElementBefore(
266
            $mform->createElement(
266
            $mform->createElement(
267
                'text',
267
                'text',
268
                'communicationroomname',
268
                $provider . 'roomname',
269
                get_string('communicationroomname', 'communication'),
269
                get_string('communicationroomname', 'communication'),
270
                'maxlength="100" size="20"'
270
                'maxlength="100" size="20"'
271
            ),
271
            ),
272
            'addcommunicationoptionshere'
272
            'addcommunicationoptionshere'
273
        );
273
        );
Línea 274... Línea 274...
274
        $mform->setType('communicationroomname', PARAM_TEXT);
274
        $mform->setType($provider . 'roomname', PARAM_TEXT);
275
 
275
 
276
        $mform->insertElementBefore(
276
        $mform->insertElementBefore(
277
            $mform->createElement(
277
            $mform->createElement(
Línea 374... Línea 374...
374
     * A helper to fetch the room name
374
     * A helper to fetch the room name
375
     *
375
     *
376
     * @return string
376
     * @return string
377
     */
377
     */
378
    public function get_room_name(): string {
378
    public function get_room_name(): string {
-
 
379
        if (!$this->communication) {
-
 
380
            return '';
-
 
381
        }
379
        return $this->communication->get_room_name();
382
        return $this->communication->get_room_name();
380
    }
383
    }
Línea 381... Línea 384...
381
 
384
 
382
    /**
385
    /**
Línea 385... Línea 388...
385
     * @param \stdClass $instance The instance object
388
     * @param \stdClass $instance The instance object
386
     */
389
     */
387
    public function set_data(\stdClass $instance): void {
390
    public function set_data(\stdClass $instance): void {
388
        if (!empty($instance->id) && $this->communication) {
391
        if (!empty($instance->id) && $this->communication) {
389
            $instance->selectedcommunication = $this->communication->get_provider();
392
            $instance->selectedcommunication = $this->communication->get_provider();
-
 
393
            $roomnameidentifier = $this->get_provider() . 'roomname';
390
            $instance->communicationroomname = $this->communication->get_room_name();
394
            $instance->$roomnameidentifier = $this->communication->get_room_name();
Línea 391... Línea 395...
391
 
395
 
392
            $this->communication->get_form_provider()->set_form_data($instance);
396
            $this->communication->get_form_provider()->set_form_data($instance);
393
        }
397
        }
Línea 472... Línea 476...
472
        ) {
476
        ) {
473
            $this->remove_all_members_from_room();
477
            $this->remove_all_members_from_room();
474
            // Now deactivate the previous provider.
478
            // Now deactivate the previous provider.
475
            $this->update_room(
479
            $this->update_room(
476
                active: processor::PROVIDER_INACTIVE,
480
                active: processor::PROVIDER_INACTIVE,
477
                communicationroomname: $communicationroomname,
-
 
478
                avatar: $instanceimage,
-
 
479
                instance: $instance,
481
                instance: $instance,
480
                queue: $queue,
482
                queue: $queue,
481
            );
483
            );
482
        }
484
        }