fcad-core-dragon 2.0.0-beta.8 → 2.0.0
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/.editorconfig +33 -33
- package/.eslintignore +29 -29
- package/.eslintrc.cjs +81 -81
- package/CHANGELOG +14 -0
- package/README.md +71 -71
- package/bk.scss +117 -117
- package/package.json +1 -1
- package/src/assets/data/onboardingMessages.json +47 -47
- package/src/components/AppBase.vue +130 -3
- package/src/components/AppBaseErrorDisplay.vue +438 -438
- package/src/components/AppBaseFlipCard.vue +84 -84
- package/src/components/AppBaseModule.vue +15 -18
- package/src/components/AppBasePopover.vue +41 -41
- package/src/components/AppCompBranchButtons.vue +5 -5
- package/src/components/AppCompInputRadioNext.vue +152 -152
- package/src/components/AppCompInputTextToFillNext.vue +171 -171
- package/src/components/AppCompJauge.vue +74 -74
- package/src/components/AppCompMenuItem.vue +11 -1
- package/src/components/AppCompNoteCall.vue +1 -0
- package/src/components/AppCompPlayBarProgress.vue +82 -82
- package/src/components/AppCompPopUpNext.vue +5 -1
- package/src/components/AppCompSettingsMenu.vue +172 -172
- package/src/components/AppCompTableOfContent.vue +2 -0
- package/src/components/AppCompViewDisplay.vue +6 -6
- package/src/composables/useQuiz.js +206 -206
- package/src/externalComps/ModuleView.vue +22 -22
- package/src/externalComps/SummaryView.vue +91 -91
- package/src/mixins/$mediaMixins.js +819 -819
- package/src/mixins/timerMixin.js +62 -22
- package/src/module/stores/appStore.js +3 -3
- package/src/module/xapi/ADL.js +0 -1
- package/src/module/xapi/Crypto/Hasher.js +241 -241
- package/src/module/xapi/Crypto/WordArray.js +278 -278
- package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +103 -103
- package/src/module/xapi/Crypto/algorithms/C_algo.js +315 -315
- package/src/module/xapi/Crypto/algorithms/HMAC.js +9 -9
- package/src/module/xapi/Crypto/algorithms/SHA1.js +9 -9
- package/src/module/xapi/Crypto/encoders/Base.js +105 -105
- package/src/module/xapi/Crypto/encoders/Base64.js +99 -99
- package/src/module/xapi/Crypto/encoders/Hex.js +61 -61
- package/src/module/xapi/Crypto/encoders/Latin1.js +61 -61
- package/src/module/xapi/Crypto/encoders/Utf8.js +45 -45
- package/src/module/xapi/Crypto/index.js +53 -53
- package/src/module/xapi/Statement/activity.js +47 -47
- package/src/module/xapi/Statement/agent.js +55 -55
- package/src/module/xapi/Statement/group.js +26 -26
- package/src/module/xapi/Statement/index.js +259 -259
- package/src/module/xapi/Statement/statement.js +253 -253
- package/src/module/xapi/Statement/statementRef.js +23 -23
- package/src/module/xapi/Statement/substatement.js +22 -22
- package/src/module/xapi/Statement/verb.js +36 -36
- package/src/module/xapi/activitytypes.js +17 -17
- package/src/module/xapi/utils.js +167 -167
- package/src/module/xapi/verbs.js +294 -294
- package/src/module/xapi/wrapper.js +0 -1
- package/src/module/xapi/xapiStatement.js +444 -444
- package/src/plugins/bus.js +8 -8
- package/src/plugins/gsap.js +14 -14
- package/src/plugins/i18n.js +44 -44
- package/src/plugins/save.js +37 -37
- package/src/plugins/scorm.js +287 -287
- package/src/plugins/xapi.js +11 -11
- package/src/public/index.html +33 -33
- package/src/router/index.js +5 -0
- package/src/shared/generalfuncs.js +210 -210
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"message_1": {
|
|
3
|
-
"type": "popup-avert",
|
|
4
|
-
"value": {
|
|
5
|
-
"title": "Bienvenue dans la visite guidée du FCAD !",
|
|
6
|
-
"hypertext_1": "<p>Le bouton Confirmer vous fera passer à la prochaine étape de la visite.</p><p>Vous pouvez y mettre fin en tout temps avec le bouton Annuler.</p>"
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
"message_2": {
|
|
10
|
-
"type": "tooltip",
|
|
11
|
-
"value": {
|
|
12
|
-
"target": "activity_progress",
|
|
13
|
-
"title": "Navigation secondaire",
|
|
14
|
-
"content": "<p>Les flèches permettent de passer à la page précédente ou suivante de l'activité.</p><p>Les rectangles représentent une section de l'activité.</p>"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"message_3": {
|
|
18
|
-
"type": "tooltip",
|
|
19
|
-
"value": {
|
|
20
|
-
"target": "btn_back_summary",
|
|
21
|
-
"title": "Navigation secondaire",
|
|
22
|
-
"content": "<p>Ce bouton permet de retourner au sommaire de l'activité en tout temps.</p>"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"message_4": {
|
|
26
|
-
"type": "tooltip",
|
|
27
|
-
"value": {
|
|
28
|
-
"target": "primary_activity",
|
|
29
|
-
"title": "Navigation principale",
|
|
30
|
-
"content": "<p>La navigation principale permet de valider ses réponses de quiz et de passer à la page suivante.</p>"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"message_5": {
|
|
34
|
-
"type": "popup-avert",
|
|
35
|
-
"value": {
|
|
36
|
-
"title": "Visite guidée",
|
|
37
|
-
"hypertext_1": "<p>Message pour la barre de lecture.</p>"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"message_6": {
|
|
41
|
-
"type": "popup-avert",
|
|
42
|
-
"value": {
|
|
43
|
-
"title": "Visite guidée",
|
|
44
|
-
"hypertext_1": "<p>Message pour les Paramètres.</p>"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"message_1": {
|
|
3
|
+
"type": "popup-avert",
|
|
4
|
+
"value": {
|
|
5
|
+
"title": "Bienvenue dans la visite guidée du FCAD !",
|
|
6
|
+
"hypertext_1": "<p>Le bouton Confirmer vous fera passer à la prochaine étape de la visite.</p><p>Vous pouvez y mettre fin en tout temps avec le bouton Annuler.</p>"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"message_2": {
|
|
10
|
+
"type": "tooltip",
|
|
11
|
+
"value": {
|
|
12
|
+
"target": "activity_progress",
|
|
13
|
+
"title": "Navigation secondaire",
|
|
14
|
+
"content": "<p>Les flèches permettent de passer à la page précédente ou suivante de l'activité.</p><p>Les rectangles représentent une section de l'activité.</p>"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"message_3": {
|
|
18
|
+
"type": "tooltip",
|
|
19
|
+
"value": {
|
|
20
|
+
"target": "btn_back_summary",
|
|
21
|
+
"title": "Navigation secondaire",
|
|
22
|
+
"content": "<p>Ce bouton permet de retourner au sommaire de l'activité en tout temps.</p>"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"message_4": {
|
|
26
|
+
"type": "tooltip",
|
|
27
|
+
"value": {
|
|
28
|
+
"target": "primary_activity",
|
|
29
|
+
"title": "Navigation principale",
|
|
30
|
+
"content": "<p>La navigation principale permet de valider ses réponses de quiz et de passer à la page suivante.</p>"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"message_5": {
|
|
34
|
+
"type": "popup-avert",
|
|
35
|
+
"value": {
|
|
36
|
+
"title": "Visite guidée",
|
|
37
|
+
"hypertext_1": "<p>Message pour la barre de lecture.</p>"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"message_6": {
|
|
41
|
+
"type": "popup-avert",
|
|
42
|
+
"value": {
|
|
43
|
+
"title": "Visite guidée",
|
|
44
|
+
"hypertext_1": "<p>Message pour les Paramètres.</p>"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -62,10 +62,18 @@ import { mapState, mapActions } from 'pinia'
|
|
|
62
62
|
import { useAppStore } from '../module/stores/appStore.js'
|
|
63
63
|
import { timerMixin } from '../mixins/timerMixin'
|
|
64
64
|
import { validateAppContent } from '../shared/validators'
|
|
65
|
-
|
|
65
|
+
import { computed } from 'vue'
|
|
66
66
|
import mobileDetect from 'mobile-detect'
|
|
67
67
|
export default {
|
|
68
68
|
mixins: [timerMixin],
|
|
69
|
+
provide() {
|
|
70
|
+
return {
|
|
71
|
+
elapsedIdleTime: computed(() => this.elapsedIdleTime),
|
|
72
|
+
timerCurrentState: computed(() => this.timerCurrentState),
|
|
73
|
+
lessonDuration: computed(() => this.lessonDuration),
|
|
74
|
+
activityDuration: computed(() => this.activityDuration)
|
|
75
|
+
}
|
|
76
|
+
},
|
|
69
77
|
props: {
|
|
70
78
|
appConfig: {
|
|
71
79
|
type: Object,
|
|
@@ -221,6 +229,20 @@ export default {
|
|
|
221
229
|
}
|
|
222
230
|
}
|
|
223
231
|
}
|
|
232
|
+
//===========FOR TESTING TIMER TIMEOUT====//
|
|
233
|
+
// elapsedIdleTime: {
|
|
234
|
+
// handler() {
|
|
235
|
+
// console.log(
|
|
236
|
+
// '⌛:',
|
|
237
|
+
// this.elapsedIdleTime,
|
|
238
|
+
// this.timerCurrentState,
|
|
239
|
+
// this.activityDuration
|
|
240
|
+
// )
|
|
241
|
+
|
|
242
|
+
// //max idle time allowed 300s (5 min)
|
|
243
|
+
// },
|
|
244
|
+
// immediate: true
|
|
245
|
+
// }
|
|
224
246
|
},
|
|
225
247
|
|
|
226
248
|
created() {
|
|
@@ -254,6 +276,9 @@ export default {
|
|
|
254
276
|
this.$bus.$on('fire-exit-event', this.endLesson)
|
|
255
277
|
this.$bus.$on('reset-focus-on', this.resetFocus)
|
|
256
278
|
this.$bus.$on('move-to-target', this.moveTo)
|
|
279
|
+
this.$bus.$on('start-timer', this.startAppTimer)
|
|
280
|
+
this.$bus.$on('start-idle-detector', this.setIdleDetector)
|
|
281
|
+
this.$bus.$on('stop-idle-detector', this.unsetIdleDetector)
|
|
257
282
|
},
|
|
258
283
|
beforeMount() {
|
|
259
284
|
window.addEventListener(
|
|
@@ -278,7 +303,9 @@ export default {
|
|
|
278
303
|
this.$bus.$off('reset-focus-on', this.resetFocus)
|
|
279
304
|
this.$bus.$off('send-xapi-statement', this.sendXapiStatements)
|
|
280
305
|
this.$bus.$off('move-to-target', this.moveTo)
|
|
281
|
-
|
|
306
|
+
this.$bus.$off('start-idle-detector', this.setIdleDetector)
|
|
307
|
+
this.$bus.$off('stop-idle-detector', this.unsetIdleDetector)
|
|
308
|
+
this.$bus.$off('start-timer', this.startAppTimer)
|
|
282
309
|
if (this.getAppConfigs.remote) this.unsubscribeToSetConfig() //stop watching changing in store to save to local storage
|
|
283
310
|
},
|
|
284
311
|
methods: {
|
|
@@ -294,6 +321,31 @@ export default {
|
|
|
294
321
|
'setMobileState',
|
|
295
322
|
'setCurrentBrowser'
|
|
296
323
|
]),
|
|
324
|
+
startAppTimer() {
|
|
325
|
+
if (this.timerCurrentState == 'started') this.stopTimer('activity')
|
|
326
|
+
this.startTimer('activity')
|
|
327
|
+
},
|
|
328
|
+
|
|
329
|
+
setIdleDetector() {
|
|
330
|
+
setTimeout(() => {
|
|
331
|
+
this.startIdleTimer() //start the iddle dectection
|
|
332
|
+
document.addEventListener('mousedown', this.resetIdleTimer, false) //set eventlisteners
|
|
333
|
+
document.addEventListener('mousemove', this.resetIdleTimer, false) //set eventlisteners
|
|
334
|
+
document.addEventListener('keypress', this.resetIdleTimer, false) //set eventlisteners
|
|
335
|
+
document.addEventListener('touchmove', this.resetIdleTimer, false) //set eventlisteners
|
|
336
|
+
}, 1000)
|
|
337
|
+
},
|
|
338
|
+
/*
|
|
339
|
+
* stop the idle timer and remove hidle-dector listeners
|
|
340
|
+
*/
|
|
341
|
+
unsetIdleDetector() {
|
|
342
|
+
this.stopIdleTimer()
|
|
343
|
+
document.removeEventListener('mousedown', this.resetIdleTimer, false)
|
|
344
|
+
document.removeEventListener('mousemove', this.resetIdleTimer, false)
|
|
345
|
+
document.removeEventListener('keypress', this.resetIdleTimer, false)
|
|
346
|
+
document.removeEventListener('touchmove', this.resetIdleTimer, false)
|
|
347
|
+
},
|
|
348
|
+
|
|
297
349
|
setInitialLoadingDone() {
|
|
298
350
|
this.initialLoading = false
|
|
299
351
|
},
|
|
@@ -422,6 +474,80 @@ export default {
|
|
|
422
474
|
|
|
423
475
|
const { routeHistory = [], ...userProgress } = userData
|
|
424
476
|
|
|
477
|
+
const completedState = lessonStatus || {}
|
|
478
|
+
const lessonPosition = savedPoint || ''
|
|
479
|
+
const applicationSettings = preferredSettings || {}
|
|
480
|
+
//====FOR TESTING====//
|
|
481
|
+
// console.log('💾 RECORDS ', {
|
|
482
|
+
// userProgress,
|
|
483
|
+
// routeHistory,
|
|
484
|
+
// lessonPosition,
|
|
485
|
+
// completedState,
|
|
486
|
+
// playbarValues,
|
|
487
|
+
// applicationSettings
|
|
488
|
+
// })
|
|
489
|
+
//Update the App Store data
|
|
490
|
+
this.updateDataFetchFromServer({
|
|
491
|
+
userProgress,
|
|
492
|
+
routeHistory,
|
|
493
|
+
lessonPosition,
|
|
494
|
+
completedState,
|
|
495
|
+
playbarValues,
|
|
496
|
+
applicationSettings
|
|
497
|
+
}).then(() => {
|
|
498
|
+
this.updateTracker('appBase_fetch', 'ready')
|
|
499
|
+
})
|
|
500
|
+
},
|
|
501
|
+
|
|
502
|
+
async fetchDataFromServerOptimized() {
|
|
503
|
+
this.updateTracker('appBase_fetch', 'loading')
|
|
504
|
+
if (this.getModuleInfo.packageType !== 'xapi') return
|
|
505
|
+
if (!this.getConnectionInfo || !this.getConnectionInfo.remote) return
|
|
506
|
+
|
|
507
|
+
const actorMbox = this.getConnectionInfo.actor.mbox.replace('mailto:', '')
|
|
508
|
+
const activityId = this.getConnectionInfo.activity_id
|
|
509
|
+
const _url = new URL(activityId)
|
|
510
|
+
const parentID = `${_url.origin}/${this.getModuleInfo.courseID}` // redefining activity id for statement
|
|
511
|
+
|
|
512
|
+
const lessonProgressParam = { email: actorMbox, activityId }
|
|
513
|
+
const lessonStateParam = {
|
|
514
|
+
email: actorMbox,
|
|
515
|
+
activityId,
|
|
516
|
+
verb: 'completed'
|
|
517
|
+
}
|
|
518
|
+
const lessonPosionParam = {
|
|
519
|
+
email: actorMbox,
|
|
520
|
+
activityId
|
|
521
|
+
}
|
|
522
|
+
const playbarParam = {
|
|
523
|
+
email: actorMbox,
|
|
524
|
+
activityId,
|
|
525
|
+
verb: 'played'
|
|
526
|
+
}
|
|
527
|
+
const preferencesParam = {
|
|
528
|
+
email: actorMbox,
|
|
529
|
+
activityId: parentID,
|
|
530
|
+
verb: 'preferred'
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
const fetchParams = [
|
|
534
|
+
lessonProgressParam,
|
|
535
|
+
lessonStateParam,
|
|
536
|
+
lessonPosionParam,
|
|
537
|
+
playbarParam,
|
|
538
|
+
preferencesParam
|
|
539
|
+
]
|
|
540
|
+
|
|
541
|
+
const {
|
|
542
|
+
userData,
|
|
543
|
+
savedPoint,
|
|
544
|
+
preferredSettings,
|
|
545
|
+
playbarValues,
|
|
546
|
+
lessonStatus
|
|
547
|
+
} = await this.$xapi._getBulkData(fetchParams)
|
|
548
|
+
|
|
549
|
+
const { routeHistory = [], ...userProgress } = userData
|
|
550
|
+
|
|
425
551
|
const completedState = lessonStatus || {}
|
|
426
552
|
const lessonPosition = savedPoint || ''
|
|
427
553
|
const applicationSettings = preferredSettings || {}
|
|
@@ -929,7 +1055,8 @@ export default {
|
|
|
929
1055
|
this.setApplicationSettings({}) // resetting store record for settings
|
|
930
1056
|
this.setRouteHistory([]) // resetting store record for all last visited pages
|
|
931
1057
|
|
|
932
|
-
this.$bus.$emit('stop-timer')
|
|
1058
|
+
// this.$bus.$emit('stop-timer')
|
|
1059
|
+
this.stopTimer()
|
|
933
1060
|
if (this.getModuleInfo.packageType !== 'xapi') return
|
|
934
1061
|
|
|
935
1062
|
if (!this.getConnectionInfo || this.getConnectionInfo.remote == false)
|