Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 192... Línea 192...
192
        // Cast to int to ensure value is not higher than PHP_INT_MAX.
192
        // Cast to int to ensure value is not higher than PHP_INT_MAX.
193
        $siteinfo['usermaxuploadfilesize'] = (int) get_user_max_upload_file_size($context, $CFG->maxbytes);
193
        $siteinfo['usermaxuploadfilesize'] = (int) get_user_max_upload_file_size($context, $CFG->maxbytes);
Línea 194... Línea 194...
194
 
194
 
195
        // User home page.
195
        // User home page.
-
 
196
        $siteinfo['userhomepage'] = get_home_page();
-
 
197
        if ($siteinfo['userhomepage'] === HOMEPAGE_URL) {
-
 
198
            $siteinfo['userhomepageurl'] = (string) get_default_home_page_url();
Línea 196... Línea 199...
196
        $siteinfo['userhomepage'] = get_home_page();
199
        }
197
 
200
 
198
        // Calendar.
201
        // Calendar.
199
        $siteinfo['sitecalendartype'] = $CFG->calendartype;
202
        $siteinfo['sitecalendartype'] = $CFG->calendartype;
Línea 211... Línea 214...
211
        $siteinfo['theme'] = clean_param($PAGE->theme->name, PARAM_THEME);  // We always clean to avoid problem with old sites.
214
        $siteinfo['theme'] = clean_param($PAGE->theme->name, PARAM_THEME);  // We always clean to avoid problem with old sites.
Línea 212... Línea 215...
212
 
215
 
213
        $siteinfo['limitconcurrentlogins'] = (int) $CFG->limitconcurrentlogins;
216
        $siteinfo['limitconcurrentlogins'] = (int) $CFG->limitconcurrentlogins;
214
        if (!empty($CFG->limitconcurrentlogins)) {
217
        if (!empty($CFG->limitconcurrentlogins)) {
215
            // For performance, only when enabled.
218
            // For performance, only when enabled.
216
            $siteinfo['usersessionscount'] = $DB->count_records('sessions', ['userid' => $USER->id]);
219
            $siteinfo['usersessionscount'] = count(\core\session\manager::get_sessions_by_userid($USER->id));
Línea 217... Línea 220...
217
        }
220
        }
Línea 218... Línea 221...
218
 
221
 
Línea 278... Línea 281...
278
                                            'user max upload file size (bytes). -1 means the user can ignore the upload file size',
281
                                            'user max upload file size (bytes). -1 means the user can ignore the upload file size',
279
                                            VALUE_OPTIONAL),
282
                                            VALUE_OPTIONAL),
280
                'userhomepage' => new external_value(PARAM_INT,
283
                'userhomepage' => new external_value(PARAM_INT,
281
                                                        'the default home page for the user: 0 for the site home, 1 for dashboard',
284
                                                        'the default home page for the user: 0 for the site home, 1 for dashboard',
282
                                                        VALUE_OPTIONAL),
285
                                                        VALUE_OPTIONAL),
-
 
286
                'userhomepageurl' => new external_value(PARAM_LOCALURL,
-
 
287
                    'The URL of default home page when userhomepage is 4 (HOMEPAGE_URL).', VALUE_OPTIONAL),
283
                'userprivateaccesskey'  => new external_value(PARAM_ALPHANUM, 'Private user access key for fetching files.',
288
                'userprivateaccesskey'  => new external_value(PARAM_ALPHANUM, 'Private user access key for fetching files.',
284
                    VALUE_OPTIONAL),
289
                    VALUE_OPTIONAL),
285
                'siteid'  => new external_value(PARAM_INT, 'Site course ID', VALUE_OPTIONAL),
290
                'siteid'  => new external_value(PARAM_INT, 'Site course ID', VALUE_OPTIONAL),
286
                'sitecalendartype'  => new external_value(PARAM_PLUGIN, 'Calendar type set in the site.', VALUE_OPTIONAL),
291
                'sitecalendartype'  => new external_value(PARAM_PLUGIN, 'Calendar type set in the site.', VALUE_OPTIONAL),
287
                'usercalendartype'  => new external_value(PARAM_PLUGIN, 'Calendar typed used by the user.', VALUE_OPTIONAL),
292
                'usercalendartype'  => new external_value(PARAM_PLUGIN, 'Calendar typed used by the user.', VALUE_OPTIONAL),