Commit 212c14c8 authored by Chenu Denis's avatar Chenu Denis
Browse files

[fix] Class added in 5.X version without setting

parent 0bde1afd
......@@ -8,7 +8,7 @@
<author>Denis Chenu</author>
<authorUrl>https://extensions.sondages.pro/</authorUrl>
<supportUrl>https://www.sondages.pro/contact</supportUrl>
<version>2.2.0</version>
<version>2.2.1</version>
<license>GNU General Public License v3.0</license>
<description><![CDATA[update radio question type to star rating system]]></description>
</metadata>
......@@ -18,4 +18,5 @@
<version>4</version>
<version>5</version>
</compatibility>
<updaters disabled="disabled"></updaters>
</config>
......@@ -7,7 +7,7 @@
* @copyright 2016 Advantages <https://advantages.fr/>
* @copyright 2017 Réseaux en scène <https://www.reseauenscene.fr/>
* @license AGPL v3
* @version 2.2.0
* @version 2.2.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
......@@ -51,7 +51,7 @@ class radioToStarRating extends PluginBase {
if($oEvent->get('type')=="F") {
$oAttributeStarRating=QuestionAttribute::model()->find('qid=:qid and attribute=:attribute',array(':qid'=>$this->getEvent()->get('qid'),':attribute'=>'radioToStarRating'));
$oAttributeUseDropDown=QuestionAttribute::model()->find('qid=:qid and attribute=:attribute',array(':qid'=>$this->getEvent()->get('qid'),':attribute'=>'use_dropdown'));
if($oAttributeStarRating && $oAttributeUseDropDown) {
if($oAttributeStarRating && $oAttributeStarRating->value && $oAttributeUseDropDown && $oAttributeUseDropDown->value) {
$this->registerNeededAssets();
/* Must find if we must show no answer or not */
$oQuestion=Question::model()->findByPk(array("qid"=>$oEvent->get('qid'),'language'=>App()->getLanguage()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment