]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6551 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Dec 2023 11:17:32 +0000 (12:17 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Dec 2023 11:17:32 +0000 (12:17 +0100)
app/Elearning/QuizCompiler.php

index 8875ba188d44bce4c588529c70d939ce1189c12a..0f52ad89a835b7a43a357c64be7db58a3cb8a632 100644 (file)
@@ -13,6 +13,7 @@ use App\Jobs\Base;
 use App\Models\Quiz;
 use App\Models\QuizTheme;
 use App\Models\Signature;
+use App\Models\Traits\QuizBranches;
 use Cubist\Scorm\Manifest;
 use Cubist\Scorm\Version;
 use Cubist\Util\CommandLine\Npx;
@@ -30,6 +31,8 @@ class QuizCompiler extends Base
     use L10N;
     use Credits;
 
+    use QuizBranches;
+
     /**
      * @var Quiz
      */
@@ -289,7 +292,11 @@ class QuizCompiler extends Base
             default:
                 list($branch, $dir) = explode('|', $this->quiz->dev_version);
         }
-        return resource_path('quiz/player/' . ($dir === 'local' ? 'local' : 'branches') . '/' . $branch);
+        $d = ($dir === 'local' ? 'local' : 'branches');
+        if ($d === 'branches') {
+            $this->updateAllBranches();
+        }
+        return resource_path('quiz/player/' . $d . '/' . $branch);
     }