Closed (fixed)
Project:
Quiz
Version:
6.x-4.x-dev
Component:
Code - Import/Export
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2009 at 08:30 UTC
Updated:
6 Nov 2009 at 14:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
sivaji_ganesh_jojodae commentedDigging into the code i found that function name has been changes and arguments where missing in QTI importer validation function. Attached is a patch which tries to fix it and allow questions being generated from QTI XML file. But still there are some warning message being generated by QueryPath function which looks as below
@mbutcher is it because of the recent changes made in qp lib ?
Comment #2
mbutcher commentedThis is because QueryPath 2.0 is a lot stricter (by default) on HTML parsing. Fixing is easy, though. There is a parameter to QueryPath that tells it to ignore parser warnings. It can be set globally by doing:
You will have to execute QueryPath with error suppression, though:
Comment #3
sivaji_ganesh_jojodae commentedIt makes no difference for me. Tested with stable 2.x and 2.x beta. I gone through the QP library code (beta version) could not find anything like
array('ignore_parser_warnings' => TRUE).The questions_import.admin.inc line 596 which causes this error has following statement
Hope this will help you to track down further.
Comment #4
mbutcher commentedThe ignore_parser_warnings was added in QueryPath 2.0.1, which is the current stable release.
In the code above, though, it sounds like what is actually causing the warnings are the two lines you quoted above. You might just change the second line to:
That will suppress warnings (and errors too, unfortunately, so make sure to do a null check on $doc) that are encountered during parsing.
Comment #5
falcon commented