|
|
|
@ -259,7 +259,7 @@ class SurveyUtil |
|
|
|
self::display_comparative_report(); |
|
|
|
self::display_comparative_report(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'completereport': |
|
|
|
case 'completereport': |
|
|
|
echo self::displayCompleteReport($survey_data); |
|
|
|
echo self::displayCompleteReport($survey_data, 0, true, true, !$survey_data['anonymous']); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'deleteuserreport': |
|
|
|
case 'deleteuserreport': |
|
|
|
self::delete_user_report($_GET['survey_id'], $_GET['user']); |
|
|
|
self::delete_user_report($_GET['survey_id'], $_GET['user']); |
|
|
|
@ -1440,7 +1440,9 @@ class SurveyUtil |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
$num = count($extra_user_fields); |
|
|
|
$num = count($extra_user_fields); |
|
|
|
|
|
|
|
if (!$survey_data['anonymous']){ |
|
|
|
$return .= str_repeat(';', $num); |
|
|
|
$return .= str_repeat(';', $num); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$sql = "SELECT |
|
|
|
$sql = "SELECT |
|
|
|
questions.question_id, |
|
|
|
questions.question_id, |
|
|
|
@ -1497,7 +1499,7 @@ class SurveyUtil |
|
|
|
// Getting all the questions and options |
|
|
|
// Getting all the questions and options |
|
|
|
$return .= ';'; |
|
|
|
$return .= ';'; |
|
|
|
// Show the fields names for user fields |
|
|
|
// Show the fields names for user fields |
|
|
|
if (!empty($extra_user_fields)) { |
|
|
|
if (!empty($extra_user_fields) && !$survey_data['anonymous']) { |
|
|
|
foreach ($extra_user_fields as &$field) { |
|
|
|
foreach ($extra_user_fields as &$field) { |
|
|
|
if ($translate) { |
|
|
|
if ($translate) { |
|
|
|
$field[3] = api_get_filtered_multilingual_HTML_string($field[3], $course['language']); |
|
|
|
$field[3] = api_get_filtered_multilingual_HTML_string($field[3], $course['language']); |
|
|
|
@ -1588,7 +1590,7 @@ class SurveyUtil |
|
|
|
$possible_answers, |
|
|
|
$possible_answers, |
|
|
|
$answers_of_user, |
|
|
|
$answers_of_user, |
|
|
|
$old_user, |
|
|
|
$old_user, |
|
|
|
true, |
|
|
|
!$survey_data['anonymous'], |
|
|
|
$compact |
|
|
|
$compact |
|
|
|
); |
|
|
|
); |
|
|
|
$answers_of_user = []; |
|
|
|
$answers_of_user = []; |
|
|
|
@ -1779,11 +1781,12 @@ class SurveyUtil |
|
|
|
true |
|
|
|
true |
|
|
|
); |
|
|
|
); |
|
|
|
$num = count($extra_user_fields); |
|
|
|
$num = count($extra_user_fields); |
|
|
|
|
|
|
|
if (!$survey_data['anonymous']) { |
|
|
|
for ($i = 0; $i < $num; $i++) { |
|
|
|
for ($i = 0; $i < $num; $i++) { |
|
|
|
$worksheet->setCellValueByColumnAndRow($column, $line, ''); |
|
|
|
$worksheet->setCellValueByColumnAndRow($column, $line, ''); |
|
|
|
$column++; |
|
|
|
$column++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
$display_extra_user_fields = true; |
|
|
|
$display_extra_user_fields = true; |
|
|
|
|
|
|
|
|
|
|
|
// Database table definitions |
|
|
|
// Database table definitions |
|
|
|
@ -1847,7 +1850,7 @@ class SurveyUtil |
|
|
|
$line++; |
|
|
|
$line++; |
|
|
|
$column = 1; |
|
|
|
$column = 1; |
|
|
|
// Show extra field values |
|
|
|
// Show extra field values |
|
|
|
if ($display_extra_user_fields) { |
|
|
|
if ($display_extra_user_fields && !$survey_data['anonymous']) { |
|
|
|
// Show the fields names for user fields |
|
|
|
// Show the fields names for user fields |
|
|
|
foreach ($extra_user_fields as &$field) { |
|
|
|
foreach ($extra_user_fields as &$field) { |
|
|
|
$worksheet->setCellValueByColumnAndRow( |
|
|
|
$worksheet->setCellValueByColumnAndRow( |
|
|
|
@ -1927,7 +1930,7 @@ class SurveyUtil |
|
|
|
$possible_answers, |
|
|
|
$possible_answers, |
|
|
|
$answers_of_user, |
|
|
|
$answers_of_user, |
|
|
|
$old_user, |
|
|
|
$old_user, |
|
|
|
true |
|
|
|
!$survey_data['anonymous'] |
|
|
|
); |
|
|
|
); |
|
|
|
foreach ($return as $elem) { |
|
|
|
foreach ($return as $elem) { |
|
|
|
$worksheet->setCellValueByColumnAndRow($column, $line, $elem); |
|
|
|
$worksheet->setCellValueByColumnAndRow($column, $line, $elem); |
|
|
|
|