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

Question formats from contrib are not completely pluggable - must modify core lang files.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.9.5
    • Fix Version/s: 2.0
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Need to be able to make question formats completely pluggable. Currently, you must edit /lang/LANGUAGE/quiz.php and add the new format for it to display properly. Would like to be able to add contrib question formats without modifying moodle core files.

      Suggest that an additional location be added in places_to_search_for_lang_strings function (starting at line 5157 in /lib.moodlelib.php), probably something along the lines of 'qformat_' => array('question/format').

      Then you would just need to modify the get_import_export_formats function (starting at line 2029 in /lib/questionlib.php) to allow for this - currently it uses the directory name and looks for it in quiz.php.

        Attachments

        1. MDL-19550.patch
          2 kB
        2. MDL-19550.patch
          2 kB
        3. MDL-19550-head.patch
          0.9 kB

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              mcampbell Matt Campbell
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10