Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.9.7
-
None
-
None
-
Any
-
Easy
-
MOODLE_19_STABLE
Description
In the import_from_xml method the algebra questiontype is not checking the type of the imported questions so if other third party questiontypes are installed and algebra method is called first it think that the question is an algebra one (even if it is not) and try to import it.
the code I use in my questionstypes (and wich is also the one Joseph Rezeau is using in its regexp questiontype) is :
if (!array_key_exists('@', $data))
{ return false; }if (!array_key_exists('type', $data['@'])) { return false; }
if ($data['@']['type'] == 'algebra') {
I don't use algebra myself but noticed that because one of the testers of the next version of the jme questiontype wich include xml import/export reported a problem because he had algebra installed.
If algebra is the only third party questiontype installed there is no problem. Problem arise when you have algebra and an other one installed