Skip to content

Commit bb08ff4

Browse files
Mutugiiidogi
andauthored
manager: smoother survey export pdf markdown (fixes #9071) (#9108)
Co-authored-by: dogi <[email protected]>
1 parent 7af465b commit bb08ff4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "planet",
33
"license": "AGPL-3.0",
4-
"version": "0.20.26",
4+
"version": "0.20.27",
55
"myplanet": {
6-
"latest": "v0.31.56",
7-
"min": "v0.30.56"
6+
"latest": "v0.31.67",
7+
"min": "v0.30.67"
88
},
99
"scripts": {
1010
"ng": "ng",

src/app/submissions/submissions.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ export class SubmissionsService {
343343
const question = exam.questions[i];
344344
if (question.type !== 'select' && question.type !== 'selectMultiple' && question.type !== 'ratingScale') { continue; }
345345
question.index = i;
346-
docContent.push({ text: `Q${i + 1}: ${question.body}` });
346+
docContent.push({ stack: htmlToPdfmake(`<strong>Q${i + 1}:</strong> ${converter.makeHtml(question.body)}`) });
347347
if (question.type === 'selectMultiple') {
348348
const barAgg = this.aggregateQuestionResponses(question, updatedSubmissions, 'percent', 'users');
349349
const barImg = await this.generateChartImage(barAgg);
@@ -544,7 +544,7 @@ export class SubmissionsService {
544544
questionOutput(submission, answerIndexes, includeQuestions, includeAnswers) {
545545
const exportText = (text, index, label: 'Question' | 'Response') => {
546546
const alignment = label === 'Response' ? 'right' : 'left';
547-
return `<div style="text-align: ${alignment};"><strong>${label} ${index + 1}:</strong><br>${text}</div>`;
547+
return `<div style="text-align: ${alignment};"><strong>${label} ${index + 1}:</strong><br>${converter.makeHtml(text)}</div>`;
548548
};
549549
return (question, questionIndex) =>
550550
(includeQuestions ? exportText(question, questionIndex, 'Question') : '') +

0 commit comments

Comments
 (0)