@digabi/exam-engine-core 19.17.0 → 19.17.1-abitti2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/examServerApi.d.ts.map +1 -1
- package/dist/__tests__/examServerApi.js +1 -0
- package/dist/__tests__/examServerApi.js.map +1 -1
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/context/CommonExamContext.d.ts +1 -0
- package/dist/components/context/CommonExamContext.d.ts.map +1 -1
- package/dist/components/context/CommonExamContext.js +2 -1
- package/dist/components/context/CommonExamContext.js.map +1 -1
- package/dist/components/exam/Exam.d.ts +1 -0
- package/dist/components/exam/Exam.d.ts.map +1 -1
- package/dist/components/exam/Exam.js.map +1 -1
- package/dist/components/shared/AudioTest.d.ts.map +1 -1
- package/dist/components/shared/AudioTest.js +7 -2
- package/dist/components/shared/AudioTest.js.map +1 -1
- package/dist/components/shared/internal/RestrictedAudioPlayer.d.ts.map +1 -1
- package/dist/components/shared/internal/RestrictedAudioPlayer.js +13 -2
- package/dist/components/shared/internal/RestrictedAudioPlayer.js.map +1 -1
- package/dist/main-bundle.js +1 -1
- package/dist/store/audio/reducer.d.ts +3 -0
- package/dist/store/audio/reducer.d.ts.map +1 -1
- package/dist/store/audio/reducer.js.map +1 -1
- package/dist/store/audio/sagas.d.ts.map +1 -1
- package/dist/store/audio/sagas.js +40 -5
- package/dist/store/audio/sagas.js.map +1 -1
- package/dist/types/ExamServerAPI.d.ts +8 -0
- package/dist/types/ExamServerAPI.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/components/exam/ProceedToExamineAnswers.d.ts +0 -5
- package/dist/components/exam/ProceedToExamineAnswers.d.ts.map +0 -1
- package/dist/components/exam/ProceedToExamineAnswers.js +0 -20
- package/dist/components/exam/ProceedToExamineAnswers.js.map +0 -1
- package/dist/components/results/isExamExaminePageHook.d.ts +0 -2
- package/dist/components/results/isExamExaminePageHook.d.ts.map +0 -1
- package/dist/components/results/isExamExaminePageHook.js +0 -7
- package/dist/components/results/isExamExaminePageHook.js.map +0 -1
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ActionType } from 'typesafe-actions';
|
2
2
|
import * as actions from './actions';
|
3
3
|
import { AudioPlaybackError, RestrictedAudioId } from '../..';
|
4
|
+
import { MutableRefObject } from 'react';
|
4
5
|
type AudioAction = ActionType<typeof actions>;
|
5
6
|
export interface Audio {
|
6
7
|
/** The source filename */
|
@@ -9,6 +10,8 @@ export interface Audio {
|
|
9
10
|
duration: number;
|
10
11
|
/** An unique identifier for each restricted audio element. For compatibility with KTP. */
|
11
12
|
restrictedAudioId?: number;
|
13
|
+
/** Ref to audio element */
|
14
|
+
audioRef?: MutableRefObject<HTMLAudioElement | null>;
|
12
15
|
}
|
13
16
|
export interface NowPlaying {
|
14
17
|
audio: Audio;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/audio/reducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/audio/reducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAExC,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAE7C,MAAM,WAAW,KAAK;IACpB,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CACrD;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,KAAK,CAAA;IACZ,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,iBAAiB,EAAE,kBAAkB,CAAC,CAAA;IAC9D,UAAU,EAAE,UAAU,GAAG,IAAI,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;CACjD;AAQD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,wBAA2B,EAAE,MAAM,EAAE,WAAW,GAAG,UAAU,CA8CtG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../../src/store/audio/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;
|
1
|
+
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../../src/store/audio/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AA8B9B,MAAM,YAAY,GAAe;IAC/B,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,EAAE;CAClB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,QAAoB,YAAY,EAAE,MAAmB;IACxF,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,YAAY,CAAC,CAAC,CAAC;YAClB,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAA;YAC5B,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAA;YAC/D,OAAO,EAAE,GAAG,KAAK,EAAE,UAAU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KAAK,EAAE,mBAAmB,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;YACxD,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC1C,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAA;QAC7B,CAAC;QACD,KAAK,qBAAqB;YACxB,OAAO,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;QACvC,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAA;YACxC,MAAM,UAAU,GAAG,EAAE,GAAG,KAAK,CAAC,UAAW,EAAE,iBAAiB,EAAE,CAAA;YAC9D,OAAO,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,CAAA;QACjC,CAAC;QACD;YACE,OAAO,KAAK,CAAA;IAChB,CAAC;AACH,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sagas.d.ts","sourceRoot":"","sources":["../../../src/store/audio/sagas.ts"],"names":[],"mappings":"AAWA,OAAO,EAAyB,aAAa,EAAE,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"sagas.d.ts","sourceRoot":"","sources":["../../../src/store/audio/sagas.ts"],"names":[],"mappings":"AAWA,OAAO,EAAyB,aAAa,EAAE,MAAM,OAAO,CAAA;AA0E5D,MAAM,CAAC,OAAO,UAAW,SAAS,CAAC,aAAa,EAAE,aAAa,4EAE9D"}
|
@@ -2,25 +2,60 @@ import { call, delay, put, select, takeEvery } from 'redux-saga/effects';
|
|
2
2
|
import { countdown } from '../countdown';
|
3
3
|
import { getPlaybackTimes } from '../selectors';
|
4
4
|
import { hideAudioError, playAudioFinished, playAudioStarted, showAudioError, updateRemaining } from './actions';
|
5
|
+
async function loadAndPlayRestrictedAudio(examServerApi, restrictedAudioId, audio, playbackTimes) {
|
6
|
+
try {
|
7
|
+
const response = await examServerApi.getRestrictedAudio('', restrictedAudioId, playbackTimes);
|
8
|
+
const source = audio.querySelector('source');
|
9
|
+
source.src = URL.createObjectURL(response);
|
10
|
+
audio.load();
|
11
|
+
void audio.play();
|
12
|
+
return {
|
13
|
+
response: 'ok',
|
14
|
+
cleanup: () => {
|
15
|
+
URL.revokeObjectURL(source.src);
|
16
|
+
}
|
17
|
+
};
|
18
|
+
}
|
19
|
+
catch (_) {
|
20
|
+
return { response: 'other-error', cleanup: () => { } };
|
21
|
+
}
|
22
|
+
}
|
23
|
+
function handleAbitti2Audio(examServerApi, audio, playbackTimes) {
|
24
|
+
if (playbackTimes != null && audio.restrictedAudioId != null) {
|
25
|
+
return loadAndPlayRestrictedAudio(examServerApi, audio.restrictedAudioId, audio.audioRef.current, playbackTimes);
|
26
|
+
}
|
27
|
+
else {
|
28
|
+
void audio.audioRef.current.play();
|
29
|
+
return { response: 'ok' };
|
30
|
+
}
|
31
|
+
}
|
32
|
+
function* handleAbitti1Audio(examServerApi, audio, playbackTimes) {
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
34
|
+
const response = playbackTimes != null && audio.restrictedAudioId != null
|
35
|
+
? yield call(examServerApi.playRestrictedAudio, audio.src, audio.restrictedAudioId, playbackTimes)
|
36
|
+
: yield call(examServerApi.playAudio, audio.src);
|
37
|
+
return { response };
|
38
|
+
}
|
5
39
|
function* performPlayAudio(examServerApi, action) {
|
6
40
|
const audio = action.payload;
|
7
41
|
try {
|
8
42
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
9
43
|
const playbackTimes = audio.restrictedAudioId != null ? yield select(getPlaybackTimes(audio.restrictedAudioId)) : undefined;
|
10
44
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
11
|
-
const
|
12
|
-
? yield
|
13
|
-
: yield
|
14
|
-
if (response === 'ok') {
|
45
|
+
const result = audio.audioRef
|
46
|
+
? yield handleAbitti2Audio(examServerApi, audio, playbackTimes)
|
47
|
+
: yield handleAbitti1Audio(examServerApi, audio, playbackTimes);
|
48
|
+
if (result.response === 'ok') {
|
15
49
|
yield put(playAudioStarted(audio));
|
16
50
|
yield call(countdown, audio.duration, updateRemaining);
|
17
51
|
yield put(playAudioFinished());
|
18
52
|
}
|
19
53
|
else {
|
20
|
-
yield put(showAudioError(audio, response));
|
54
|
+
yield put(showAudioError(audio, result.response));
|
21
55
|
yield delay(5000);
|
22
56
|
yield put(hideAudioError(audio));
|
23
57
|
}
|
58
|
+
result.cleanup && result.cleanup();
|
24
59
|
}
|
25
60
|
catch (error) {
|
26
61
|
console.error(error);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sagas.js","sourceRoot":"","sources":["../../../src/store/audio/sagas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EACL,cAAc,EAEd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EAChB,MAAM,WAAW,CAAA;
|
1
|
+
{"version":3,"file":"sagas.js","sourceRoot":"","sources":["../../../src/store/audio/sagas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EACL,cAAc,EAEd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EAChB,MAAM,WAAW,CAAA;AAMlB,KAAK,UAAU,0BAA0B,CACvC,aAA4B,EAC5B,iBAAyB,EACzB,KAAuB,EACvB,aA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AC,KAAK,CAAC,CAAC,CAAA;QAClC,CAAC;QACD,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,CAAA;IACpC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,MAAM,CAAC,OAAO,SAAS,CAAC,CAAC,SAAS,CAAC,aAA4B;IAC7D,MAAM,SAAS,CAAC,YAAY,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAA;AAChE,CAAC"}
|
@@ -59,6 +59,14 @@ export interface ExamServerAPI {
|
|
59
59
|
* @param playbackTimes How many times this audio has been listened to already.
|
60
60
|
*/
|
61
61
|
playRestrictedAudio: (src: string, restrictedAudioId: number, playbackTimes: number) => Promise<AudioPlaybackResponse>;
|
62
|
+
/**
|
63
|
+
* Get restricted audio file in a blob. The promise should be resolved with blob
|
64
|
+
* when the audio file has be loaded or rejected with an error response if an error occurs.
|
65
|
+
*
|
66
|
+
* @param restrictedAudioId A number that uniquely identifies each restricted audio element.
|
67
|
+
* @param playbackTimes How many times this audio has been listened to already.
|
68
|
+
*/
|
69
|
+
getRestrictedAudio: (src: string, restrictedAudioId: number, playbackTimes: number) => Promise<Blob>;
|
62
70
|
/** Select another answer version from answer history. Return undefined to cancel. Optional feature. */
|
63
71
|
selectAnswerVersion?: (questionId: QuestionId, questionTitle: string) => Promise<ExamAnswer | undefined>;
|
64
72
|
/** Save screenshot to server. Should return the URL to the saved screenshot. */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExamServerAPI.d.ts","sourceRoot":"","sources":["../../src/types/ExamServerAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAErD,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AACtD;;;;;;;;;;;;;GAaG;AACH,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a,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IACxG,gFAAgF;IAChF,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;CACzB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@digabi/exam-engine-core",
|
3
|
-
"version": "19.17.0",
|
3
|
+
"version": "19.17.1-abitti2.1.0",
|
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": "018d230ff7826f135f27fa974b4306a4c7955c41"
|
62
62
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ProceedToExamineAnswers.d.ts","sourceRoot":"","sources":["../../../src/components/exam/ProceedToExamineAnswers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,iBAAS,uBAAuB,sBA4B/B;;AAED,wBAAkD"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
2
|
-
import { useExamTranslation } from '../../i18n';
|
3
|
-
import { ExamContext } from '../context/ExamContext';
|
4
|
-
function ProceedToExamineAnswers() {
|
5
|
-
const { examServerApi } = useContext(ExamContext);
|
6
|
-
const { examineExam } = examServerApi;
|
7
|
-
const { t } = useExamTranslation();
|
8
|
-
const goToInspectAnswers = () => {
|
9
|
-
if (!examineExam) {
|
10
|
-
return;
|
11
|
-
}
|
12
|
-
examineExam();
|
13
|
-
window.scrollTo(0, 0);
|
14
|
-
};
|
15
|
-
return (React.createElement("div", { className: "e-examine-exam" },
|
16
|
-
React.createElement("button", { className: "e-button", id: "examineExam", onClick: goToInspectAnswers, "aria-describedby": "examineExamInstructions" }, t('examine-exam.examine')),
|
17
|
-
React.createElement("div", { className: "e-examine-exam-instructions", id: "examineExamInstructions" }, t('examine-exam.instructions'))));
|
18
|
-
}
|
19
|
-
export default React.memo(ProceedToExamineAnswers);
|
20
|
-
//# sourceMappingURL=ProceedToExamineAnswers.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ProceedToExamineAnswers.js","sourceRoot":"","sources":["../../../src/components/exam/ProceedToExamineAnswers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGpD,SAAS,uBAAuB;IAC9B,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACjD,MAAM,EAAE,WAAW,EAAE,GAAkB,aAAa,CAAA;IACpD,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAElC,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAM;QACR,CAAC;QACD,WAAW,EAAE,CAAA;QACb,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,gBAAgB;QAC7B,gCACE,SAAS,EAAC,UAAU,EACpB,EAAE,EAAC,aAAa,EAChB,OAAO,EAAE,kBAAkB,sBACV,yBAAyB,IAEzC,CAAC,CAAC,sBAAsB,CAAC,CACnB;QACT,6BAAK,SAAS,EAAC,6BAA6B,EAAC,EAAE,EAAC,yBAAyB,IACtE,CAAC,CAAC,2BAA2B,CAAC,CAC3B,CACF,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isExamExaminePageHook.d.ts","sourceRoot":"","sources":["../../../src/components/results/isExamExaminePageHook.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,4BAA4B,eAGxC,CAAA"}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { useContext } from 'react';
|
2
|
-
import { ResultsContext } from '../context/ResultsContext';
|
3
|
-
export const useIsStudentsExamineExamPage = () => {
|
4
|
-
const { gradingStructure } = useContext(ResultsContext);
|
5
|
-
return gradingStructure === undefined;
|
6
|
-
};
|
7
|
-
//# sourceMappingURL=isExamExaminePageHook.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isExamExaminePageHook.js","sourceRoot":"","sources":["../../../src/components/results/isExamExaminePageHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,EAAE;IAC/C,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACvD,OAAO,gBAAgB,KAAK,SAAS,CAAA;AACvC,CAAC,CAAA"}
|