-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
2.2.2
-
None
-
MOODLE_22_STABLE
I'm using Moodle 2.2.x on an Oracle database and I've found an issue while importing a .jqz file. After some debugging I've seen the SQL query in mdl_question table sets the value '' to field generalfeedback; in other words, it is trying to set an empty value to a not nullable field. MySQL has no problem with it, but Oracle complains and throws an error "ORA-01400: cannot insert NULL into generalfeedback.
The fix would be forcing this field being always populated.
Example: this SQL works on MySQL, but not on Oracle
INSERT INTO mdl_question (defaultmark,questiontextformat,generalfeedback,generalfeedbackformat,penalty,length,name,questiontext,qtype,category,stamp,createdby,timecreated,modifiedby,timemodified)
VALUES (1,'1','','0',0.3333333,1,'Mi primer ejercicio','¿Cuál es la capital de Vietnam?','multichoice','22','agora+120402123533+5r4Ueo','2',1333370133,'2',1333370133)