<?php
-class Company extends \Cubedesigners\UserDatabase\Company{
- protected $_syncDbSchema=false;
+
+namespace App\Models;
+class Company extends \Cubedesigners\UserDatabase\Company
+{
+ protected $_syncDbSchema = false;
}
'hint' => 'Over this score (out of 100), the quiz is passed. Set 0 to disable',
'tab' => 'Settings']);
+ $this->addField(['name'=>'instantReview',
+ 'label'=>'Enable instant review',
+ 'hint'=>'Let the user see if he had a correct or wrong answer, just after his answer',
+ 'type'=>'Checkbox',
+ 'tab'=>'Settings']);
+
$this->addField(['name' => 'review',
'label' => 'Enable answer review',
'hint' => 'Let the user review his answers and the correct ones at the end of the quiz',
$this->addField(['name' => 'question',
'type' => 'Text',
- 'label' => 'Question']);
+ 'label' => 'Question label']);
+
+ $this->addField(['name' => 'type',
+ 'type' => 'SelectFromArray',
+ 'label' => 'Type',
+ 'options' => ['multiple' => 'Multiple choice question',
+ 'text' => 'Text',
+ 'textarea' => 'Long text',
+ 'email' => 'E-mail']]);
$this->addField(['name' => 'explaination',
'type' => 'Textarea',
$this->addField(['name' => 'multiple',
'type' => 'Checkbox',
- 'label' => 'Multiple answers']);
+ 'label' => 'Multiple answers',
+ 'when' => ['type' => 'multiple']
+ ]);
$this->addField([
'name' => 'answers',
'bunch' => 'App\SubForms\Answer',
'add_label' => 'New answer',
'label' => 'Answers',
+ 'when' => ['type' => 'multiple']
]);
-
-
-// $this->addField([
-// 'name' => 'questions',
-// 'type' => 'BunchOfFieldsMultiple',
-// 'bunch' => 'App\SubForms\Answer',
-// 'label' => 'Questions',
-// 'add_label' => 'Add question',
-// 'tab' => 'Questions / Answers',
-// ]);
-
}
}
"league/csv": "^9.6"
},
"require-dev": {
- "facade/ignition": "^2.0",
+ "facade/ignition": "^2.3",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.4",
"nunomaduro/collision": "^4.2",
"phpunit/phpunit": "^8.5",
- "barryvdh/laravel-ide-helper": "^2.7",
+ "barryvdh/laravel-ide-helper": "^2.8",
"filp/whoops": "^2.7",
"laravel/tinker": "^2.4"
},
<!-- This file is used to store sidebar items, starting with Backpack\Base 0.9.0 -->
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('dashboard') }}"><i
- class="nav-icon la"><img src="/images/icons/icon-fluidbook.svg" /></i>{{ trans('backpack::base.dashboard') }}</a></li>
+ class="nav-icon la"><img src="/images/icons/icon-fluidbook.svg"/></i>{{ trans('backpack::base.dashboard') }}
+ </a></li>
@canany(['toolbox:quiz','toolbox:quiz:translate'])
<li class='nav-item nav-dropdown open'><a class='nav-link nav-dropdown-toggle' href='#'><i
@endcan
</ul>
</li>
+@endcanany
+
+@can('fluidbook:admin')
+<li class='nav-item nav-dropdown open'><a class='nav-link nav-dropdown-toggle' href='#'><i
+ class='nav-icon la la-tools'></i>Fluidbook</a>
+ <ul class='nav-dropdown-items'>
+ <li class="nav-item"><a class="nav-link" href="{{ backpack_url('signatures') }}"><i
+ class="la la-signature nav-icon"></i> Signatures</a></li>
+ </ul>
+</li>
@endcan
+
@can('toolbox:maintenance')
<li class='nav-item nav-dropdown'><a class='nav-link nav-dropdown-toggle' href='#'><i
class='nav-icon la la-cogs'></i>Maintenance</a>