Skip to content

Commit

Permalink
Merge branch 'wip-MSFTMPP-264-m28' into MOODLE_28_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmcq committed Oct 21, 2015
2 parents 00727c4 + 04d60e8 commit b3002a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions local/o365/classes/rest/unified.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public static function is_configured() {
* @return bool Whether the unified API is enabled.
*/
public static function is_enabled() {
return false;
$enabled = get_config('local_o365', 'enableunifiedapi');
return (!empty($enabled)) ? true : false;
}

/**
Expand Down Expand Up @@ -510,4 +511,4 @@ public function check_permissions() {

return $missingpermsreturn;
}
}
}
2 changes: 2 additions & 0 deletions local/o365/lang/en/local_o365.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
$string['settings_detectperms_update'] = 'Update';
$string['settings_detectperms_valid'] = 'Permissions have been set up.';
$string['settings_detectperms_invalid'] = 'Check permissions in Azure AD';
$string['settings_enableunifiedapi'] = 'Enable Unified API';
$string['settings_enableunifiedapi_details'] = 'The unified API is a preview API that provides some new features like the "Create user groups" setting below. It will eventually replace the application-specific Office APIs, however it is still in preview and is subject to change which may break some functionality. If you\'d like to try it out, enable this setting and click "Save changes". Add the "Unified API" to your application in Azure then return here and run the "Azure Setup" tool below.';
$string['settings_header_setup'] = 'Setup';
$string['settings_header_options'] = 'Options';
$string['settings_healthcheck'] = 'Health Check';
Expand Down
4 changes: 4 additions & 0 deletions local/o365/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
$desc = get_string('settings_o365china_details', 'local_o365');
$settings->add(new \admin_setting_configcheckbox('local_o365/chineseapi', $label, $desc, '0'));

$label = get_string('settings_enableunifiedapi', 'local_o365');
$desc = get_string('settings_enableunifiedapi_details', 'local_o365');
$settings->add(new \admin_setting_configcheckbox('local_o365/enableunifiedapi', $label, $desc, '0'));

$label = get_string('settings_creategroups', 'local_o365');
$desc = get_string('settings_creategroups_details', 'local_o365');
$settings->add(new \admin_setting_configcheckbox('local_o365/creategroups', $label, $desc, '0'));
Expand Down

0 comments on commit b3002a3

Please sign in to comment.