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

Ajax webservice uses wrong renderer by default

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.1.4
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      In the current theme - override single button so it looks different. (Boost does this already)

      View the manage competency frameworks page. Duplicate a framework. Verify the "Add" button does not change in appearance.

      Show
      In the current theme - override single button so it looks different. (Boost does this already) View the manage competency frameworks page. Duplicate a framework. Verify the "Add" button does not change in appearance.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56958-master

      Description

      When calling the ajax webservice script - /lib/ajax/service.php because AJAX_SCRIPT is defined, any webservice that is called will get the "_ajax" renderer by default. In any theme (boost) - unless we define an ajax renderer (can't extend the base one - needs to duplicate the whole thing) we will get the core ajax renderer which only falls back on the core_renderer (not the one from the theme).

      If we are returning some HTML as part of a web-service response, we are not expecting the AJAX renderer - it does weird things like removing all headers etc. The AJAX renderer also handles custom error formatting - but we do that anyway in external_api::call_external_function.

      So - anything that goes through /lib/ajax/service.php should prefer the GENERAL renderer instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              damyon Damyon Wiese
              Reporter:
              damyon Damyon Wiese
              Peer reviewer:
              Mark Nelson
              Integrator:
              Andrew Nicols
              Tester:
              Jun Pataleta
              Participants:
              Component watchers:
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jan/17