Navigation Menu

Skip to content

Commit

Permalink
Dev Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jan 14, 2018
2 parents 1244d57 + 5ae16ed commit 9314b97
Show file tree
Hide file tree
Showing 17 changed files with 210 additions and 170 deletions.
1 change: 1 addition & 0 deletions application/controllers/admin/questions.php
Expand Up @@ -489,6 +489,7 @@ public function _editansweroptions($surveyid, $gid, $qid)
$oAnswer->code = 'A1';
$oAnswer->sortorder = 0;
$oAnswer->scale_id = $i;
$oAnswer->assessment_value = 0;
$oAnswer->save();

$oAnserL10n = new AnswerL10n();
Expand Down
12 changes: 11 additions & 1 deletion application/helpers/update/updatedb_helper.php
Expand Up @@ -1048,6 +1048,16 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false)
$oTransaction->commit();
}

/**
* Column assessment_value not null but default to 0.
*/
if ($iOldDBVersion < 343) {
$oTransaction = $oDB->beginTransaction();
alterColumn('{{answers}}', 'assessment_value', 'integer', false, '0');
$oDB->createCommand()->update('{{settings_global}}', array('stg_value'=>343), "stg_name='DBVersion'");
$oTransaction->commit();
}

} catch (Exception $e) {
Yii::app()->setConfig('Updating', false);
$oTransaction->rollback();
Expand Down Expand Up @@ -2648,7 +2658,7 @@ function reCreateSurveyMenuTable310(CDbConnection $oDB)
"user_id" => "integer DEFAULT NULL",
"ordering" => "integer DEFAULT '0'",
"level" => "integer DEFAULT '0'",
"title" => "string(192) NOT NULL DEFAULT ''",
"title" => "string(168) NOT NULL DEFAULT ''",
"position" => "string(192) NOT NULL DEFAULT 'side'",
"description" => "text ",
"changed_at" => "datetime",
Expand Down
7 changes: 4 additions & 3 deletions application/models/Template.php
Expand Up @@ -167,8 +167,9 @@ public static function templateNameFilter($sTemplateName)
}

/* If we're here, then the default survey theme is not installed and must be changed */
$aTemplateList = self::getTemplateList();
$sTemplateName = key($aTemplateList);
$aTemplateList = self::model()->search()->getData();
$sTemplateName = $aTemplateList[0]->name;

