]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5041 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 11 Feb 2022 17:32:15 +0000 (18:32 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 11 Feb 2022 17:32:15 +0000 (18:32 +0100)
.idea/workspace.xml
app/Models/ELearningMedia.php
app/Models/ELearningPackage.php
app/SubForms/ElearningPackageContent.php
resources/elearningpackage/index.html
resources/elearningpackage/js/app.js

index 16d303f8abab894e29bff2e4fb4047e3a8cd4dc5..0303fd33eed4152d475a696722b71bbb615c5045 100644 (file)
     <select />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="5d2ecd5e-a05a-4f96-a195-fa6372618165" name="Default Changelist" comment="wip #5041 @1">
+    <list default="true" id="5d2ecd5e-a05a-4f96-a195-fa6372618165" name="Default Changelist" comment="wip #5041 @1.5">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/Models/ELearningMedia.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ELearningMedia.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/app/Models/ELearningPackage.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ELearningPackage.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/app/SubForms/ElearningPackageContent.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/SubForms/ElearningPackageContent.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/resources/elearningpackage/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/resources/elearningpackage/index.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/resources/elearningpackage/js/app.js" beforeDir="false" afterPath="$PROJECT_DIR$/resources/elearningpackage/js/app.js" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1644394645639" duration="13635000" />
       <workItem from="1644425348765" duration="2270000" />
       <workItem from="1644508187200" duration="10853000" />
-      <workItem from="1644582031422" duration="5202000" />
-    </task>
-    <task id="LOCAL-00192" summary="wait #3753 @1">
-      <created>1636053838335</created>
-      <option name="number" value="00192" />
-      <option name="presentableId" value="LOCAL-00192" />
-      <option name="project" value="LOCAL" />
-      <updated>1636053838335</updated>
+      <workItem from="1644582031422" duration="6403000" />
     </task>
     <task id="LOCAL-00193" summary="wait #3753 @0.5">
       <created>1636097330320</created>
       <option name="project" value="LOCAL" />
       <updated>1644583408821</updated>
     </task>
-    <option name="localTasksCounter" value="241" />
+    <task id="LOCAL-00241" summary="wip #5041 @1.5">
+      <created>1644599546287</created>
+      <option name="number" value="00241" />
+      <option name="presentableId" value="LOCAL-00241" />
+      <option name="project" value="LOCAL" />
+      <updated>1644599546287</updated>
+    </task>
+    <option name="localTasksCounter" value="242" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     <MESSAGE value="wip #5045 @1.1" />
     <MESSAGE value="wait #5045 @0.5" />
     <MESSAGE value="wip #5041 @3" />
-    <MESSAGE value="wip #5041 @1.5" />
     <MESSAGE value="wip #5041" />
     <MESSAGE value="wip #5041 @1" />
-    <option name="LAST_COMMIT_MESSAGE" value="wip #5041 @1" />
+    <MESSAGE value="wip #5041 @1.5" />
+    <option name="LAST_COMMIT_MESSAGE" value="wip #5041 @1.5" />
   </component>
   <component name="XSLT-Support.FileAssociations.UIState">
     <expand />
index f0bc15b9620ccb9b7d7b27046a64005b74077d69..9ab1ed79bf12ddca472d9312ffac4c05227b2397 100644 (file)
@@ -85,6 +85,7 @@ class ELearningMedia extends ToolboxModel
         if (!$title) {
             $title = $spl->getBasename('.' . $spl->getExtension());
         }
+
         $vdir = new VirtualDirectory($dest);
         $vdir->file_put_contents('imsmanifest.xml', new Manifest($title, Manifest::SCORM_2004, $organization, $reference));
         $vdir->copyDirectory(resource_path('elearningmedia/dist/css'), 'css');
index 11fe38aa70177d56349c7b6e7ae921e3011f76bf..dff831fb9a4c108316f36c2b011505f9422b58d9 100644 (file)
@@ -174,7 +174,9 @@ class ELearningPackage extends ToolboxModel
             return null;
         }
         $file = $f->getPath();
-        return ELearningMedia::compileFromFile($file, $tmp, '', $organization, 'MEDIA_' . $media_file);
+        $title= ELearningMedia::compileFromFile($file, $tmp, '', $organization, 'MEDIA_' . $media_file);
+        $vdir->copyDirectory($tmp, $basePath);
+        return $title;
     }
 
     protected function _compileMediaFromElearningMedia($id, $vdir, $basePath)
