aboutsummaryrefslogtreecommitdiff
path: root/lib/models/LikertScale.php
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /lib/models/LikertScale.php
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/models/LikertScale.php')
-rw-r--r--lib/models/LikertScale.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/models/LikertScale.php b/lib/models/LikertScale.php
index 8ac7823..3a055f3 100644
--- a/lib/models/LikertScale.php
+++ b/lib/models/LikertScale.php
@@ -1,6 +1,4 @@
<?php
-require_once 'lib/classes/QuestionType.interface.php';
-
/**
* @license GPL2 or any later version
*
@@ -53,7 +51,7 @@ class LikertScale extends QuestionnaireQuestion implements QuestionType
public function getDisplayTemplate()
{
- $factory = new Flexi_TemplateFactory(realpath(__DIR__.'/../../app/views'));
+ $factory = new Flexi\Factory(realpath(__DIR__.'/../../app/views'));
$template = $factory->open('questionnaire/question_types/likert/likert_answer');
$template->set_attribute('vote', $this);
return $template;
@@ -73,7 +71,7 @@ class LikertScale extends QuestionnaireQuestion implements QuestionType
public function getUserIdsOfFilteredAnswer($answer_option)
{
$user_ids = [];
- list($statement_key, $options_key) = explode('_', $answer_option);
+ [$statement_key, $options_key] = explode('_', $answer_option);
foreach ($this->answers as $answer) {
$answerData = $answer['answerdata']->getArrayCopy();
if ($answerData['answers'][$statement_key] == $options_key) {
@@ -93,7 +91,7 @@ class LikertScale extends QuestionnaireQuestion implements QuestionType
}
}
}
- $factory = new Flexi_TemplateFactory(realpath(__DIR__.'/../../app/views'));
+ $factory = new Flexi\Factory(realpath(__DIR__.'/../../app/views'));
$template = $factory->open('questionnaire/question_types/likert/likert_evaluation');
$template->set_attribute('vote', $this);
$template->set_attribute('answers', $answers);