New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev: fixed #14226 second part #1192

Merged
merged 2 commits into from Dec 17, 2018

Conversation

Projects
None yet
1 participant
@Shnoulle
Copy link
Collaborator

Shnoulle commented Dec 12, 2018

Dev: move to use extends "./subviews/content/submit.twig"
Dev: add a lot of block to allow updating
Dev: do the job 2 times : one in SurveyRunTime : didn't broke current extended template
Dev: 2 times too for automatic translation
Dev: add information about url (print and stats) and disable url

Dev: fixed #14226 second part
Dev: move to use extends "./subviews/content/submit.twig"
Dev: add a lot of block to allow updating
Dev: do the job 2 times : one in SurveyRunTime : didn't broke current extended template
Dev: 2 times too for automatic translation
Dev: add information about url (print and stats) and disable url

@Shnoulle Shnoulle requested a review from LouisGac Dec 12, 2018

// cookies
if($surveyActive && $this->aSurveyInfo['usecookie'] == "Y") {
if(!$oSurvey->getHasTokensTable()) {
setcookie("LS_".$this->iSurveyid."_STATUS", "COMPLETE", time() + 31536000); //Cookie will expire in 365 days
}
}
$redata['completed'] = $this->completed;

This comment has been minimized.

@Shnoulle

Shnoulle Dec 12, 2018

Collaborator

I really don't know this usage …, and $redata seems not used

$this->completed = true;
//*****************************************
$this->completed = true;

This comment has been minimized.

@Shnoulle

Shnoulle Dec 12, 2018

Collaborator

What is the usage here ?

if ($this->aSurveyInfo['publicstatistics'] == 'Y') {
$this->aSurveyInfo['aCompleted']['aPublicStatistics']['show'] = true;
$this->aSurveyInfo['aCompleted']['aPublicStatistics']['sUrl'] = $surveyActive ? Yii::app()->getController()->createUrl("/statistics_user/action/", array('surveyid'=>$this->iSurveyid, 'language'=>App()->getLanguage())) : "#";
$this->aSurveyInfo['aCompleted']['aPublicStatistics']['sText'] = $surveyActive ? gT("View the statistics for this survey.") : gT("View the statistics for this survey is disable when survey not activated.");

This comment has been minimized.

@Shnoulle

Shnoulle Dec 12, 2018

Collaborator

Not really used, but adding it in PHP to have automatic translations is the quickest and sure way.

header("Location: ".$actualRedirect, false, 302);
}
}
$this->aSurveyInfo['aCompleted']['sSurveylsUrlDescriptionExta'] = gT("Automatically load URL when survey complete deactivated disable when survey is not activated.");

This comment has been minimized.

@Shnoulle

Shnoulle Dec 12, 2018

Collaborator

Not used but use same string in twig file. Sure way to have automatic translation updated.

@Shnoulle Shnoulle merged commit 3af1dea into LimeSurvey:master Dec 17, 2018

3 checks passed

CodeFactor 2 issues fixed. 1 issue found.
Details
Scrutinizer Analysis: 1 new issues – Tests: passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment