@digabi/exam-engine-core 19.16.0 → 19.17.0-abitti2.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/internal/RestrictedAudioPlayer.d.ts.map +1 -1
- package/dist/components/shared/internal/RestrictedAudioPlayer.js +16 -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 +5 -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 +18 -3
- 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,10 @@ 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
|
+
/** Is this abitti2 */
|
14
|
+
abitti2?: boolean;
|
15
|
+
/** Ref to audio element */
|
16
|
+
audioRef?: MutableRefObject<HTMLAudioElement | null>;
|
12
17
|
}
|
13
18
|
export interface NowPlaying {
|
14
19
|
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,sBAAsB;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,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;AAgC9B,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;AAiD5D,MAAM,CAAC,OAAO,UAAW,SAAS,CAAC,aAAa,EAAE,aAAa,4EAE9D"}
|
@@ -2,15 +2,30 @@ 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 getAudioResponse(examServerApi, audio, playbackTimes) {
|
6
|
+
try {
|
7
|
+
const response = await examServerApi.getRestrictedAudio(audio.src, audio.restrictedAudioId, playbackTimes);
|
8
|
+
const source = audio.audioRef.current.querySelector('source');
|
9
|
+
source.src = URL.createObjectURL(response);
|
10
|
+
audio.audioRef.current.load();
|
11
|
+
void audio.audioRef.current.play();
|
12
|
+
return 'ok';
|
13
|
+
}
|
14
|
+
catch (err) {
|
15
|
+
return err.message;
|
16
|
+
}
|
17
|
+
}
|
5
18
|
function* performPlayAudio(examServerApi, action) {
|
6
19
|
const audio = action.payload;
|
7
20
|
try {
|
8
21
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
9
22
|
const playbackTimes = audio.restrictedAudioId != null ? yield select(getPlaybackTimes(audio.restrictedAudioId)) : undefined;
|
10
23
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
11
|
-
const response =
|
12
|
-
? yield
|
13
|
-
:
|
24
|
+
const response = audio.audioRef && playbackTimes != null
|
25
|
+
? yield getAudioResponse(examServerApi, audio, playbackTimes)
|
26
|
+
: playbackTimes != null && audio.restrictedAudioId != null
|
27
|
+
? yield call(examServerApi.playRestrictedAudio, audio.src, audio.restrictedAudioId, playbackTimes)
|
28
|
+
: yield call(examServerApi.playAudio, audio.src);
|
14
29
|
if (response === 'ok') {
|
15
30
|
yield put(playAudioStarted(audio));
|
16
31
|
yield call(countdown, audio.duration, updateRemaining);
|
@@ -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
|
+
{"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AChE,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,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAA;AACrD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,CAAA;AACtD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAA;AACtC,MAAM,MAAM,kBAAkB;AAC5B,0DAA0D;AACxD,kBAAkB;AACpB,6CAA6C;GAC3C,iBAAiB;AACnB,wCAAwC;GACtC,aAAa,CAAA;AACjB,MAAM,MAAM,qBAAqB,GAAG,IAAI,GAAG,kBAAkB,CAAA;AAE7D,MAAM,WAAW,4BAA4B;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.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": "e2cdc1a0b7045824f027760b112de37d05362029"
|
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"}
|