diff --git a/Models/QAQuestion.php b/Models/QAQuestion.php index 363293b..f4fd956 100644 --- a/Models/QAQuestion.php +++ b/Models/QAQuestion.php @@ -59,6 +59,17 @@ class QAQuestion implements \JsonSerializable return $this->id; } + public function hasAccepted() : bool + { + foreach($this->answers as $answer) { + if($answer->isAccepted()) { + return true; + } + } + + return false; + } + public function getLanguage() : string { return $this->language; diff --git a/Theme/Backend/qa-dashboard.tpl.php b/Theme/Backend/qa-dashboard.tpl.php index 144b704..008c245 100644 --- a/Theme/Backend/qa-dashboard.tpl.php +++ b/Theme/Backend/qa-dashboard.tpl.php @@ -9,7 +9,7 @@ echo $this->getData('nav')->render(); ?>