Moodle

Lesson Module GIFT import fails

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.3
  • Fix Version/s: 1.8.4, 1.9, 2.0
  • Component/s: Lesson
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

To reproduce the bug:

0. Update your Moodle to the latest 1.8.x CVS version, then turn on debugging to the ALL level
1. create a GIFT questions text file to be imported
2. test it against the quiz module import, and make sure the GIFT file works at least here
3. now create a Lesson Module, and select Import question from file
4. select GIFT as the import format
5. select and upload the previously created GIFT formatted file
6. Moodle returns: Fatal error: Call to undefined method qformat_gift::try_importing_using_qtypes() in /yourmoodlepathl/moodle/question/format/gift/format.php on line 228

Activity

Hide
Yu Zhang added a comment -

Added some code to check for function existence before calling it. The problem is that there are 2 copies of qformat_default classes, 1 in the question bank and the other in lesson module. The lesson mod uses the lesson mod copy only, so it's missing some methods. I do not know whether it is possible to merge them gracefully, given that the one in lesson has a specialized importprocess() method.

Show
Yu Zhang added a comment - Added some code to check for function existence before calling it. The problem is that there are 2 copies of qformat_default classes, 1 in the question bank and the other in lesson module. The lesson mod uses the lesson mod copy only, so it's missing some methods. I do not know whether it is possible to merge them gracefully, given that the one in lesson has a specialized importprocess() method.
Hide
Andrea Bicciolo added a comment -

Thanks Yu!

Show
Andrea Bicciolo added a comment - Thanks Yu!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: