mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-59214 webservice: Return calendar type in get_site_info
This commit is contained in:
parent
6bb80a1917
commit
bef5777fc4
4 changed files with 23 additions and 2 deletions
|
@ -197,6 +197,14 @@ class core_webservice_external extends external_api {
|
|||
// User home page.
|
||||
$siteinfo['userhomepage'] = get_home_page();
|
||||
|
||||
// Calendar.
|
||||
$siteinfo['sitecalendartype'] = $CFG->calendartype;
|
||||
if (empty($USER->calendartype)) {
|
||||
$siteinfo['usercalendartype'] = $CFG->calendartype;
|
||||
} else {
|
||||
$siteinfo['usercalendartype'] = $USER->calendartype;
|
||||
}
|
||||
|
||||
return $siteinfo;
|
||||
}
|
||||
|
||||
|
@ -259,7 +267,9 @@ class core_webservice_external extends external_api {
|
|||
'userhomepage' => new external_value(PARAM_INT,
|
||||
'the default home page for the user: 0 for the site home, 1 for dashboard',
|
||||
VALUE_OPTIONAL),
|
||||
'siteid' => new external_value(PARAM_INT, 'Site course ID', VALUE_OPTIONAL)
|
||||
'siteid' => new external_value(PARAM_INT, 'Site course ID', VALUE_OPTIONAL),
|
||||
'sitecalendartype' => new external_value(PARAM_PLUGIN, 'Calendar type set in the site.', VALUE_OPTIONAL),
|
||||
'usercalendartype' => new external_value(PARAM_PLUGIN, 'Calendar typed used by the user.', VALUE_OPTIONAL),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue