]> _ Git - fluidbook-toolbox.git/commitdiff
fix #3680 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 3 Jun 2020 09:19:03 +0000 (11:19 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 3 Jun 2020 09:19:03 +0000 (11:19 +0200)
app/Http/Controllers/Admin/Operations/ImportOperation.php
app/Models/Quiz.php
config/media-library.php

index e5d772997d7f114f5c31cea0d0f2d938d089049a..8ac5c263dfe7058225c7bb583242b22e8db6452f 100644 (file)
@@ -32,7 +32,7 @@ trait ImportOperation
         }
 
         $default = ['title' => '',
-            'translation' => 'en',
+            'translation' => '1',
             'scorm' => '1',
             'review' => '1',
             'threshold' => '0',
index 44f5c7c79028c3ba38e1b6d055cf0fc9af118c53..948fe13465c49bec8cff5ba52ca3d12ccc3f1e8b 100644 (file)
@@ -204,7 +204,11 @@ class Quiz extends CubistMagicAbstractModel
         $xml->addChild('review', $this->getAttribute('review') ? '1' : '0');
         $xt = $xml->addChild('translations');
         /** @var QuizTranslation $translation */
-        $translation = QuizTranslation::find($this->getAttribute('translation'));
+        $tid = $this->getAttribute('translation') ?? 1;
+        if ($tid === 'en') {
+            $tid = 1;
+        }
+        $translation = QuizTranslation::find($tid);
         foreach (QuizTranslation::getTexts() as $text => $default) {
             $xt->addChild($text, $translation->getAttribute($text));
         }
index 4d8dbb4837ba8e86ccd571eb89550c5d24e5789f..40748bc11ea320893e936e4a63aa183d01b5d8b7 100644 (file)
@@ -12,7 +12,7 @@ return [
      * The maximum file size of an item in bytes.
      * Adding a larger file will result in an exception.
      */
-    'max_file_size' => 1024 * 1024 * 10,
+    'max_file_size' => 1024 * 1024 * 1000,
 
     /*
      * This queue will be used to generate derived and responsive images.