]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for Bug 6119 - gives error when choice full, and user submits a choice they have...
authordanmarsden <danmarsden>
Sun, 23 Jul 2006 22:14:31 +0000 (22:14 +0000)
committerdanmarsden <danmarsden>
Sun, 23 Jul 2006 22:14:31 +0000 (22:14 +0000)
mod/choice/lib.php

index 9264e0904904bb926b47ee4a7c7b604f8600d10e..a8407a7a92e861ec459fb293ad57d7db2016e249 100644 (file)
@@ -292,7 +292,9 @@ $current = get_record('choice_answers', 'choiceid', $choice->id, 'userid', $user
                     add_to_log($courseid, "choice", "choose", "view.php?id=$cm->id", $choice->id, $cm->id);
                 }
             } else {
-                error("this choice is full!");
+                if (!($current->optionid==$formanswer)) { //check to see if current choice already selected - if not display error
+                    error("this choice is full!");    
+                }
             }
 }