From 84cef693d9520093d1be0cc86970ed118d418ac1 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 6 Mar 2020 18:08:39 +0100 Subject: [PATCH] wip #3468 @0:25 --- app/Models/Quiz.php | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/app/Models/Quiz.php b/app/Models/Quiz.php index fba0ab409..cec0cbb73 100644 --- a/app/Models/Quiz.php +++ b/app/Models/Quiz.php @@ -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' => '', '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', -- 2.39.5