Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59902

single_button ignores slasharguments of a moodle_url

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 3.3.1, 3.4
    • Other

      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'));
      

        1. test-mdl-59902.php
          0.3 kB
          Tobias Reischmann
        2. output.png
          54 kB
          Jan Dageförde
        3. test-mdl-59902-v2.php
          0.5 kB
          Laurent David

            Unassigned Unassigned
            jan.dagefoerde Jan Dageförde
            Jan Dageförde Jan Dageförde
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.