Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 159... Línea 159...
159
     * @param context|null $context $context
159
     * @param context|null $context $context
160
     * @param bool $onlyviewableroles
160
     * @param bool $onlyviewableroles
161
     *
161
     *
162
     * @return array $users
162
     * @return array $users
163
     */
163
     */
164
    protected static function get_roles_select(context $context = null, bool $onlyviewableroles = true) {
164
    protected static function get_roles_select(?context $context = null, bool $onlyviewableroles = true) {
165
        global $CFG;
165
        global $CFG;
Línea 166... Línea 166...
166
 
166
 
167
        if ($onlyviewableroles == true && $CFG->branch >= 35) {
167
        if ($onlyviewableroles == true && $CFG->branch >= 35) {
168
            $roles = (array) get_viewable_roles($context);
168
            $roles = (array) get_viewable_roles($context);
Línea 217... Línea 217...
217
            'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
217
            'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
218
            'children' => self::get_roles_select($context, true)
218
            'children' => self::get_roles_select($context, true)
219
        ];
219
        ];
220
        $data['user'] = [
220
        $data['user'] = [
221
            'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
221
            'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
222
            'children' => self::get_users_array($context, $bbactivity),
222
            'children' => [],
223
        ];
223
        ];
-
 
224
 
-
 
225
        if (empty($bbactivity)) {
-
 
226
            return $data;
-
 
227
        }
-
 
228
 
-
 
229
        $data['user']['children'] = self::get_users_array($context, $bbactivity);
-
 
230
 
224
        return $data;
231
        return $data;
225
    }
232
    }
Línea 226... Línea 233...
226
 
233
 
227
    /**
234
    /**