Now length is correctly set and stored to DB (bug 3290)

(http://moodle.org/bugs/bug.php?op=show&bugid=3290)

plus some added bits to handle the hidden field properly
This commit is contained in:
stronk7
2005-05-18 23:53:36 +00:00
parent 5634beeaa5
commit e44f2f92b0
+4 -1
View File
@@ -167,6 +167,7 @@
//Iterate over questions
for($i = 0; $i < sizeof($questions); $i++) {
$question = new object;
$que_info = $questions[$i];
//traverse_xmlize($que_info); //Debug
//print_object ($GLOBALS['traverse_array']); //Debug
@@ -194,7 +195,9 @@
if (isset($que_info['#']['VERSION']['0']['#'])) { //Only if it's set, to apply DB default else.
$question->version = backup_todb($que_info['#']['VERSION']['0']['#']);
}
$question->hidden = backup_todb($que_info['#']['HIDDEN']['0']['#']);
if (isset($que_info['#']['HIDDEN']['0']['#'])) { //Only if it's set, to apply DB default else.
$question->hidden = backup_todb($que_info['#']['HIDDEN']['0']['#']);
}
//Although only a few backups can have questions with parent, we try to recode it
//if it contains something