MantisBT - ATutor
View Issue Details
0005450ATutorImport Contentpublic2014-05-14 19:212014-07-08 18:02
greg 
cindy 
urgentmajoralways
closedfixed 
 
2.22.2 
SVN
20a350c21f23b4baf269e30f0583a52b6559fb0d
0005450: QTI Import Fails mysqli
Seems to be related to the test_question_queries.inc.php's AT_SQL_TEST and the query run in QTIImport.class.php, failing to import into the tests table.
[14-May-2014 19:14:45] INSERT INTO AT_tests_questions VALUES ( NULL, 0, 27, 2, 'Correct answer. False, justified text can be difficult to read for some people with print disabilities', 'Text justification should be used to make text easier to read.',
                            '', '', '', '', '', '', '', '', '', '',
                            2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                            '', '', '', '', '', '', '', '', '', '', 5, 0, 'DEFAULT')
[14-May-2014 19:14:45] PHP Warning: vsprintf(): Too few arguments in /var/www/sites/multi2.atutorspaces.com/include/lib/mysql_connect.inc.php on line 148
[14-May-2014 19:14:45]
[14-May-2014 19:14:45]
[14-May-2014 19:14:45] INSERT INTO AT_tests_questions_assoc(test_id, question_id, weight, ordering, required) VALUES (0, 230, 5, 1, 0)
No tags attached.
zip Understanding_Web_Accessibility-Unit_1_Quiz__Perceivable-20140514.zip (5,354) 2014-05-14 20:00
http://www.atutor.ca/atutor/mantis/file_download.php?file_id=150&type=bug
zip Understanding_Web_Accessibility_-_Principle_1__Perceivable_imscc.zip (506,632) 2014-05-14 20:18
http://www.atutor.ca/atutor/mantis/file_download.php?file_id=151&type=bug
Issue History
2014-05-14 19:21gregNew Issue
2014-05-14 20:00gregFile Added: Understanding_Web_Accessibility-Unit_1_Quiz__Perceivable-20140514.zip
2014-05-14 20:03gregNote Added: 0006746
2014-05-14 20:05gregAssigned To => cindy
2014-05-14 20:05gregStatusnew => assigned
2014-05-14 20:18gregFile Added: Understanding_Web_Accessibility_-_Principle_1__Perceivable_imscc.zip
2014-05-16 15:32cindyNote Added: 0006747
2014-05-16 16:44gregSVN Revision# => 20a350c21f23b4baf269e30f0583a52b6559fb0d
2014-05-16 16:44gregNote Added: 0006748
2014-05-16 16:44gregStatusassigned => resolved
2014-05-16 16:44gregFixed in Version => 2.2
2014-05-16 16:44gregResolutionopen => fixed
2014-07-08 18:02gregNote Added: 0006804
2014-07-08 18:02gregStatusresolved => closed

Notes
(0006746)
greg   
2014-05-14 20:03   
$msg->containsErrors() is true line 261 QTIImport.class.php, so the above mentioned AT_SQL_TEST does not even run.
(0006747)
cindy   
2014-05-16 15:32   
Fixed issue by escaping the special character % in SQL values before the SQL reaches queryDB() since vprintf() used in queryDB() needs % specifically for wildcard searches.

The escaping is added for inserting tests and content records.
(0006748)
greg   
2014-05-16 16:44   
Commit by cli, created function to escape "%" in any data entering the db.
(0006804)
greg   
2014-07-08 18:02   
Closed prior to ATutor 2.2