Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Mar 24, 2020
2 parents bd4c077 + 01a3111 commit ff52dd7
Show file tree
Hide file tree
Showing 86 changed files with 3,198 additions and 3,115 deletions.
4 changes: 2 additions & 2 deletions application/config/version.php
Expand Up @@ -11,10 +11,10 @@
* See COPYRIGHT.php for copyright notices and details.
*/

$config['versionnumber'] = '4.1.11';
$config['versionnumber'] = '4.1.12';
$config['dbversionnumber'] = 425;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['templateapiversion'] = 3;
$config['assetsversionnumber'] = '30126';
$config['assetsversionnumber'] = '30127';
return $config;
14 changes: 7 additions & 7 deletions application/controllers/Statistics_userController.php
Expand Up @@ -147,7 +147,7 @@ public function actionAction($surveyid, $language = null)

// ---------- CREATE SGQA OF ALL QUESTIONS WHICH USE "PUBLIC_STATISTICS" ----------
// only show questions where question attribute "public_statistics" is set to "1"
$questions = Question::model()->with(['group' => ['alias' => 'g'], 'questionAttributes' => ['alias' => 'qa']])->findAll([
$questions = Question::model()->with(['group' => ['alias' => 'g'], 'questionattributes' => ['alias' => 'qa']])->findAll([
'condition' => 't.sid = :surveyid AND t.parent_qid = :parent_qid AND qa.attribute = :attribute AND qa.value = :value',
'params' => [':surveyid' => $iSurveyID, ':parent_qid' => 0, ':attribute' => 'public_statistics', ':value' => '1'],
'order' => 'g.group_order, t.question_order'
Expand Down Expand Up @@ -280,7 +280,7 @@ public function createSGQA(array $filters)
switch ($type) {
case Question::QT_K_MULTIPLE_NUMERICAL_QUESTION: // Multiple Numerical
case Question::QT_Q_MULTIPLE_SHORT_TEXT: // Multiple Short Text
$results = Question::model()->with('questionL10ns')->findAll([
$results = Question::model()->with('questionl10ns')->findAll([
'condition' => 'language=:language AND parent_qid=:parent_qid',
'params' => [':language' => $this->sLanguage, ':parent_qid' => $flt->qid],
'order' => 'question_order'
Expand All @@ -295,7 +295,7 @@ public function createSGQA(array $filters)
case Question::QT_E_ARRAY_OF_INC_SAME_DEC_QUESTIONS: // ARRAY OF Increase/Same/Decrease QUESTIONS
case Question::QT_F_ARRAY_FLEXIBLE_ROW: // FlEXIBLE ARRAY
case Question::QT_H_ARRAY_FLEXIBLE_COLUMN: // ARRAY (By Column)
$results = Question::model()->with('questionL10ns')->findAll([
$results = Question::model()->with('questionl10ns')->findAll([
'condition' => 'language=:language AND parent_qid=:parent_qid',
'params' => [':language' => $this->sLanguage, ':parent_qid' => $flt->qid],
'order' => 'question_order'
Expand All @@ -312,12 +312,12 @@ public function createSGQA(array $filters)
break;
case Question::QT_SEMICOLON_ARRAY_MULTI_FLEX_TEXT: //ARRAY (Multi Flex) (Text)
case Question::QT_COLON_ARRAY_MULTI_FLEX_NUMBERS: //ARRAY (Multi Flex) (Numbers)
$resultsScale0 = Question::model()->with('questionL10ns')->findAll([
$resultsScale0 = Question::model()->with('questionl10ns')->findAll([
'condition' => 'language=:language AND parent_qid=:parent_qid AND scale_id=:scale:id',
'params' => [':language' => $this->sLanguage, ':parent_qid' => $flt->qid, ':scale_id' => 0],
'order' => 'question_order'
]);
$resultsScale1 = Question::model()->with('questionL10ns')->findAll([
$resultsScale1 = Question::model()->with('questionl10ns')->findAll([
'condition' => 'language=:language AND parent_qid=:parent_qid AND scale_id=:scale:id',
'params' => [':language' => $this->sLanguage, ':parent_qid' => $flt->qid, ':scale_id' => 1],
'order' => 'question_order'
Expand All @@ -329,7 +329,7 @@ public function createSGQA(array $filters)
}
break;
case Question::QT_R_RANKING_STYLE: //RANKING
$results = Question::model()->with('questionL10ns')->findAll([
$results = Question::model()->with('questionl10ns')->findAll([
'condition' => 'language=:language AND parent_qid=:parent_qid',
'params' => [':language' => $this->sLanguage, ':parent_qid' => $flt->qid],
'order' => 'question_order'
Expand All @@ -344,7 +344,7 @@ public function createSGQA(array $filters)
case Question::QT_X_BOILERPLATE_QUESTION: //This is a boilerplate question and it has no business in this script
break;
case Question::QT_1_ARRAY_MULTISCALE: // MULTI SCALE
$results = Question::model()->with('questionL10ns')->findAll([
$results = Question::model()->with('questionl10ns')->findAll([
'condition' => 'language=:language AND parent_qid=:parent_qid',
'params' => [':language' => $this->sLanguage, ':parent_qid' => $flt->qid],
'order' => 'question_order'
Expand Down
21 changes: 9 additions & 12 deletions application/controllers/admin/LimeSurveyFileManager.php
Expand Up @@ -380,11 +380,7 @@ public function downloadFiles() {
$checkFileCreate = $archive->create($arrayOfFiles, PCLZIP_OPT_REMOVE_ALL_PATH);
$urlFormat = Yii::app()->getUrlManager()->getUrlFormat();
$getFileLink = Yii::app()->createUrl('admin/filemanager/sa/getZipFile');
if($urlFormat == 'path') {
$getFileLink .= '?path='.$zipfile;
} else {
$getFileLink .= '&path='.$zipfile;
}
$_SESSION['__path'] = $zipfile;

$this->_printJsonResponse(
[
Expand All @@ -395,15 +391,16 @@ public function downloadFiles() {
);
}

public function getZipFile($path) {
/**
* @return void
*/
public function getZipFile()
{
$path = $_SESSION['__path'];
unset($_SESSION['__path']);
$filename = basename($path);

// echo "<pre>";
// echo $path."\n";
// echo $filename."\n";
// echo "isFile => ".is_file($path) ? 'isFile' : 'isNoFile'."\n";
// echo "</pre>";
if (is_file($path) || true) {
if (is_file($path)) {
// Send the file for download!
header("Expires: 0");
header("Cache-Control: must-revalidate");
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/admin/assessments.php
Expand Up @@ -257,12 +257,12 @@ private function _collectGroupData($oSurvey, &$aData = array())
{
$aGroups = [];
$db = Yii::app()->db;
$quotedQGL10ns = $db->quoteTableName('questionGroupL10ns');
$quotedQGL10ns = $db->quoteTableName('questiongroupl10ns');
$quotedLanguage = $db->quoteColumnName('language');

$groups = QuestionGroup::model()->with(
[
'questionGroupL10ns' => [
'questiongroupl10ns' => [
'condition' => $quotedQGL10ns . '.' . $quotedLanguage . ' = :language',
'params' => array(':language' => $oSurvey->language)
]
Expand Down

0 comments on commit ff52dd7

Please sign in to comment.