Permalink
Browse files

Merge branch 'MDL-58727-master' of git://github.com/jleyva/moodle

  • Loading branch information...
dmonllao committed Apr 27, 2017
2 parents d40c884 + b103797 commit 0b90afb59ef9a86435600f0127611a00fbc35bc6
@@ -149,12 +149,8 @@ public static function get_public_config() {
// Check if the user can sign-up to return the launch URL in that case.
$cansignup = signup_is_enabled();
if ($typeoflogin == self::LOGIN_VIA_BROWSER or
$typeoflogin == self::LOGIN_VIA_EMBEDDED_BROWSER or
$cansignup) {
$url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
$settings['launchurl'] = $url->out(false);
}
$url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
$settings['launchurl'] = $url->out(false);
if ($logourl = $OUTPUT->get_logo_url()) {
$settings['logourl'] = $logourl->out(false);
@@ -147,7 +147,7 @@ public static function get_public_config_returns() {
'logourl' => new external_value(PARAM_URL, 'The site logo URL', VALUE_OPTIONAL),
'compactlogourl' => new external_value(PARAM_URL, 'The site compact logo URL', VALUE_OPTIONAL),
'typeoflogin' => new external_value(PARAM_INT, 'The type of login. 1 for app, 2 for browser, 3 for embedded.'),
'launchurl' => new external_value(PARAM_URL, 'SSO login launch URL. Empty if it won\'t be used.', VALUE_OPTIONAL),
'launchurl' => new external_value(PARAM_URL, 'SSO login launch URL.', VALUE_OPTIONAL),
'mobilecssurl' => new external_value(PARAM_URL, 'Mobile custom CSS theme', VALUE_OPTIONAL),
'tool_mobile_disabledfeatures' => new external_value(PARAM_RAW, 'Disabled features in the app', VALUE_OPTIONAL),
'identityproviders' => new external_multiple_structure(
@@ -85,6 +85,7 @@ public function test_get_public_config() {
'typeoflogin' => api::LOGIN_VIA_APP,
'mobilecssurl' => '',
'tool_mobile_disabledfeatures' => '',
'launchurl' => "$CFG->wwwroot/$CFG->admin/tool/mobile/launch.php",
'warnings' => array()
);
$this->assertEquals($expected, $result);
@@ -101,7 +102,6 @@ public function test_get_public_config() {
$expected['registerauth'] = 'email';
$expected['authinstructions'] = $authinstructions;
$expected['typeoflogin'] = api::LOGIN_VIA_BROWSER;
$expected['launchurl'] = "$CFG->wwwroot/$CFG->admin/tool/mobile/launch.php";
if ($logourl = $OUTPUT->get_logo_url()) {
$expected['logourl'] = $logourl->out(false);

0 comments on commit 0b90afb

Please sign in to comment.