mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-57102 tool_mobile: Return launchurl when sign-up enabled
This commit is contained in:
parent
813320fbb6
commit
851b291998
@ -101,6 +101,7 @@ class api {
|
||||
*/
|
||||
public static function get_public_config() {
|
||||
global $CFG, $SITE, $PAGE, $OUTPUT;
|
||||
require_once($CFG->libdir . '/authlib.php');
|
||||
|
||||
$context = context_system::instance();
|
||||
// We need this to make work the format text functions.
|
||||
@ -132,8 +133,12 @@ class api {
|
||||
}
|
||||
$settings['typeoflogin'] = $typeoflogin;
|
||||
|
||||
// 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) {
|
||||
$typeoflogin == self::LOGIN_VIA_EMBEDDED_BROWSER or
|
||||
$cansignup) {
|
||||
$url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
|
||||
$settings['launchurl'] = $url->out(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user