@digabi/exam-engine-core 19.12.1-delta.2 → 19.12.1-delta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/main-bundle.js +1 -1
- package/package.json +2 -2
- package/dist/components/exam/undo-view.d.ts +0 -36
- package/dist/components/exam/undo-view.d.ts.map +0 -1
- package/dist/components/exam/undo-view.js +0 -162
- package/dist/components/exam/undo-view.js.map +0 -1
- package/dist/components/results/isExamFinishPageHook.d.ts +0 -2
- package/dist/components/results/isExamFinishPageHook.d.ts.map +0 -1
- package/dist/components/results/isExamFinishPageHook.js +0 -7
- package/dist/components/results/isExamFinishPageHook.js.map +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@digabi/exam-engine-core",
|
3
|
-
"version": "19.12.1-delta.
|
3
|
+
"version": "19.12.1-delta.3",
|
4
4
|
"main": "dist/main-bundle.js",
|
5
5
|
"types": "dist/index.d.ts",
|
6
6
|
"author": "Matriculation Examination Board, Finland",
|
@@ -58,5 +58,5 @@
|
|
58
58
|
"webpack-bundle-analyzer": "^4.1.0",
|
59
59
|
"webpack-cli": "^5.0.2"
|
60
60
|
},
|
61
|
-
"gitHead": "
|
61
|
+
"gitHead": "4c3fde20dd9c6afe0388ca957876bbef635399c3"
|
62
62
|
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import moment from 'moment';
|
3
|
-
import { RichTextAnswer, TextAnswer } from '../../types/ExamAnswer';
|
4
|
-
export interface AnswerHistoryEntry {
|
5
|
-
type: 'text' | 'richText';
|
6
|
-
value: string;
|
7
|
-
characterCount: number;
|
8
|
-
answerTime: moment.Moment;
|
9
|
-
}
|
10
|
-
export interface UndoViewProps {
|
11
|
-
close: () => void;
|
12
|
-
restoreAnswer: (examAnswer: TextAnswer | RichTextAnswer) => void;
|
13
|
-
questionId: number;
|
14
|
-
title: string;
|
15
|
-
}
|
16
|
-
interface UndoViewState {
|
17
|
-
answers: AnswerHistoryEntry[];
|
18
|
-
selectedAnswerIndex: number;
|
19
|
-
loading: boolean;
|
20
|
-
loadRetryTimeout: number | null;
|
21
|
-
}
|
22
|
-
export declare class UndoView extends React.PureComponent<UndoViewProps, UndoViewState> {
|
23
|
-
private source;
|
24
|
-
constructor(props: UndoViewProps);
|
25
|
-
toggleBodyScroll: (scrollEnabled: boolean) => boolean;
|
26
|
-
componentDidMount(): void;
|
27
|
-
componentWillUnmount(): void;
|
28
|
-
componentDidUpdate(prevProps: UndoViewProps): void;
|
29
|
-
private overlayClicked;
|
30
|
-
private keydownListener;
|
31
|
-
private fetchAnswerHistory;
|
32
|
-
private close;
|
33
|
-
render(): React.JSX.Element;
|
34
|
-
}
|
35
|
-
export {};
|
36
|
-
//# sourceMappingURL=undo-view.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"undo-view.d.ts","sourceRoot":"","sources":["../../../src/components/exam/undo-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,MAAM,MAAM,QAAQ,CAAA;AAI3B,OAAO,EAAc,cAAc,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAI/E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,KAAK,IAAI,CAAA;IAChE,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,aAAa;IACrB,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,mBAAmB,EAAE,MAAM,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AA+FD,qBAAa,QAAS,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC;IAC7E,OAAO,CAAC,MAAM,CAAuB;gBAEzB,KAAK,EAAE,aAAa;IAUhC,gBAAgB,kBAAmB,OAAO,aAC0C;IAE7E,iBAAiB;IAMjB,oBAAoB;IAMpB,kBAAkB,CAAC,SAAS,EAAE,aAAa;IAMlD,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,eAAe,CAQtB;YAEa,kBAAkB;IAmBhC,OAAO,CAAC,KAAK;IASN,MAAM;CAgDd"}
|
@@ -1,162 +0,0 @@
|
|
1
|
-
import axios from 'axios';
|
2
|
-
import React from 'react';
|
3
|
-
//import { Spinner } from '../components/spinner'
|
4
|
-
import moment from 'moment';
|
5
|
-
import { UndoHistoryEntry } from './UndoHistoryEntry';
|
6
|
-
import FocusTrap from 'focus-trap-react';
|
7
|
-
import { useExamTranslation } from '../../i18n';
|
8
|
-
const CancelToken = axios.CancelToken;
|
9
|
-
function toAnswerHistoryEntry(answer) {
|
10
|
-
return {
|
11
|
-
type: answer.type,
|
12
|
-
value: answer.value,
|
13
|
-
answerTime: moment(answer.answer_time),
|
14
|
-
characterCount: answer.character_count
|
15
|
-
};
|
16
|
-
}
|
17
|
-
function AnswerDisplay(props) {
|
18
|
-
const { selectedAnswer } = props;
|
19
|
-
return selectedAnswer ? (selectedAnswer.type === 'richText' ? (React.createElement("div", { className: "k-undo-view-answer-content js-undo-answer-detail", dangerouslySetInnerHTML: { __html: selectedAnswer.value } })) : (React.createElement("div", { className: "k-undo-view-answer-content js-undo-answer-detail plainText" }, selectedAnswer.value))) : null;
|
20
|
-
}
|
21
|
-
function BottomBar(props) {
|
22
|
-
const { selectedAnswer, selectedAnswerIndex, restoreAnswer, questionId } = props;
|
23
|
-
const disableRestoreButton = !selectedAnswer || selectedAnswerIndex === 0;
|
24
|
-
return (React.createElement("div", { className: "k-undo-view-bottom-bar" },
|
25
|
-
React.createElement("button", { className: "k-button-default k-button js-restore-answer-button", disabled: disableRestoreButton, onClick: () => selectedAnswer && restoreAnswer({ ...selectedAnswer, questionId }) },
|
26
|
-
React.createElement(RestoreButtonLabel, null))));
|
27
|
-
}
|
28
|
-
function escapedHtml(html) {
|
29
|
-
const container = document.createElement('div');
|
30
|
-
container.innerHTML = html;
|
31
|
-
return container.innerText;
|
32
|
-
}
|
33
|
-
function getAnswerText(answer) {
|
34
|
-
const fullText = answer.type === 'text' ? answer.value : escapedHtml(answer.value);
|
35
|
-
return fullText.replace(/\s+/g, ' ').trim();
|
36
|
-
}
|
37
|
-
function truncateAnswer(answer, length = 50) {
|
38
|
-
const answerText = getAnswerText(answer);
|
39
|
-
if (answerText.length <= length) {
|
40
|
-
return answerText;
|
41
|
-
}
|
42
|
-
const separator = '…';
|
43
|
-
const charsToShow = length - separator.length;
|
44
|
-
const startChars = Math.ceil(charsToShow / 2);
|
45
|
-
const endChars = charsToShow - startChars;
|
46
|
-
return answerText.substr(0, startChars) + separator + answerText.substr(answerText.length - endChars);
|
47
|
-
}
|
48
|
-
function countWords(answer) {
|
49
|
-
const text = getAnswerText(answer);
|
50
|
-
return text.length === 0 ? 0 : text.split(/\s+/gi).filter(s => s.length > 0).length;
|
51
|
-
}
|
52
|
-
function countCharacters(answer) {
|
53
|
-
const text = getAnswerText(answer);
|
54
|
-
return text.replace(/\s/g, '').length;
|
55
|
-
}
|
56
|
-
function countScreenshots(answer) {
|
57
|
-
const answerElement = document.createElement('div');
|
58
|
-
answerElement.innerHTML = answer.value;
|
59
|
-
const equationImageSelector = 'img[src^="/math.svg"], img[src^="data:image/svg+xml"]';
|
60
|
-
const imageCount = answerElement.querySelectorAll('img').length;
|
61
|
-
const emptyImageCount = answerElement.querySelectorAll('img[src=""]').length;
|
62
|
-
const equationCount = answerElement.querySelectorAll(equationImageSelector).length;
|
63
|
-
return imageCount - equationCount - emptyImageCount;
|
64
|
-
}
|
65
|
-
export class UndoView extends React.PureComponent {
|
66
|
-
constructor(props) {
|
67
|
-
super(props);
|
68
|
-
this.source = CancelToken.source();
|
69
|
-
this.toggleBodyScroll = (scrollEnabled) => document.documentElement.classList.toggle('k-exam-body-no-scroll', !scrollEnabled);
|
70
|
-
this.keydownListener = (event) => {
|
71
|
-
if (event.keyCode === 13) {
|
72
|
-
const selectedAnswer = this.state.answers[this.state.selectedAnswerIndex];
|
73
|
-
this.props.restoreAnswer({ ...selectedAnswer, questionId: this.props.questionId });
|
74
|
-
this.close();
|
75
|
-
}
|
76
|
-
else if (event.keyCode === 27) {
|
77
|
-
this.close();
|
78
|
-
}
|
79
|
-
};
|
80
|
-
this.state = {
|
81
|
-
answers: [],
|
82
|
-
selectedAnswerIndex: 0,
|
83
|
-
loading: true,
|
84
|
-
loadRetryTimeout: null
|
85
|
-
};
|
86
|
-
}
|
87
|
-
componentDidMount() {
|
88
|
-
this.toggleBodyScroll(false);
|
89
|
-
document.addEventListener('keydown', this.keydownListener, false);
|
90
|
-
void this.fetchAnswerHistory(this.props.questionId);
|
91
|
-
}
|
92
|
-
componentWillUnmount() {
|
93
|
-
this.source.cancel();
|
94
|
-
document.removeEventListener('keydown', this.keydownListener, false);
|
95
|
-
this.toggleBodyScroll(true);
|
96
|
-
}
|
97
|
-
componentDidUpdate(prevProps) {
|
98
|
-
if (this.props.questionId !== prevProps.questionId) {
|
99
|
-
void this.fetchAnswerHistory(this.props.questionId);
|
100
|
-
}
|
101
|
-
}
|
102
|
-
overlayClicked(event) {
|
103
|
-
const targetClass = event.target.className;
|
104
|
-
if (targetClass.includes('js-undo-overlay')) {
|
105
|
-
this.close();
|
106
|
-
}
|
107
|
-
}
|
108
|
-
async fetchAnswerHistory(questionId) {
|
109
|
-
try {
|
110
|
-
const answerHistoryResult = await axios.get(`/rest/answer-history/${questionId}`, {
|
111
|
-
cancelToken: this.source.token
|
112
|
-
});
|
113
|
-
const answerHistory = answerHistoryResult.data;
|
114
|
-
const answers = answerHistory.map(toAnswerHistoryEntry);
|
115
|
-
this.setState({ answers, selectedAnswerIndex: 0, loading: false, loadRetryTimeout: null });
|
116
|
-
}
|
117
|
-
catch (error) {
|
118
|
-
if (!axios.isCancel(error)) {
|
119
|
-
this.setState({
|
120
|
-
loadRetryTimeout: window.setTimeout(() => {
|
121
|
-
void this.fetchAnswerHistory(questionId);
|
122
|
-
}, 4000)
|
123
|
-
});
|
124
|
-
}
|
125
|
-
}
|
126
|
-
}
|
127
|
-
close() {
|
128
|
-
const timeout = this.state.loadRetryTimeout;
|
129
|
-
if (timeout) {
|
130
|
-
clearTimeout(timeout);
|
131
|
-
}
|
132
|
-
this.source.cancel();
|
133
|
-
this.props.close();
|
134
|
-
}
|
135
|
-
render() {
|
136
|
-
const selectedAnswer = this.state.answers[this.state.selectedAnswerIndex];
|
137
|
-
const now = moment();
|
138
|
-
return (React.createElement(FocusTrap, null,
|
139
|
-
React.createElement("div", { onClick: this.overlayClicked.bind(this), className: "k-overlay js-undo-overlay", "aria-modal": "true" },
|
140
|
-
React.createElement("div", { id: "undo", className: "k-undo-view" },
|
141
|
-
React.createElement("div", { className: "k-undo-view-header js-undo-view-header" },
|
142
|
-
React.createElement("h3", { className: "k-undo-view-title js-undo-view-title" }, this.props.title),
|
143
|
-
React.createElement(CloseButton, { close: this.close.bind(this) })),
|
144
|
-
this.state.loading ? ('Loading...') : (
|
145
|
-
//<Spinner />
|
146
|
-
React.createElement("div", { className: "k-undo-view-content" },
|
147
|
-
React.createElement("div", { className: "k-undo-view-answer-index js-undo-answer-index" }, this.state.answers.map((answer, index) => (React.createElement(UndoHistoryEntry, { key: answer.answerTime.unix(), answerIndex: index, selected: index === this.state.selectedAnswerIndex, onChange: index => this.setState({ selectedAnswerIndex: index }), croppedAnswer: truncateAnswer(answer), minutesSinceAnswer: now.diff(answer.answerTime, 'minutes'), wordCount: countWords(answer), characterCount: countCharacters(answer), screenshotCount: countScreenshots(answer) })))),
|
148
|
-
React.createElement("div", { className: "k-undo-view-right-panel" },
|
149
|
-
React.createElement(AnswerDisplay, { selectedAnswer: selectedAnswer }),
|
150
|
-
React.createElement(BottomBar, { selectedAnswer: selectedAnswer, selectedAnswerIndex: this.state.selectedAnswerIndex, restoreAnswer: this.props.restoreAnswer, questionId: this.props.questionId }))))))));
|
151
|
-
}
|
152
|
-
}
|
153
|
-
const CloseButton = ({ close }) => {
|
154
|
-
const { t } = useExamTranslation();
|
155
|
-
return (React.createElement("div", null,
|
156
|
-
React.createElement("img", { src: "img/closeButton.svg", id: "closeUndoDialogButton", className: "k-undo-view-close-overlay-button js-close-undo-dialog-button", onClick: close, tabIndex: 0, role: "button", "aria-label": t('undo.close') })));
|
157
|
-
};
|
158
|
-
const RestoreButtonLabel = () => {
|
159
|
-
const { t } = useExamTranslation();
|
160
|
-
return React.createElement("div", null, t('undo.restoreAnswer'));
|
161
|
-
};
|
162
|
-
//# sourceMappingURL=undo-view.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"undo-view.js","sourceRoot":"","sources":["../../../src/components/exam/undo-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,iDAAiD;AACjD,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAG/C,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;AA4BrC,SAAS,oBAAoB,CAAC,MAA2B;IACvD,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;QACtC,cAAc,EAAE,MAAM,CAAC,eAAe;KACvC,C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E,CACF,CACP,CACG,CACF,CACI,CACb,CAAA;IACH,CAAC;CACF;AAED,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAyB,EAAE,EAAE;IACvD,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,CACL;QACE,6BACE,GAAG,EAAC,qBAAqB,EACzB,EAAE,EAAC,uBAAuB,EAC1B,SAAS,EAAC,8DAA8D,EACxE,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,CAAC,EACX,IAAI,EAAC,QAAQ,gBACD,CAAC,CAAC,YAAY,CAAY,GACtC,CACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,iCAAM,CAAC,CAAC,oBAAoB,CAAC,CAAO,CAAA;AAC7C,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isExamFinishPageHook.d.ts","sourceRoot":"","sources":["../../../src/components/results/isExamFinishPageHook.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,2BAA2B,eAGvC,CAAA"}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { useContext } from 'react';
|
2
|
-
import { ResultsContext } from '../context/ResultsContext';
|
3
|
-
export const useIsStudentsFinishExamPage = () => {
|
4
|
-
const { gradingStructure } = useContext(ResultsContext);
|
5
|
-
return gradingStructure === undefined;
|
6
|
-
};
|
7
|
-
//# sourceMappingURL=isExamFinishPageHook.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isExamFinishPageHook.js","sourceRoot":"","sources":["../../../src/components/results/isExamFinishPageHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACvD,OAAO,gBAAgB,KAAK,SAAS,CAAA;AACvC,CAAC,CAAA"}
|