Index: xmldb_object.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/xmldb/xmldb_object.php,v retrieving revision 1.1 diff -u -r1.1 xmldb_object.php --- xmldb_object.php 20 May 2008 17:06:28 -0000 1.1 +++ xmldb_object.php 6 Jul 2008 14:37:58 -0000 @@ -414,7 +414,7 @@ /// Extract all the quoted elements from the string (skipping /// backslashed quotes that are part of the content. - preg_match_all("/('.*?[^\\\]')/is", $string, $matches); + preg_match_all("/(''|'.*?[^\\\\]')/is", $string, $matches); foreach (array_unique($matches[0]) as $key=>$value) { $foundquotes['<%'.$key.'%>'] = $value; } Index: xmldb_statement.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/xmldb/xmldb_statement.php,v retrieving revision 1.2 diff -u -r1.2 xmldb_statement.php --- xmldb_statement.php 24 May 2008 23:14:43 -0000 1.2 +++ xmldb_statement.php 6 Jul 2008 13:57:23 -0000 @@ -153,11 +153,6 @@ $fields = $this->getFieldsFromInsertSentence($sentence); $values = $this->getValuesFromInsertSentence($sentence); /// Check that we aren't inserting the id field - if (in_array('id', $fields)) { - $this->errormsg = 'Cannot insert the "id" field. It is an autonumeric column'; - $this->debug($this->errormsg); - $result = false; - } if ($result && count($fields) == 0) { $this->errormsg = 'Missing fields in sentence "' . $sentence . '"'; $this->debug($this->errormsg);