From: Vincent Vanwaelscappel Date: Mon, 13 Jun 2022 14:08:56 +0000 (+0200) Subject: wait #4952 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f81d0f151804f1b5f7009f9690444817b623074c;p=fluidbook-toolbox.git wait #4952 @0.75 --- diff --git a/app/Models/FluidbookPublication.php b/app/Models/FluidbookPublication.php index 1670dada4..dfdd529a7 100644 --- a/app/Models/FluidbookPublication.php +++ b/app/Models/FluidbookPublication.php @@ -8,13 +8,11 @@ use App\Fields\FluidbookTitle; use App\Fields\User; use App\Models\Base\ToolboxModel; use App\Models\Traits\PublicationSettings; -use App\SubForms\FluidbookTranslationOverwrite; use Cubist\Backpack\Magic\Fields\Datetime; use Cubist\Backpack\Magic\Fields\FormBigSection; use Cubist\Backpack\Magic\Fields\FormSuperSection; use Cubist\Backpack\Magic\Fields\Hidden; use Cubist\Backpack\Magic\Fields\Integer; -use Cubist\Backpack\Magic\Fields\KeyValueBunchOfFieldsMultiple; use Cubist\Backpack\Magic\Fields\SelectFromArray; use Cubist\Backpack\Magic\Fields\Textarea; @@ -143,4 +141,13 @@ class FluidbookPublication extends ToolboxModel { return '/data1/extranet/www/fluidbook/books/working/' . $this->id; } + + public function getSCORMVersion() + { + if (!$this->scorm_enable) { + return '-'; + } + $map = ['1.2' => '1.2', '2004' => '2004', '2004.3' => '2004 3rd ed.']; + return $map[$this->scorm_version]; + } } diff --git a/app/Models/Traits/PublicationSettings.php b/app/Models/Traits/PublicationSettings.php index 27ad4f8d3..c81245b60 100644 --- a/app/Models/Traits/PublicationSettings.php +++ b/app/Models/Traits/PublicationSettings.php @@ -2131,7 +2131,7 @@ trait PublicationSettings 0 => '*.xml', 1 => '*.xlsx', ], - 'destination'=>'commerce', + 'destination' => 'commerce', 'fake' => true, 'store_in' => 'settings', 'translatable' => false, @@ -2619,7 +2619,7 @@ trait PublicationSettings 0 => '*.xml', 0 => '*.xlsx', ], - 'destination'=>'commerce', + 'destination' => 'commerce', 'fake' => true, 'store_in' => 'settings', 'translatable' => false, @@ -2627,7 +2627,7 @@ trait PublicationSettings $this->addField('basketImages', FilesOrURL::class, $this->__('Images des produits'), [ 'v2' => '{"type":"freefile","default":"","editable":true,"label":"\\u00a7!\\u00a7Images des produits!\\u00a7!","grade":3,"multiple":true,"dir":"commerce"}', 'default' => '', - 'destination'=>'commerce', + 'destination' => 'commerce', 'fake' => true, 'store_in' => 'settings', 'translatable' => false, @@ -2641,7 +2641,7 @@ trait PublicationSettings 1 => '*.jpeg', 2 => '*.png', ], - 'destination'=>'commerce', + 'destination' => 'commerce', 'fake' => true, 'store_in' => 'settings', 'translatable' => false, @@ -2654,7 +2654,7 @@ trait PublicationSettings 1 => '*.jpeg', 2 => '*.png', ], - 'destination'=>'commerce', + 'destination' => 'commerce', 'fake' => true, 'store_in' => 'settings', 'translatable' => false, @@ -3050,7 +3050,7 @@ L,index', 'translatable' => false, ]); - $this->addField('section_elearning',FormSuperSection::class,__('E-Learning')); + $this->addField('section_elearning', FormSuperSection::class, __('E-Learning')); $this->addField('section_gamify', FormSection::class, $this->__('Gamification')); $this->addField('gamify_coins_pages', Textarea::class, $this->__('Attribuer des coins lors de la visite des pages'), [ 'v2' => '{"type":"textarea","default":"","editable":true,"label":"\\u00a7!\\u00a7Attribuer des coins lors de la visite des pages!\\u00a7!"}', @@ -3078,6 +3078,11 @@ L,index', 'fake' => true, 'store_in' => 'settings', 'translatable' => false, + 'column' => true, + 'column_label' => 'SCORM', + 'column_type' => 'model_function', + 'column_view_namespace' => 'crud::columns', + 'column_function_name' => 'getSCORMVersion', ]); $this->addField('scorm_id', LongText::class, $this->__('Identifiant SCORM'), [ 'v2' => '{"type":"text","default":"","editable":true,"label":"\\u00a7!\\u00a7Identifiant SCORM!\\u00a7!","grade":5}',