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

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.2
    • Fix Version/s: 2.1.3
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      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.
    • Workaround:
      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.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      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

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Nov/11