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

qformat_xml methods trans_format and get_format should not be declared protected.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.2, 2.2
    • 2.1.3
    • Questions
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE
    • Hide

      Currently we need to duplicate this code in the questiontype.php file of our qtypes wich is not a very good solution.

      Show
      Currently we need to duplicate this code in the questiontype.php file of our qtypes wich is not a very good solution.
    • Hide

      1. Review patch, and confirm it cannot break anything.

      2. Export some questions as Moodle XML and re-import, to verify there are no regressions.

      Show
      1. Review patch, and confirm it cannot break anything. 2. Export some questions as Moodle XML and re-import, to verify there are no regressions.

    Description

      The 2 methods trans_format and get_format in the qformat_xml class in question/format/xml/format.php convert modle internal numerical code for formats to and from human readable format string.
      IMHO they should not be declared proctected because they are quite usefull in some third party qtypes to write the export_to_xml and import_from_xml methods

      Attachments

        Activity

          People

            timhunt Tim Hunt
            jmvedrine Jean-Michel Vedrine
            Aparup Banerjee Aparup Banerjee
            Ankit Agarwal Ankit Agarwal
            Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              28/Nov/11