<select />
</component>
<component name="ChangeListManager">
- <list default="true" id="5d2ecd5e-a05a-4f96-a195-fa6372618165" name="Default Changelist" comment="wip #5041 @1.5">
+ <list default="true" id="5d2ecd5e-a05a-4f96-a195-fa6372618165" name="Default Changelist" comment="wip #5041 @0.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="6403000" />
- </task>
- <task id="LOCAL-00193" summary="wait #3753 @0.5">
- <created>1636097330320</created>
- <option name="number" value="00193" />
- <option name="presentableId" value="LOCAL-00193" />
- <option name="project" value="LOCAL" />
- <updated>1636097330320</updated>
+ <workItem from="1644582031422" duration="8009000" />
</task>
<task id="LOCAL-00194" summary="wait #3753 @0.5">
<created>1636109781730</created>
<option name="project" value="LOCAL" />
<updated>1644599546287</updated>
</task>
- <option name="localTasksCounter" value="242" />
+ <task id="LOCAL-00242" summary="wip #5041 @0.5">
+ <created>1644600735992</created>
+ <option name="number" value="00242" />
+ <option name="presentableId" value="LOCAL-00242" />
+ <option name="project" value="LOCAL" />
+ <updated>1644600735992</updated>
+ </task>
+ <option name="localTasksCounter" value="243" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_NEW_TODO" value="false" />
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
- <MESSAGE value="wip #4895 @1" />
<MESSAGE value="wait #4891 @2" />
<MESSAGE value="wait #4928 @2" />
<MESSAGE value="wait #4928 @0.25" />
<MESSAGE value="wip #5041" />
<MESSAGE value="wip #5041 @1" />
<MESSAGE value="wip #5041 @1.5" />
- <option name="LAST_COMMIT_MESSAGE" value="wip #5041 @1.5" />
+ <MESSAGE value="wip #5041 @0.5" />
+ <option name="LAST_COMMIT_MESSAGE" value="wip #5041 @0.5" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
$vdir->copyDirectory(resource_path('elearningpackage/dist/css'), 'css');
$vdir->copyDirectory(resource_path('elearningpackage/dist/js'), 'js');
$vdir->copyDirectory(resource_path('elearningpackage/dist/fonts'), 'fonts');
- $vdir->copyDirectory(resource_path('pdfjs'), 'pdfjs');
+ $vdir->copyDirectory(resource_path('pdfjs'), 'js/libs/pdfjs');
$vdir->copy(resource_path('elearningpackage/index.html'), 'index.html');
$vdir->sync(true);
}
{
$basePath = 'packages/' . $id . '/';
- $res = ['id' => $id, 'title' => trim($c['content_title']), 'type' => $c['content_type'], 'scorm' => true, 'mandatory' => $c['mandatory'], 'path' => $basePath . 'index.html'];
+ $res = ['id' => $id, 'title' => trim($c['content_title']), 'type' => $c['content_type'], 'scorm' => !$c['complete_when_opened'], 'mandatory' => $c['mandatory'], 'path' => $basePath . 'index.html'];
if ($res['type'] === 'QZ' && $res['mandatory']) {
$res['lock'] = range(0, $id - 1);
}
break;
case 'IN':
$moduleTitle = $this->_compilePDF($c['infographic_file'], $vdir, $basePath);
+ $res['path'] = $basePath . '/infographic.pdf';
+ $res['scorm'] = false;
break;
case 'FC':
default:
return null;
}
$file = $f->getPath();
- $title= ELearningMedia::compileFromFile($file, $tmp, '', $organization, 'MEDIA_' . $media_file);
+ $title = ELearningMedia::compileFromFile($file, $tmp, '', $organization, 'MEDIA_' . $media_file);
$vdir->copyDirectory($tmp, $basePath);
return $title;
}
$tmp = Files::tmpdir();
$vdir->addTemp($tmp);
- $f=$this->getMediaByCollection($collection)->first();
- if(null===$f){
+ $f = $this->getMediaByCollection($collection)->first();
+ if (null === $f) {
return null;
}
$spf = new \SplFileInfo($f->getPath());
$this->addField('infographic_file', Files::class, __('Charger une infographie'), ['when' => ['content_type' => ['IN']], 'acceptedFiles' => ['application/pdf']]);
- $this->addField('content_file', Files::class, __('Charger un contenu'), ['when' => ['content_type' => ['FC']], 'acceptedFiles' => ['application/zip']]);
+ $this->addField('content_file', Files::class, __('Charger un contenu'), ['when' => ['content_type' => ['FC']], 'acceptedFiles' => ['.zip']]);
$this->addField('mandatory', Checkbox::class, __('Obligatoire'), ['default' => true]);
+ $this->addField('complete_when_opened', Checkbox::class, __('Marquer comme terminé dès l\'ouverture'), ['hint' => __('Pour les contenus non-SCORM ou les contenus SCORM qui ne marquent pas les contenu comme terminé')]);
$this->addField('content_title', Text::class, __('Titre'), ['hint' => __('Laisser vide pour utiliser le titre par défaut')]);
}
}