if (!empty($sTemplateName)) {
setGlobalSetting('defaulttheme', $sTemplateName);
$sDefaultTemplate = getGlobalSetting('defaulttheme');
Expand Down Expand Up @@ -460,7 +461,7 @@ public static function getInstance($sTemplateName = null, $iSurveyId = null, $iS
public static function getStandardTemplateList()
{

$standardTemplates = array('vanilla', 'material', 'no_bootstrap', 'bootswatch', 'fruity', 'embedded');
$standardTemplates = array('vanilla', 'bootswatch', 'fruity');
return $standardTemplates;
}

Expand Down
1 change: 1 addition & 0 deletions application/models/TemplateConfiguration.php
Expand Up @@ -714,6 +714,7 @@ protected function changeMotherConfiguration($sType, $aSettings)
$key = array_search($sFileName, $aSettings);
//Yii::app()->clientScript->removeFileFromPackage($this->sPackageName, $sType, $sFileName);
unset($aSettings[$key]);
Yii::app()->clientScript->addFileToPackage($this->oMotherTemplate->sPackageName, $sType, $sFileName);
/* Old way todo
$oTemplate = $this->getTemplateForFile($sFileName, $this);
if (!Yii::app()->clientScript->IsFileInPackage($oTemplate->sPackageName, $sType, $sFileName)) {
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/admin/answers.js
Expand Up @@ -414,7 +414,7 @@ function lsbrowser(e)

$.getJSON(lspickurl,{sid:surveyid, match:1},function(json){
var x=0;
$("#labelsets").removeOption(/.*/);
// $("#labelsets").removeOption(/.*/);
for (x in json)
{
$('#labelsets').addOption(json[x][0],json[x][1]);
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/admin/subquestions.js
Expand Up @@ -500,7 +500,7 @@ function lsbrowser(e)
surveyid=$('input[name=sid]').val();
$.getJSON(lspickurl,{sid:surveyid, match:1},function(json){
var x=0;
$("#labelsets").removeOption(/.*/);
// $("#labelsets").removeOption(/.*/);
for (x in json)
{
$('#labelsets').addOption(json[x][0],json[x][1]);
Expand Down
24 changes: 24 additions & 0 deletions docs/release_notes.txt
Expand Up @@ -35,6 +35,30 @@ Thank you to everyone who helped with this new release!
CHANGE LOG
------------------------------------------------------

Changes from 3.0.2 (build 180110) to 3.0.3 (build 180112) Jan 12, 2018
-Fixed a small typo (gekkedev)
-Fixed issue #12223: Exporting database does not name columns for attributes (Matthew)
-Fixed issue #13134: Some Expression Manager vars not rendered (LouisGac)
-Fixed issue #13157: Exporting results with active timings results in an SQL error (Olle Haerstedt)
-Fixed issue #13159: Cannot access logic file (Olle Haerstedt)
-Fixed issue #13163: Can't add answer option to Single Choice Question (Olle Haerstedt)
-Fixed issue #13166: Survey theme editor - Animate checkboxes (fruity only) (markusfluer)
-Fixed issue: Labelsets not working correctly (markusfluer)
-Fixed issue: Question navigator not working (Carsten Schmitz)
-Fixed issue: labelsets not working on firefox (markusfluer)
-Fixed issue: links in sidemenu to questions doen't work (Markus Flür)
-Fixed issue: theme.js not loaded (LouisGac)
-Fixed issue:vertical scrollbar in structure view (markusfluer)
-fixed issue #13156: Some Variables are not working in ongoing survey: ASSESSMENT_CURRENT_TOTAL and TOKEN:TOKEN (LouisGac)
#Updated translation: Catalan by qualitatuvic
#Updated translation: Hungarian by kkd
#Updated translation: Italian (Informal) by lfanfoni
#Updated translation: Italian by lfanfoni
#Updated translation: Japanese by nomoto
#Updated translation: Norwegian (Bokmål) by pmonstad
#Updated translation: Thai by tomzt


Changes from 3.0.1 (build 171228) to 3.0.2 (build 180110) Jan 10, 2018
-New feature: Else part in Expression Manager function optional (#895) (Denis Chenu)
-Fixed issue #13108: Property "Template.creator" is not defined. (#908) (Tõnis Ormisson
Expand Down
7 changes: 4 additions & 3 deletions installer/create-database.php
Expand Up @@ -26,7 +26,7 @@ function createDatabase($oDB){
'qid' => 'integer NOT NULL',
'code' => 'string(5) NOT NULL',
'sortorder' => 'integer NOT NULL',
'assessment_value' => 'integer NOT NULL',
'assessment_value' => 'integer NOT NULL DEFAULT 0',
'scale_id' => 'integer NOT NULL DEFAULT 0',
));

Expand Down Expand Up @@ -459,7 +459,7 @@ function createDatabase($oDB){
'name' => "string(128)",
'ordering' => "integer NULL DEFAULT '0'",
'level' => "integer NULL DEFAULT '0'",
'title' => "string(192) NOT NULL DEFAULT ''",
'title' => "string(168) NOT NULL DEFAULT ''",
'position' => "string(192) NOT NULL DEFAULT 'side'",
'description' => "text ",
'active' => "boolean NOT NULL DEFAULT '0'",
Expand All @@ -472,7 +472,8 @@ function createDatabase($oDB){
$oDB->createCommand()->createIndex('{{surveymenu_name}}', '{{surveymenu}}', 'name', true);
$oDB->createCommand()->createIndex('{{idx2_surveymenu}}', '{{surveymenu}}', 'title', false);

foreach($surveyMenuRowData=LsDefaultDataSets::getSurveyMenuData() as $surveyMenuRow) {
$surveyMenuRowData = LsDefaultDataSets::getSurveyMenuData();
foreach ($surveyMenuRowData as $surveyMenuRow) {
$oDB->createCommand()->insert("{{surveymenu}}", $surveyMenuRow);
}

Expand Down

0 comments on commit 9314b97

Please sign in to comment.