checking that there remain $oldwrappedids before deleting them lines 87-..

add         if(is_array($oldwrappedids) && count($oldwrappedids)){
This commit is contained in:
pichetp 2007-10-06 21:10:13 +00:00
parent 2fa9af0d78
commit 0227d32dff

View file

@ -80,8 +80,10 @@ class embedded_cloze_qtype extends default_questiontype {
}
// Delete redundant wrapped questions
if(is_array($oldwrappedids) && count($oldwrappedids)){
$oldwrappedids = implode(',', $oldwrappedids);
delete_records_select('question', "id IN ($oldwrappedids)");
}
if (!empty($sequence)) {
$multianswer = new stdClass;