mario-education 2.4.168-level → 2.4.170-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.modern.js
CHANGED
|
@@ -32202,7 +32202,7 @@ var useExportSessionCsv = function useExportSessionCsv() {
|
|
|
32202
32202
|
var questionSummarize = questions.filter(function (item) {
|
|
32203
32203
|
return item.type == QuestionType.Summarize && !!item.isBeforeSession;
|
|
32204
32204
|
});
|
|
32205
|
-
var
|
|
32205
|
+
var questionRatings2 = questions.filter(function (item) {
|
|
32206
32206
|
return !!item.isBeforeSession;
|
|
32207
32207
|
}).slice(7, !isCheckDomainIskenya ? 13 : 12);
|
|
32208
32208
|
var afterSessionQuestions = questions.filter(function (item) {
|
|
@@ -32214,17 +32214,24 @@ var useExportSessionCsv = function useExportSessionCsv() {
|
|
|
32214
32214
|
sessionQuestions.push(questionSummarize[0]);
|
|
32215
32215
|
}
|
|
32216
32216
|
|
|
32217
|
-
sessionQuestions = [].concat(sessionQuestions, questionRatings,
|
|
32217
|
+
sessionQuestions = [].concat(sessionQuestions, questionRatings, questionRatings2);
|
|
32218
32218
|
var content = sessions.map(function (session) {
|
|
32219
|
-
var studentName = escapeCell(session.studentName);
|
|
32220
|
-
var studentEmail = escapeCell(session.studentEmail ? session.studentEmail : "" + session.studentId);
|
|
32221
|
-
var teacherName = escapeCell(session.teacherName);
|
|
32222
|
-
var startTime = utcToLocalTime(session.startTime, "DD-MM-YYYY HH:mm:ss");
|
|
32223
32219
|
var answers = session.answers,
|
|
32224
|
-
|
|
32225
|
-
|
|
32226
|
-
|
|
32227
|
-
|
|
32220
|
+
isUnlocked = session.isUnlocked,
|
|
32221
|
+
startTime = session.startTime,
|
|
32222
|
+
studentId = session.studentId,
|
|
32223
|
+
studentName = session.studentName,
|
|
32224
|
+
teacherName = session.teacherName,
|
|
32225
|
+
studentEmail = session.studentEmail,
|
|
32226
|
+
strategyAnswers = session.strategyAnswers,
|
|
32227
|
+
isOneToOneConversation = session.isOneToOneConversation;
|
|
32228
|
+
var studentNameCell = escapeCell(studentName);
|
|
32229
|
+
var studentEmailCell = escapeCell(studentEmail ? studentEmail : "" + studentId);
|
|
32230
|
+
var teacherNameCell = escapeCell(teacherName);
|
|
32231
|
+
var startTimeCell = utcToLocalTime(startTime, "DD-MM-YYYY HH:mm:ss");
|
|
32232
|
+
var questionsContent = questionToCsv(sessionQuestions, answers, studentNameCell, studentEmailCell, teacherNameCell, startTimeCell);
|
|
32233
|
+
var learningStrategyQuestionsContent = isOneToOneConversation ? strategyQuestionsToCsv(strategyQuestions, strategyAnswers, studentNameCell, studentEmailCell, teacherNameCell, startTimeCell) : '';
|
|
32234
|
+
var afterSessionQuestionsContent = isOneToOneConversation && isUnlocked ? questionToCsv(afterSessionQuestions, answers, studentNameCell, studentEmailCell, teacherNameCell, startTimeCell) : '';
|
|
32228
32235
|
return "" + questionsContent + learningStrategyQuestionsContent + afterSessionQuestionsContent;
|
|
32229
32236
|
}).join('');
|
|
32230
32237
|
return "" + CSV_PREFIX + headers + encodeURIComponent(content);
|
|
@@ -32244,7 +32251,7 @@ var useExportSessionCsv = function useExportSessionCsv() {
|
|
|
32244
32251
|
var questionAnswer = answers.find(function (i) {
|
|
32245
32252
|
return i.questionId === question.id;
|
|
32246
32253
|
});
|
|
32247
|
-
return "\n" + studentName + "," + studentEmail + "," + escapeCell(htmlToText(question.text)) + "," +
|
|
32254
|
+
return "\n" + studentName + "," + studentEmail + "," + escapeCell(htmlToText(question.text)) + "," + toAnswerCsv(question.type, questionAnswer === null || questionAnswer === void 0 ? void 0 : questionAnswer.text) + "," + teacherName + "," + startTime;
|
|
32248
32255
|
}).join('');
|
|
32249
32256
|
};
|
|
32250
32257
|
|
|
@@ -32259,12 +32266,16 @@ var useExportSessionCsv = function useExportSessionCsv() {
|
|
|
32259
32266
|
}) : null;
|
|
32260
32267
|
var questionText = learningAnswer ? "" + learningAnswer.text + (learningAnswer.questionText ? "/" + learningAnswer.questionText : '') : '';
|
|
32261
32268
|
var ans = questionAnswer.length > 1 ? questionAnswer === null || questionAnswer === void 0 ? void 0 : questionAnswer[1] : "";
|
|
32262
|
-
return questionText ? "\n" + studentName + "," + studentEmail + "," + escapeCell(questionText) + "," +
|
|
32269
|
+
return questionText ? "\n" + studentName + "," + studentEmail + "," + escapeCell(questionText) + "," + ((ans === null || ans === void 0 ? void 0 : ans.length) > 0 ? ans + "%" : '') + "," + teacherName + "," + startTime : '';
|
|
32263
32270
|
});
|
|
32264
32271
|
return answerConverted.join('');
|
|
32265
32272
|
});
|
|
32266
32273
|
};
|
|
32267
32274
|
|
|
32275
|
+
var toAnswerCsv = function toAnswerCsv(type, value) {
|
|
32276
|
+
return type === QuestionType.Rating ? !!(value !== null && value !== void 0 && value.length) ? value + "%" : '' : escapeCell(value || "");
|
|
32277
|
+
};
|
|
32278
|
+
|
|
32268
32279
|
return {
|
|
32269
32280
|
exportSessionsCsv: exportSessionsCsv
|
|
32270
32281
|
};
|