mario-education 2.4.168-level → 2.4.169-level
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +6 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32247,7 +32247,7 @@ var useExportSessionCsv = function useExportSessionCsv() {
|
|
|
32247
32247
|
var questionAnswer = answers.find(function (i) {
|
|
32248
32248
|
return i.questionId === question.id;
|
|
32249
32249
|
});
|
|
32250
|
-
return "\n" + studentName + "," + studentEmail + "," + escapeCell(htmlToText(question.text)) + "," +
|
|
32250
|
+
return "\n" + studentName + "," + studentEmail + "," + escapeCell(htmlToText(question.text)) + "," + toAnswerCsv(question.type, questionAnswer === null || questionAnswer === void 0 ? void 0 : questionAnswer.text) + "," + teacherName + "," + startTime;
|
|
32251
32251
|
}).join('');
|
|
32252
32252
|
};
|
|
32253
32253
|
|
|
@@ -32262,12 +32262,16 @@ var useExportSessionCsv = function useExportSessionCsv() {
|
|
|
32262
32262
|
}) : null;
|
|
32263
32263
|
var questionText = learningAnswer ? "" + learningAnswer.text + (learningAnswer.questionText ? "/" + learningAnswer.questionText : '') : '';
|
|
32264
32264
|
var ans = questionAnswer.length > 1 ? questionAnswer === null || questionAnswer === void 0 ? void 0 : questionAnswer[1] : "";
|
|
32265
|
-
return questionText ? "\n" + studentName + "," + studentEmail + "," + escapeCell(questionText) + "," +
|
|
32265
|
+
return questionText ? "\n" + studentName + "," + studentEmail + "," + escapeCell(questionText) + "," + ((ans === null || ans === void 0 ? void 0 : ans.length) > 0 ? ans + "%" : '') + "," + teacherName + "," + startTime : '';
|
|
32266
32266
|
});
|
|
32267
32267
|
return answerConverted.join('');
|
|
32268
32268
|
});
|
|
32269
32269
|
};
|
|
32270
32270
|
|
|
32271
|
+
var toAnswerCsv = function toAnswerCsv(type, value) {
|
|
32272
|
+
return type === QuestionType.Rating ? !!(value !== null && value !== void 0 && value.length) ? value + "%" : '' : escapeCell(value || "");
|
|
32273
|
+
};
|
|
32274
|
+
|
|
32271
32275
|
return {
|
|
32272
32276
|
exportSessionsCsv: exportSessionsCsv
|
|
32273
32277
|
};
|