From: Vincent Vanwaelscappel Date: Wed, 24 Mar 2021 16:51:08 +0000 (+0100) Subject: wait #4370 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b38090cd03cd153453d317da002c962d116c47d2;p=fluidbook-toolbox.git wait #4370 @1 --- diff --git a/app/Models/Quiz.php b/app/Models/Quiz.php index 18c4e3171..fa17ca03b 100644 --- a/app/Models/Quiz.php +++ b/app/Models/Quiz.php @@ -311,6 +311,9 @@ class Quiz extends CubistMagicAbstractModel // Fix boolean $booleans = ['multiple' => false, 'required' => true, 'count_for_score' => true]; foreach ($d['questions'] as $qn => $q) { + if (!isset($q['type']) || null === $q['type'] || !$q['type']) { + $d['questions'][$qn]['type'] = 'multiple'; + } foreach ($booleans as $b => $default) { if (!isset($d['questions'][$qn][$b])) { $d['questions'][$qn][$b] = $default; diff --git a/app/SubForms/Question.php b/app/SubForms/Question.php index 2f3ea0e81..5dce61bac 100644 --- a/app/SubForms/Question.php +++ b/app/SubForms/Question.php @@ -35,8 +35,9 @@ class Question extends SubForm 'text' => __('Texte'), 'textarea' => __('Texte long'), 'email' => __('E-mail'), - 'country'=>__('Pays'), - ]]); + 'country' => __('Pays'), + ] + ]); $this->addField(['name' => 'count_for_score', 'label' => __('Comptabiliser dans le score'),