[svn r14200] fix non anonymous values on an anonymous survey

skala
Eric Marguin 18 years ago
parent b4d2e11c0a
commit 0787144842
  1. 14
      main/survey/reporting.php

@ -21,7 +21,7 @@
* @package dokeos.survey
* @author unknown, the initial survey that did not make it in 1.8 because of bad code
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
* @version $Id: reporting.php 13886 2007-12-02 01:20:55Z yannoo $
* @version $Id: reporting.php 14200 2008-01-30 12:45:06Z elixir_inter $
*
* @todo The question has to be more clearly indicated (same style as when filling the survey)
*/
@ -311,7 +311,7 @@ function display_user_report()
}
else
{
$name = $person;
$name = $key+1;
$id = $person;
}
echo '<option value="reporting.php?action='.$_GET['action'].'&amp;survey_id='.$_GET['survey_id'].'&amp;user='.$id.'" ';
@ -817,9 +817,12 @@ function display_complete_report()
*/
function display_complete_report_row($possible_answers, $answers_of_user, $user, $questions)
{
global $survey_data;
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
echo '<tr>';
if ($survey_data['anonymous'] == 0)
{
if(intval($user)!==0)
{
$sql = 'SELECT firstname, lastname FROM '.Database::get_main_table(TABLE_MAIN_USER).' WHERE user_id='.intval($user);
@ -838,6 +841,11 @@ function display_complete_report_row($possible_answers, $answers_of_user, $user,
{
echo ' <th>'.$user.'</th>'; // the user column
}
}
else
{
echo '<th>-</th>';
}
foreach ($possible_answers as $question_id=>$possible_option)

Loading…
Cancel
Save