Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 22, 2021
2 parents 5974557 + b587ecc commit 8cbe005
Show file tree
Hide file tree
Showing 26 changed files with 605 additions and 477 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Expand Up @@ -16,5 +16,5 @@
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['templateapiversion'] = 3;
$config['assetsversionnumber'] = '30241';
$config['assetsversionnumber'] = '30243';
return $config;
10 changes: 2 additions & 8 deletions application/controllers/admin/tokens.php
Expand Up @@ -1608,15 +1608,9 @@ public function exportdialog(int $iSurveyId)
),
);

// Save Button
$aData['showSaveButton'] = true;

// Save and Close Button
$aData['showSaveAndCloseButton'] = true;

// White Close Button
$aData['showWhiteCloseButton'] = true;
$aData['closeUrl'] = Yii::app()->createUrl('admin/tokens/sa/index/surveyid/' . $iSurveyId);
$aData['closeUrl'] = Yii::app()->createUrl('admin/tokens/sa/browse/surveyid/' . $iSurveyId);

$aData['topBar']['name'] = 'tokensTopbar_view';
$aData['topBar']['rightSideView'] = 'tokensTopbarRight_view';
Expand Down Expand Up @@ -2211,7 +2205,7 @@ public function import($iSurveyId)
$aData['thischaracterset'] = $thischaracterset;

$aData['showCloseButton'] = true;
$aData['closeUrl'] = Yii::app()->createUrl('admin/tokens/sa/index/surveyid/' . $iSurveyId);
$aData['closeUrl'] = Yii::app()->createUrl('admin/tokens/sa/browse/surveyid/' . $iSurveyId);
$aData['topBar']['name'] = 'tokensTopbar_view';
$aData['topBar']['rightSideView'] = 'tokensTopbarRight_view';

