]> git.mjollnir.org Git - moodle.git/commitdiff
fix for error preventing adding of more choices in chat upate form
authorjamiesensei <jamiesensei>
Tue, 5 Dec 2006 13:32:32 +0000 (13:32 +0000)
committerjamiesensei <jamiesensei>
Tue, 5 Dec 2006 13:32:32 +0000 (13:32 +0000)
mod/choice/lib.php

index 65164e3c56bd40d95d032f762957d1a3771c089a..5658d87a8cfc55453ad37324eb7c5e45a4a4d0d2 100644 (file)
@@ -104,7 +104,7 @@ function choice_update_instance($choice) {
             $option->maxanswers = $choice->limit[$key];
         }
         $option->timemodified = time();
-        if (isset($choice->optionid[$key])){//existing choice record
+        if (isset($choice->optionid[$key]) && !empty($choice->optionid[$key])){//existing choice record
             $option->id=$choice->optionid[$key];
             if (isset($value) && $value <> '') {
                 update_record("choice_options", $option);