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

Impossible to create render methods for namespaced renderables (partial backport of MDL-41663)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.10, 2.7.7
    • Fix Version/s: 2.7.8
    • Component/s: Libraries
    • Labels:
    • Database:
      Any
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Testing Instructions:
      Hide

      0. Verify both unit and acceptance tests pass ok.
      1. Ensure Moodle still looks like Moodle – if the renderers aren't working, no pages will render.
      2. Checkout /local/mdl49664 from the MDL-49664-TEST branch of my fork.
      3. Visit /local/mdl49664/index.php
      4. Ensure the page prints "Hello, world!" – this means namespaced renderables can be rendered corrected.

      Show
      0. Verify both unit and acceptance tests pass ok. 1. Ensure Moodle still looks like Moodle – if the renderers aren't working, no pages will render. 2. Checkout /local/mdl49664 from the MDL-49664 -TEST branch of my fork. 3. Visit /local/mdl49664/index.php 4. Ensure the page prints "Hello, world!" – this means namespaced renderables can be rendered corrected.

      Description

      When rendering a class which renderable and exists within a namespace, renderer_base::render() and plugin_renderer_base::render() will generate a $rendermethod which contains a backslash () character.

      This is not a valid character in method names, and as such a developer cannot implement a renderer method.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lukecarrier Luke Carrier
              Reporter:
              lukecarrier Luke Carrier
              Peer reviewer:
              Ankit Agarwal Ankit Agarwal
              Integrator:
              Dan Poltawski Dan Poltawski
              Tester:
              John Okely John Okely
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/15