index 620dee1bf0d66aac59e62058f4b2d3b9855623e8..a3db0b1a52ad04485f09a8ceb7b4fc872ee6473c 100644 (file)
@@ -36,10 +36,10 @@ class ElearningPackageContent extends SubForm
         $this->addField('fb_id', FluidbookID::class, __('Fluidbook'), ['when' => ['content_type' => 'FB']]);
 
         $this->addField('video_id', ElearningMediaVideoID::class, __('Vidéo'), ['when' => ['content_type' => ['AN', 'Ti5']]]);
-        $this->addField('video_file', Files::class, __('Charger une vidéo'), ['when' => ['content_type' => ['AN', 'Ti5'], 'video_id' => ''], ['acceptedFiles' => ['video/mp4']]]);
+        $this->addField('video_file', Files::class, __('Charger une vidéo'), ['when' => ['content_type' => ['AN', 'Ti5'], 'video_id' => ''], 'acceptedFiles' => ['video/mp4']]);
 
         $this->addField('audio_id', ElearningMediaAudioID::class, __('Audio'), ['when' => ['content_type' => 'PD']]);
-        $this->addField('audio_file', Files::class, __('Charger un audio'), ['when' => ['content_type' => 'PD', 'audio_id' => ''], ['acceptedFiles' => ['audio/mpeg']]]);
+        $this->addField('audio_file', Files::class, __('Charger un audio'), ['when' => ['content_type' => 'PD', 'audio_id' => ''], 'acceptedFiles' => ['audio/mpeg']]);
 
         $this->addField('quiz_id', QuizID::class, __('Quiz'), ['when' => ['content_type' => 'QZ']]);
 
index 937c4ec93883daf75dc72a43e7848d6b4b781e31..eaf6f1ef36ca555a50b8af7616a5bd56998f6a4b 100644 (file)
               d="M25.2,25.2c2.3-2.4,3.8-5.8,3.8-9.4c0-3.7-1.5-7-3.8-9.4 M23,21.8c1.5-1.5,2.4-3.7,2.4-6c0-2.3-0.9-4.5-2.4-6"
         />
     </symbol>
+    <symbol id="check-ok-green" viewBox="0 0 30 30">
+        <style type="text/css">
+            .st0 {
+                fill: #3E9945;
+            }
+        </style>
+        <path class="st0"
+              d="M14.6,1.9C7.4,1.9,1.5,7.8,1.5,15.1c0,7.2,5.9,13.1,13.1,13.1c7.2,0,13.1-5.9,13.1-13.1C27.8,7.8,21.9,1.9,14.6,1.9 M14.6,29.1c-7.7,0-14-6.3-14-14c0-7.7,6.3-14,14-14c7.7,0,14,6.3,14,14C28.6,22.8,22.3,29.1,14.6,29.1"/>
+        <polygon class="st0" points="12.2,20.6 6.9,15.4 7.5,14.8 12.2,19.4 21.7,9.8 22.3,10.4 "/>
+    </symbol>
     <symbol id="check-ok" viewBox="0 0 32 32">
         <g>
             <path d="M17,3.9C9.8,3.9,3.9,9.8,3.9,17S9.8,30.1,17,30.1S30.1,24.2,30.1,17S24.2,3.9,17,3.9 M17,31C9.3,31,3,24.7,3,17
index 9249eec442e7678ff1d6479c9abeaa5bfd37689c..4562eb12e9fc117678e54891fe56d8bf36b0ec46 100644 (file)
@@ -287,6 +287,7 @@ function setContents() {
     }
     var vcheck = getSpriteIcon('check-ok');
     var xcheck = getSpriteIcon('check-nok');
+    var gcheck = getSpriteIcon('check-ok-green');
     var types = {
         IN: 'Infographic PDF',
         AN: 'Animation',
@@ -328,7 +329,7 @@ function setContents() {
         $('tbody').append(tr);
 
         var mandatory = (v.mandatory ? vcheck : xcheck);
-        var validated = (s.completion_status === 'completed' ? vcheck : xcheck);
+        var validated = (s.completion_status === 'completed' ? gcheck : xcheck);
         var scoreCol = '<div class="scoreCont">' + (score < 0 ? '-' : score + ' %') + '</div>';
 
         tr.append('<td class="t">' + v.title + '</td>');