Expand Down
7 changes: 4 additions & 3 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -2004,7 +2004,8 @@ protected function displaySimpleResults($outputs, $results, $rt, $outputType, $s

//-------------------------- PCHART OUTPUT ----------------------------
list(, $qgid, $qqid) = explode("X", $rt, 3);
$aattr = QuestionAttribute::model()->getQuestionAttributes($outputs['parentqid']);
$attrQid = $outputs['parentqid'] > 0 ? $outputs['parentqid'] : $qqid; // use parentqid if exists
$aattr = QuestionAttribute::model()->getQuestionAttributes($attrQid);

//PCHART has to be enabled and we need some data
//
Expand Down Expand Up @@ -4187,10 +4188,10 @@ protected function getQuartile($quartile, $fieldname, $surveyid, $sql, $excludez
$q1 = $quartile / 4 * ($recordCount + 1);
$row = $q1 - 1; // -1 since we start counting at 0
if ($q1 === (int) $q1) {
return $allRows[$row][$fieldname];
return LSActiveRecord::decryptSingle($allRows[$row][$fieldname]);
} else {
$diff = ($q1 - (int) $q1);
return $allRows[$row][$fieldname] + $diff * ($allRows[$row + 1][$fieldname] - $allRows[$row][$fieldname]);
return LSActiveRecord::decryptSingle($allRows[$row][$fieldname]) + $diff * (LSActiveRecord::decryptSingle($allRows[$row + 1][$fieldname]) - LSActiveRecord::decryptSingle($allRows[$row][$fieldname]));
}
}

Expand Down
8 changes: 6 additions & 2 deletions application/helpers/export_helper.php
Expand Up @@ -2313,9 +2313,13 @@ function tokensExport($iSurveyID)
foreach ($bresultAll as $tokenKey => $tokenValue) {
// creating TokenDynamic object to be able to decrypt easier
$token = TokenDynamic::model($iSurveyID);
// populate TokenDynamic object with values
$attributes = array_keys($token->getAttributes());
// Populate TokenDynamic object with values
// NB: $tokenValue also contains values not belonging to TokenDynamic model (joined with survey)
foreach ($tokenValue as $key => $value) {
$token->$key = $value;
if (in_array($key, $attributes)) {
$token->$key = $value;
}
}
// decrypting
$token->decrypt();
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/super/_configuration_menu.php
Expand Up @@ -290,7 +290,7 @@
<?php if(Permission::model()->hasGlobalPermission('settings','read')): ?>
<li class="dropdown-item">
<a href="<?php echo $this->createUrl("admin/menus/sa/view"); ?>">
<?php eT("Survey Menu");?>
<?php eT("Survey menus");?>
</a>
</li>
<?php endif;?>
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/survey/breadcrumb.php
Expand Up @@ -9,7 +9,7 @@
<ol class="breadcrumb ls-flex-row align-items-center align-content-flex-start <?php echo $extraClass?>">
<li>
<a id="breadcrumb__surveylist--link" class="pjax animate home-icon" href="<?php echo App()->createUrl('surveyAdministration/listsurveys'); ?>">
<?php et('Survey list') ?>
<?php et('Surveys') ?>
</a>
</li>
<?php //First create the basis with a surveylink if set?>
Expand Down
19 changes: 19 additions & 0 deletions application/views/questionAdministration/summary.php
Expand Up @@ -173,6 +173,25 @@
</tr>
<?php endif; ?>


<!-- Encrypted -->
<?php if (isset($question->encrypted)):?>
<tr>
<td>
<strong>
<?php eT("Encrypted:"); ?>
</strong>
</td>
<td>
<?php if ($question->encrypted == "Y") : ?>
<?php eT("Yes"); ?>
<?php else:?>
<?php eT("No"); ?>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>

<!-- Condition for this question -->
<?php if (trim($question->relevance) != ''): ?>
<tr>
Expand Down
Expand Up @@ -39,7 +39,7 @@
<div class='col-xs-12 col-sm-2 slider-left text-right'>{{ sliderleft }}</div>
{% endif %}

<div class="slider-container ls-input-group col-xs-12 col-sm-{{sliderWidth}}" id="answer{{myfname}}slid-container">
<div class="slider-container slider-{{slider_orientation}} ls-input-group col-xs-12 col-sm-{{sliderWidth}}" id="answer{{myfname}}slid-container">
{{ C.Html.textField( myfname ~ 'slid', dispVal ,{
'class': 'form-control answer-item numeric-item hidden',
'id' : "answer" ~ myfname ~ "slid",
Expand All @@ -52,8 +52,10 @@
})
}}
{% if slider_showminmax %}
<div class='pull-left help-block'> {{ slider_reversed == 'false' ? slider_min : slider_max}}</div>
<div class='pull-right help-block'> {{ slider_reversed == 'false' ? slider_max : slider_min}}</div>
<div class="slider-min-max-container">
<div class='help-block slider-min-block'> {{ slider_reversed == 'false' ? slider_min : slider_max}}</div>
<div class='help-block slider-max-block'> {{ slider_reversed == 'false' ? slider_max : slider_min}}</div>
</div>
{% endif %}
{% if slider_reset %}
<div class="ls-input-group-extra ls-no-js-hidden ls-input-group-reset">
Expand Down
32 changes: 32 additions & 0 deletions assets/packages/questions/numeric-slider/css/numeric-slider.css
Expand Up @@ -49,3 +49,35 @@ font-family: FontAwesome;
.ls-input-group-reset{position:relative;margin-top:0}
.btn-slider-reset{top:-1em;margin-top:0}
}

.slider-vertical .slider-min-max-container {
display: inline-block;
vertical-align: top;
height: 210px;
position: relative;
padding-left: 0.5rem;
}

.slider-vertical .slider-min-block {
position: absolute;
top: 0;
margin-top: -10px;
}

.slider-vertical .slider-max-block {
position: absolute;
bottom: 0;
margin-bottom: -10px;
}

.slider-horizontal .slider-min-max-container {
width: 100%;
}

.slider-horizontal .slider-min-block {
float: left;
}

.slider-horizontal .slider-max-block {
float: right;
}
18 changes: 8 additions & 10 deletions assets/scripts/admin/questionEditor.js
Expand Up @@ -769,11 +769,7 @@ $(document).on('ready pjax:scriptcomplete', function () {
arr.forEach(function(entry) {
const lang = entry[0];
const row = entry[1];
if (lang.length !== 2) {
alert('Internal error: lang must have exactly two characters, but is ' + lang);
throw 'abort';
}
/*
/*
if (!(row instanceof HTMLElement)) {
alert('Internal error: row is not an HTMLElement but a ' + (typeof row));
throw 'abort';
Expand Down Expand Up @@ -929,7 +925,7 @@ $(document).on('ready pjax:scriptcomplete', function () {
// TODO: Doc answers
const answers = {};
const lsrows = $('#quickaddarea').val().split('\n');
const allrows = $closestTable.find('tr').length;
const allrows = $closestTable.find('tbody tr').length;
const separatorchar = getSeparatorChar(lsrows);

let numericSuffix = '';
Expand Down Expand Up @@ -958,14 +954,16 @@ $(document).on('ready pjax:scriptcomplete', function () {
const thisrow = value.splitCSV(separatorchar);

if (thisrow.length <= languages.length) {
let qCode = (parseInt(k) + 1).toString();
let numericCode = (parseInt(k) + 1);
if (lsreplace === false) {
qCode += (parseInt(allrows));
numericCode += (parseInt(allrows));
}
while (qCode.toString().length < numericSuffix.length) {
let qCode = numericCode.toString();
while (qCode.length < numericSuffix.length) {
qCode = `0${qCode}`;
}
thisrow.unshift(codeSigil.join('') + qCode);
let prefix = codeSigil.slice(0, Math.max(0, 5 - qCode.length)).join('');
thisrow.unshift(prefix + qCode);
} else {
thisrow[0] = thisrow[0].replace(/[^A-Za-z0-9]/g, '').substr(0, 20);
}
Expand Down
48 changes: 48 additions & 0 deletions docs/release_notes.txt
Expand Up @@ -34,6 +34,54 @@ Thank you to everyone who helped with this new release!

CHANGE LOG
------------------------------------------------------
Changes from 5.1.15 (build 211011) to 5.1.16 (build 211020) October 20, 2021
#Updated translation: Portuguese (Portugal) by samarta
#Updated translation: Finnish by Jmantysalo
#Updated translation: Czech by jelen1
#Updated translation: Czech (Informal) by jelen1
#Updated translation: Catalan by qualitatuvic


Changes from 5.1.14 (build 210927) to 5.1.15 (build 211011) October 11, 2021
-Fixed issue: Error when sorting by group ID in group list (Carsten Schmitz)
-Fixed issue #T424: Confusing message on survey import (#2075) (Gabriel Jenik)
-Fixed issue #17649: White page by deleting a participant in a survey (Olle Haerstedt)
-Fixed issue #17633: Changing Array (Texts) sub questions' label at runtime, manipulates question design (#2076) (Gabriel Jenik)
-Fixed issue #17598: Save and close button on label sets list screen not working as expected (#2061) (Gabriel Jenik)
-Fixed issue #17597: Back button on themes page not working as expected (#2067) (Gabriel Jenik)
-Fixed issue #17596: Close button on global survey settings not working as expected (#2063) (Gabriel Jenik)
-Fixed issue #17569: Unable to edit answer in single choice question after activate survey (#2054) (Gabriel Jenik)
-Fixed issue #17554: If a user has more than one email associated the methods mail_registered_participants and invite_participants fail (#2041) (Gabriel Jenik)
-Fixed issue #17549: Hint for page break (#2066) (Gabriel Jenik)
-Fixed issue #17526: Filter html_entity_decode at save (#2017) (Gabriel Jenik)
-Fixed issue #17504: Responses Batch deletion modal only opens the first time (#2046) (Gabriel Jenik)
-Fixed issue #17421: When upgrading from LS3 to LS5, plugin Manager can't be used if non-compatible plugins are found (Olle Haerstedt)
-Fixed issue #17416: Lost of Total and Remaining in multi numeric (#2077) (Gabriel Jenik)
-Fixed issue #17317: Missing green bar breadcrumbs when importing zip file resources (#2074) (Gabriel Jenik)
-Fixed issue #15608: No success message when deleting single custom attributes from CPDB (#2068) (Gabriel Jenik)
-Fixed issue #13601: {TIME} placeholder not working (#2060) (Gabriel Jenik)
#Updated translation: Xhosa by c_schmitz, erik.lamontagne
#Updated translation: Turkish by bulent, kayazeren
#Updated translation: Slovak by jelen1, jlcavazza
#Updated translation: Sinhala by sayuri
#Updated translation: Portuguese (Portugal) by samarta
#Updated translation: Portuguese (Brazil) by c_schmitz, educaticteced
#Updated translation: Polish by elissa
#Updated translation: Polish (Informal) by elissa
#Updated translation: Italian by lfanfoni
#Updated translation: Italian (Informal) by lfanfoni
#Updated translation: German by c_schmitz
#Updated translation: German (Informal) by actxcellence, c_schmitz, Hyperion, lsurvey20, RobinBur
#Updated translation: Finnish by Jmantysalo
#Updated translation: Dutch by Han
#Updated translation: Dutch (Informal) by Han
#Updated translation: Czech by jelen1
#Updated translation: Czech (Informal) by jelen1
#Updated translation: Chinese (Hong Kong) (Traditional) by c_schmitz
#Updated translation: Bulgarian by peterx
#Updated translation: Azerbaijani by abdul42


Changes from 5.1.13 (build 210923) to 5.1.14 (build 210927) September 27, 2021
-Fixed issue #T1228: Close button does not work when attempting to abort importing participants from CSV file (#2051) (Gabriel Jenik)
-Fixed issue #17611: Updating from 2.05 or earlier throws error "Undefined function getDBConnectionStringProperty()" (Carsten Schmitz)
Expand Down

0 comments on commit 8cbe005

Please sign in to comment.