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;
{
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 <sup>3rd ed.</sup>'];
+ return $map[$this->scorm_version];
+ }
}
0 => '*.xml',
1 => '*.xlsx',
],
- 'destination'=>'commerce',
+ 'destination' => 'commerce',
'fake' => true,
'store_in' => 'settings',
'translatable' => false,
0 => '*.xml',
0 => '*.xlsx',
],
- 'destination'=>'commerce',
+ 'destination' => 'commerce',
'fake' => true,
'store_in' => 'settings',
'translatable' => false,
$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,
1 => '*.jpeg',
2 => '*.png',
],
- 'destination'=>'commerce',
+ 'destination' => 'commerce',
'fake' => true,
'store_in' => 'settings',
'translatable' => false,
1 => '*.jpeg',
2 => '*.png',
],
- 'destination'=>'commerce',
+ 'destination' => 'commerce',
'fake' => true,
'store_in' => 'settings',
'translatable' => false,
'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!"}',
'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}',