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

moodle_page::set_heading, moodle_page::set_title, and navigation_node::get_content methods should not be formatting content

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: Navigation
    • Labels:
    • Affected Branches:
      MOODLE_21_STABLE

      Description

      Presently moodle_page::set_title, moodle_page::set_heading, and navigation_node::get_content all call format_string internally.
      These methods should not be doing this at all, this should be done before calling these methods so that the proper options (namely context) can used.
      At the moment those calls will be defaulting to use the page context, in the case of set_title and set_heading this is likely correct only 50% of the time, and in the case of the navigation its bound to be never correct or at least correct < 1% of the time.

      In all cases it was done originally as it allowed up to speed up the conversion of all pages during the development of 2.0 while ensuring that formatting and context sensitive filtering were still occurring. However we really... really need to clean this up at some point.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              samhemelryk Sam Hemelryk
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: