Skip to content

Commit

Permalink
Dev Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
Dev em_manager_helper needs encryption call implemented by Denis
  • Loading branch information
c-schmitz committed Jan 8, 2020
2 parents a86272a + 4ac5327 commit 66a9782
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 15 deletions.
9 changes: 5 additions & 4 deletions application/core/LSETwigViewRenderer.php
Expand Up @@ -611,10 +611,11 @@ private function getPluginsData($sString, $aDatas)
// show "Exit and clear survey" button whenever there is 'srid' key set,
// button won't be rendered on welcome and final page because 'srid' key doesn't exist on those pages
// additionally checks for submit page to compensate when srid is needed to render other views
if (isset($_SESSION['survey_' . $surveyid]['srid'])
&& $aDatas['aSurveyInfo']['active'] == 'Y'
&& $aDatas['aSurveyInfo']['include_content'] !== 'submit'
&& $aDatas['aSurveyInfo']['include_content'] !== 'submit_preview'
if (
isset($_SESSION['survey_' . $surveyid]['srid'])
&& isset($aDatas['aSurveyInfo']['active']) && $aDatas['aSurveyInfo']['active'] == 'Y'
&& isset($aDatas['aSurveyInfo']['include_content']) && $aDatas['aSurveyInfo']['include_content'] !== 'submit'
&& isset($aDatas['aSurveyInfo']['include_content']) && $aDatas['aSurveyInfo']['include_content'] !== 'submit_preview'
) {
$aDatas['aSurveyInfo']['bShowClearAll'] = true;
}
Expand Down
19 changes: 11 additions & 8 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -5640,7 +5640,10 @@ private function _UpdateValuesInDatabase($finished=false)
$cSave->set_answer_time();
}
}
} else {
LimeExpressionManager::addFrontendFlashMessage('error', $this->gT('This response was already submitted.'), $this->sid);
}

if ($finished) {
// Delete the save control record if successfully finalize the submission
$criteria = new CDbCriteria;
Expand All @@ -5666,15 +5669,15 @@ private function _UpdateValuesInDatabase($finished=false)
else
{
if ($finished && ($oResponse->submitdate == null || Survey::model()->findByPk($this->sid)->alloweditaftercompletion == 'Y')) {
if($this->surveyOptions['datestamp'])
{
// Replace with date("Y-m-d H:i:s") ? See timeadjust
$submitdate = date("Y-m-d H:i:s");
} else {
$submitdate = date("Y-m-d H:i:s",mktime(0,0,0,1,1,1980));
/* Less update : just do what you need to to */
if($this->surveyOptions['datestamp']) {
$submitdate = dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $this->surveyOptions['timeadjust']);
} else {
$submitdate = date("Y-m-d H:i:s",mktime(0,0,0,1,1,1980));
}
if (!Response::model($this->sid)->updateByPk($oResponse->id,array('submitdate'=>$submitdate))) {
LimeExpressionManager::addFrontendFlashMessage('error', $this->gT('An error happen when try to submit your response.'), $this->sid);
}
$oResponse->submitdate = $submitdate;
$oResponse->encryptSave();
}
}

Expand Down
9 changes: 6 additions & 3 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -1835,10 +1835,13 @@ public function delete_participants($sSessionKey, $iSurveyID, $aTokenIDs)
$token = Token::model($iSurveyID)->findByPk($iTokenID);
if (!isset($token)) {
$aResult[$iTokenID] = 'Invalid token ID';
} elseif ($token->delete()) {
$aResult[$iTokenID] = 'Deleted';
} else {
$aResult[$iTokenID] = 'Deletion went wrong';
$iDel = Token::model($iSurveyID)->deleteByPk($iTokenID);
if ($iDel > 0) {
$aResult[$iTokenID] = 'Deleted';
} else {
$aResult[$iTokenID] = 'Deletion went wrong';
}
}
}
return $aResult;
Expand Down
Binary file modified locale/ca/ca.mo
Binary file not shown.
Binary file modified locale/da/da.mo
Binary file not shown.
Binary file modified locale/de/de.mo
Binary file not shown.
Binary file modified locale/es/es.mo
Binary file not shown.
Binary file modified locale/fr/fr.mo
Binary file not shown.
Binary file modified locale/hr/hr.mo
Binary file not shown.
Binary file modified locale/hu/hu.mo
Binary file not shown.
Binary file modified locale/it-informal/it-informal.mo
Binary file not shown.
Binary file modified locale/it/it.mo
Binary file not shown.
Binary file modified locale/ko/ko.mo
Binary file not shown.
Binary file modified locale/ky/ky.mo
Binary file not shown.
Binary file modified locale/ru/ru.mo
Binary file not shown.
Binary file modified locale/tr/tr.mo
Binary file not shown.

0 comments on commit 66a9782

Please sign in to comment.