Skip to content

Commit

Permalink
Fixed issue #10230: Limesurvey should not check completed surveys quotas
Browse files Browse the repository at this point in the history
Dev: quota are strange with "allow edit response" actually
Dev: submit with quota
Dev: launch same survey again : allow to edit response
  • Loading branch information
Shnoulle committed Mar 5, 2016
1 parent b9f2bc9 commit 7a4392e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions application/helpers/frontend_helper.php
Expand Up @@ -1906,11 +1906,18 @@ function UpdateFieldArray()
* checkCompletedQuota() returns matched quotas information for the current response
* @param integer $surveyid - Survey identification number
* @param bool $return - set to true to return information, false do the quota
* @return array - nested array, Quotas->Members->Fields, includes quota information matched in session.
* @return array|void - nested array, Quotas->Members->Fields, includes quota information matched in session.
*/
function checkCompletedQuota($surveyid,$return=false)
{
if (!isset($_SESSION['survey_'.$surveyid]['srid']))
/* Check is session is set */
if (!isset(App()->session['survey_'.$surveyid]['srid']))

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Mar 5, 2016

Collaborator

Check if session is set

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Mar 6, 2016

Author Collaborator

you mean :

 if (isset(){
 }else{
    return;
  }

?

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Mar 6, 2016

Collaborator

No, there's a spelling error in the comment. :) is -> if

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Mar 6, 2016

Author Collaborator

Oups ... :)

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Mar 6, 2016

Author Collaborator

312c9d7 fixed

{
return;
}
/* Check is Response is already submitted : only when "do" the quota: allow to send information about quota */
$oResponse=Response::model($surveyid)->findByPk(App()->session['survey_'.$surveyid]['srid']);
if(!$return && $oResponse && !is_null($oResponse->submitdate))
{
return;
}
Expand Down

0 comments on commit 7a4392e

Please sign in to comment.