Questionnaire
Questionnaire package
What does it do
This package is used for creating Questionnaire for EscolaLms.
Installing
composer require escolalms/questionnaire
php artisan migrate
php artisan db:seed --class="EscolaLms\Questionnaire\Database\Seeders\QuestionnairePermissionsSeeder"
Endpoints
All the endpoints are defined in
Tests
Run ./vendor/bin/phpunit
to run tests. See tests folder as it's quite good staring point as documentation appendix.
Events
This package does not dispatch any events.
Listeners
This package does not listen for any events
How to use this on frontend.
Admin panel
Left menu
List of questionnaire
Creating/editing questionnaire
Creating/editing question
Assign questionnaire to Course
List of Answers
Report
Front Application
...
Permissions
Permissions are defined in seeder
Database relation
Questionnaires
general Questionnaire (Title) is related to Questionnaire_modelsQuestionnaire_models
Questionnaire model belong to model type and model idQuestionnaire_model_types
Model Type (Curse, Webinar etc.)Questions
Question belong to QuestionnaireQuestion_answers
Question answer is related to Question and Questionnaire_models
Questionnaires 1 -> n Questionnaire_models
Questionnaires 1 -> n Questions
Questionnaire_models 1 -> n Questionnaire_model_types
Question_answers 1 -> n Questions
Question_answers 1 -> n Questionnaire_models
To add new model type you need to insert new record to Questionnaire_model_types
title -> Title of model (example - 'Course')
model_class => Model class name (example 'EscolaLms\Courses\Models\Course')