Skip to content

Commit

Permalink
Fixed issue #13570: Out of quota, user gets the following message at …
Browse files Browse the repository at this point in the history
…the end even though the survey is activated
  • Loading branch information
LouisGac committed May 30, 2018
1 parent 4d83aee commit 6f561be
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions application/helpers/frontend_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1884,15 +1884,21 @@ function checkCompletedQuota($surveyid, $return = false)
$thissurvey['aQuotas']['sPluginBlocks'] = implode("\n", $blocks);
$thissurvey['aQuotas']['sUrlDescription'] = $sUrlDescription;
$thissurvey['aQuotas']['sUrl'] = $sUrl;
$thissurvey['active'] = 'Y';

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Jun 2, 2018

Collaborator

Maybe get it by survey and not force as active ? I know quota out can happen only if survey is active but get aSurveyInfo like other twig can be interesting (i think)

This comment has been minimized.

Copy link
@LouisGac

LouisGac Jun 4, 2018

Contributor

sure



$thissurvey['aQuotas']['hiddeninputs'] = '<input type="hidden" name="sid" value="'.$thissurvey['sid'].'" />
$thissurvey['aQuotas']['hiddeninputs'] = '<input type="hidden" name="sid" value="'.$surveyid.'" />
<input type="hidden" name="token" value="'.$thissurvey['aQuotas']['sClientToken'].'" />
<input type="hidden" name="thisstep" value="'.$thissurvey['aQuotas']['sQuotaStep'].'" />';

foreach ($thissurvey['aQuotas']['aPostedQuotaFields'] as $field => $post) {
$thissurvey['aQuotas']['hiddeninputs'] .= '<input type="hidden" name="'.$field.'" value="'.$post.'" />';

if (!empty($thissurvey['aQuotas']['aPostedQuotaFields'])){
foreach ($thissurvey['aQuotas']['aPostedQuotaFields'] as $field => $post) {
$thissurvey['aQuotas']['hiddeninputs'] .= '<input type="hidden" name="'.$field.'" value="'.$post.'" />';
}
}


//field,post in aSurveyInfo.aQuotas.aPostedQuotaFields %}

if ($closeSurvey) {
Expand Down

0 comments on commit 6f561be

Please sign in to comment.