bugfix: the answers on open answers are now displayed correctly in the reports
improvement: the number of users invited and the number of users answered are now displayed on the invitation page.
bugfix: more than one simultaneous surveys are possible. Previously when answering one survey it was stored as you answered all.
bugfix: survey_invitation now correctly shows who has filled the survey and a link to the answers of this user
bugfix: survey_invitation.php cannot display who answered the survey if it is an anonymous survey.
// if the type is a pagebreak we are finished loading the questions for this page
else
{
break;
}
$counter++;
}
}
}
// selecting the maximum number of pages
$sql = "SELECT * FROM $table_survey_question WHERE type='".Database::escape_string('pagebreak')."' AND survey_id='".Database::escape_string($survey_invitation['survey_id'])."'";
// if the type is a pagebreak we are finished loading the questions for this page
else
{
break;
}
$counter++;
}
$counter++;
}
}
// selecting the maximum number of pages
$sql = "SELECT * FROM $table_survey_question WHERE type='".Database::escape_string('pagebreak')."' AND survey_id='".Database::escape_string($_GET[survey_id])."'";
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version February 2007
*/
function update_survey_answered($survey_id, $user)
function update_survey_answered($survey_id, $user, $survey_code)
{
global $_course;
@ -266,7 +266,7 @@ class survey_manager
$res = api_sql_query($sql, __FILE__, __LINE__);
// storing that the user has finished the survey.
$sql = "UPDATE $table_survey_invitation SET answered='1' WHERE user='".Database::escape_string($user)."'";
$sql = "UPDATE $table_survey_invitation SET answered='1' WHERE user='".Database::escape_string($user)."' AND survey_code='".Database::escape_string($survey_code)."'";