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