Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 1.9.9
-
Fix Version/s: 1.9.10
-
Component/s: Enrolments, General
-
Labels:None
-
Environment:Redhat/Apache
PHP 5.3.2
-
Database:PostgreSQL
-
Difficulty:Easy
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
When XML <group> has a new course which is in a new category<orgunit> where the text contains a single quote the insert_record() fails because the addslashes_object() has not been applied and category ($course->category) ends up be set to 0 (zero). It ($course->category) should be set to 1;
Effects:
Under postgres, the newly created course ended up becoming our sitepage.
Under mysql, sitepage stays same, is ok.
Under both can't find the course in a category as category 0 is hidden.
Attached: Is sample XML for test
I will post patch soon.