From 4da81e73429dc74cced07afe4979994d1594644a Mon Sep 17 00:00:00 2001
From: tjhunt <tjhunt>
Date: Mon, 17 Sep 2007 14:39:52 +0000
Subject: [PATCH] MDL-11310 - Multichoice edititing form should have space for
 5 answers by default. Merged from MOODLE_18_STABLE.

---
 question/type/multichoice/edit_multichoice_form.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/question/type/multichoice/edit_multichoice_form.php b/question/type/multichoice/edit_multichoice_form.php
index 2e0fc3b1e5..296cb4ce3c 100644
--- a/question/type/multichoice/edit_multichoice_form.php
+++ b/question/type/multichoice/edit_multichoice_form.php
@@ -55,8 +55,7 @@ class question_edit_multichoice_form extends question_edit_form {
             $countanswers = 0;
         }
         if ($this->question->formoptions->repeatelements){
-            $repeatsatstart = (QUESTION_NUMANS_START > ($countanswers + QUESTION_NUMANS_ADD))?
-                                QUESTION_NUMANS_START : ($countanswers + QUESTION_NUMANS_ADD);
+            $repeatsatstart = max(5, QUESTION_NUMANS_START, $countanswers + QUESTION_NUMANS_ADD);
         } else {
             $repeatsatstart = $countanswers;
         }
-- 
2.39.5