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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.10, 2.7.7
    • 2.7.8
    • Libraries
    • Any
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_27_STABLE
    • 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

              lukecarrier Luke Carrier
              lukecarrier Luke Carrier
              Ankit Agarwal Ankit Agarwal
              Dan Poltawski Dan Poltawski
              John Okely John Okely
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/May/15