Skip to content

Commit

Permalink
Survey: Fix reporting to PDF style BT#17835
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Dec 3, 2020
1 parent 1e4c856 commit a553afa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions main/survey/reporting.php
Expand Up @@ -144,7 +144,6 @@
async function exportToPdf() {
window.jsPDF = window.jspdf.jsPDF;
$(".question-item img, #pdf_table img").hide();
$(".question-item video, #pdf_table video").hide();
$(".question-item audio, #pdf_table audio").hide();
Expand Down Expand Up @@ -175,7 +174,7 @@
pages[page] = 0;
}
var positionY = 180;
var positionY = 160;
pages[page] += 1;
var diff = 250;
if (page > 1) {
Expand Down
7 changes: 4 additions & 3 deletions main/survey/surveyUtil.class.php
Expand Up @@ -603,11 +603,12 @@ public static function display_question_report($survey_data)
echo '</div>';

$fromUntil = sprintf(get_lang('FromXUntilY'), $survey_data['avail_from'], $survey_data['avail_till']);
$max = 80;
$data = [
get_lang('SurveyTitle') => $survey_data['title'],
get_lang('SurveySubTitle') => $survey_data['subtitle'],
get_lang('SurveyTitle') => cut(strip_tags($survey_data['title']), $max),
get_lang('SurveySubTitle') => cut(strip_tags($survey_data['subtitle']), $max),
get_lang('Dates') => $fromUntil,
get_lang('SurveyIntroduction') => $survey_data['intro'],
get_lang('SurveyIntroduction') => cut(strip_tags($survey_data['intro']), $max)
];

$table = new HTML_Table(['id' => 'pdf_table', 'class' => 'table']);
Expand Down

0 comments on commit a553afa

Please sign in to comment.