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

Import/Export questions: error handler message missing for 'Cloze' type question while exporting questions to a GIFT file



    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
    • 1.9.5, 2.0
    • Questions
    • None
    • Any
    • Easy


      We know that GIFT format only support Multiple-Choice, True-False, Short Answer, Matching and Numerical questions. Calculated & Cloze type questions are not supported by GIFT format. Usually, when a 'Calculated' type of question is exported to a GIFT format file, it will give a message to inform its non-supportive behavior towards GIFT format. But when a 'Cloze' type of question is exported to the same format, it neither displays any error/warning message nor exports the question to the file.

      Steps to Reproduce

      1. Login in Cranberry Course 1.1.2 as Instructor/Admin

      2. Click the 'Questions' link in the 'Administration' block

      3. Create a 'Calculated' type of question

      4. Click the 'Export' tab

      5. Select 'GIFT' format and category with calculated type question

      6. Uncheck category and context selection

      7. Name the file

      8. Export the questions

      What Happens

      The Calculated type question gives an error handler message "No handler for qtype 'calculated' for GIFT export" but the Cloze type question does not give an such message. When the final created GIFT file is viewed, both the Calculated and Cloze type question do not appear in the file, rather do not get exported to the file (which is correct).

      What Should Happen

      There should be a similar error handler message saying "No handler for qtype 'cloze' for GIFT export" while exporting to a GIFT file which is currently missing (See screen shot).

      Patch also included, welcome feedback and comments. If Martin or Tim OK'ed with it I could commit it into core. (This should be considered as a minor patch)...




            howardsmiller Howard Miller
            chuang Wen Hao Chuang
            Jérôme Mouneyrac Jérôme Mouneyrac
            Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            0 Vote for this issue
            1 Start watching this issue