-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.3.1, 3.4
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-59902-master
-
I render a single_button object using the core renderer's method render_single_button, i.e. from a mustache template. The single_button is instantiated using a moodle_url object.
If that moodle_url object is created from a URL that contains slash arguments, the effective target URL of the single_button completely ignores the slash arguments. Example URL: https://demo.nextcloud.com/ogh3roos/index.php/apps/oauth2/authorize
EXPECTED: A button within a form whose action URL is "https://demo.nextcloud.com/ogh3roos/index.php/apps/oauth2/authorize".
ACTUAL: A button within a form whose action URL is "https://demo.nextcloud.com/ogh3roos/index.php".
SAMPLE CODE:
// with an existing oauth client; must be configured with an issuer that uses slasharguments as its authorization_endpoint:
|
$renderer->render(new \single_button($oauthclient->get_login_url(), 'Login'));
|
// quick demo without oauth configuration:
|
$renderer->render(new \single_button(new \moodle_url("https://demo.nextcloud.com/ogh3roos/index.php/apps/oauth2/authorize"), 'Login'));
|