]> _ Git - fluidbook-toolbox.git/commitdiff
wip #3468 @0:25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 6 Mar 2020 17:08:39 +0000 (18:08 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 6 Mar 2020 17:08:39 +0000 (18:08 +0100)
app/Models/Quiz.php

index fba0ab40964e997438b394ebb075c6805bdca408..cec0cbb73278920a5472ac46738abaf571be9eff 100644 (file)
@@ -46,6 +46,44 @@ class Quiz extends CubistMagicAbstractModel
     {
         parent::setFields();
 
+        $this->addField(['name' => 'client',
+            'label' => 'Client name',
+            'type' => 'Text',
+            'column' => true,
+            'column_label' => 'Client',
+            'tab' => 'Project']);
+
+        $this->addField(['name' => 'project',
+            'label' => 'Project name',
+            'type' => 'Text',
+            'column' => true,
+            'column_label' => 'Project',
+            'tab' => 'Project']);
+        
+        $this->addField(['name' => 'created_at',
+            'label' => 'Created at',
+            'type' => 'Datetime',
+            'column' => true,
+            'column_type' => 'date',
+            'column_format' => null,
+            'tab' => 'Project']);
+
+        $this->addField(['name' => 'updated_at',
+            'label' => 'Updated at',
+            'type' => 'Hidden',
+            'column' => true,
+            'column_type' => 'date',
+            'column_format' => null,
+            'tab' => 'Project']);
+
+        $this->addField(['name' => 'owner',
+            'label' => 'Owner',
+            'type' => 'User',
+            'column' => true,
+            'can' => 'viewany',
+            'tab' => 'Project']);
+
+
         $this->addField(['name' => 'title',
             'label' => 'Quiz title',
             'type' => 'Text',
@@ -58,6 +96,7 @@ class Quiz extends CubistMagicAbstractModel
             'optionsmodel' => QuizTranslation::class,
             'attribute' => 'locale',
             'column' => true,
+            'column_label' => '<i class="fa fa-language"></i>',
             'tab' => 'Contents']);
 
         foreach (self::$_messages as $name => $label) {
@@ -77,12 +116,6 @@ class Quiz extends CubistMagicAbstractModel
             'tab' => 'Questions / Answers',
         ]);
 
-        $this->addField(['name' => 'owner',
-            'label' => 'Owner',
-            'type' => 'User',
-            'column' => true,
-            'can' => 'viewany',
-            'tab' => 'Settings']);
 
         $this->addField(['name' => 'scorm',
             'label' => 'SCORM enabled',