Commit 9a6a9a7d authored by Chenu Denis's avatar Chenu Denis

[fix] Get the default even if settings are not updated

parent 0c130bcd
......@@ -5,7 +5,7 @@
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2016-2018 Denis Chenu <http://www.sondages.pro>
* @license AGPL v3
* @version 2.4.1
* @version 2.4.2
*
* 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
......@@ -74,9 +74,9 @@ class addScriptToQuestion extends PluginBase
$script=LimeExpressionManager::ProcessString($aAttributes['javascript'], $oEvent->get('qid'), $aReplacement, false, 2, 0, false, false, true);
}
if($this->get('scriptPositionAvailable')) {
$scriptPosition = isset($aAttributes['scriptPosition']) ? $aAttributes['scriptPosition'] : $this->get('scriptPositionDefault',null,null,$this->setting['scriptPositionDefault']['default']);
$scriptPosition = isset($aAttributes['scriptPosition']) ? $aAttributes['scriptPosition'] : $this->get('scriptPositionDefault',null,null,$this->settings['scriptPositionDefault']['default']);
} else {
$scriptPosition = $this->get('scriptPositionDefault',null,null,$this->setting['scriptPositionDefault']['default']);
$scriptPosition = $this->get('scriptPositionDefault',null,null,$this->settings['scriptPositionDefault']['default']);
}
if($scriptPosition == 'afteranswer') {
$script = "\n\n<script type=\"text/javascript\">\n"
......
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