fcad-core-dragon 2.3.0-test.4 → 2.3.0-test.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.3.0-test.6](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.3.0-test.5...v2.3.0-test.6) (2026-05-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Git Page:** Application ne ce lance pas correctement lorsque le projet est deployé sur serveur non cegepadistance. ([2683336](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/2683336bd0928c2550f7d1266675beda8465d580))
7
+
8
+ # [2.3.0-test.5](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.3.0-test.4...v2.3.0-test.5) (2026-04-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **ui:** corrige la mise à jour du document.title avec le bon titre lors de la navigation ([7155180](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/7155180447c710d53c752b6a1080ec6be053194f))
14
+
1
15
  # [2.3.0-test.4](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.3.0-test.3...v2.3.0-test.4) (2026-04-17)
2
16
 
3
17
 
@@ -7,29 +21,161 @@
7
21
 
8
22
  # [2.3.0-test.3](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.3.0-test.2...v2.3.0-test.3) (2026-04-16)
9
23
 
10
-
11
24
  ### Bug Fixes
12
25
 
13
- * **quiz:** correction du formatage du message précédent ([6985f51](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/6985f51dee569ec7cfeaba18bf4ee19089f6b5e2))
26
+ - **quiz:** correction du formatage du message précédent ([6985f51](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/6985f51dee569ec7cfeaba18bf4ee19089f6b5e2))
14
27
 
15
28
  # [2.3.0-test.2](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.3.0-test.1...v2.3.0-test.2) (2026-04-10)
16
29
 
17
-
18
30
  ### Bug Fixes
19
31
 
20
- * **server connection:** remote parameter prevent production build to connect to LRS when deployed on Moodle ([994e702](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/994e702ce0ed69633798adec8830d33b87680e92))
32
+ - **server connection:** remote parameter prevent production build to connect to LRS when deployed on Moodle ([994e702](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/994e702ce0ed69633798adec8830d33b87680e92))
21
33
 
22
34
  # [2.3.0-test.1](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.2.0...v2.3.0-test.1) (2026-03-27)
23
35
 
24
-
25
36
  ### Bug Fixes
26
37
 
27
- * **ci-config:** fixed the rule for npm deployment on branches beta, apha and test ([38923e7](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/38923e7ad775795f2ea27f0d304915a740185892))
28
- * **ci-config:** fixed the rule for npm deployment on branches beta, apha and test ([808d3de](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/808d3de37bf1d03d420e05fa13412ce17ca72ad1))
29
- * **dependencies:** fixed depentencies conflicts causing npm ci to fail ([469918e](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/469918e24d0b2948adf7d2f0135d80aeba2b35a8))
30
- * remaning release config file to .releaserc ([2a746d0](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/2a746d0b294577128937a22fae8f556984e97fda))
38
+ - **ci-config:** fixed the rule for npm deployment on branches beta, apha and test ([38923e7](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/38923e7ad775795f2ea27f0d304915a740185892))
39
+ - **ci-config:** fixed the rule for npm deployment on branches beta, apha and test ([808d3de](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/808d3de37bf1d03d420e05fa13412ce17ca72ad1))
40
+ - **dependencies:** fixed depentencies conflicts causing npm ci to fail ([469918e](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/469918e24d0b2948adf7d2f0135d80aeba2b35a8))
41
+ - remaning release config file to .releaserc ([2a746d0](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/2a746d0b294577128937a22fae8f556984e97fda))
42
+
43
+ ### Features
44
+
45
+ - **core:** expose app-store and app-router via provide for to external plugins and libraries ([42e776f](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/42e776f9af103490d58d067389d28223c61d7ee8))
46
+
47
+ # 2.2.0 (2026-01-21)
48
+
49
+ ### Fixes
50
+
51
+ - Playbar du lecteur vidéo reste visible sauf en plein écran.
52
+ - Affichage de la section info (notes/sources) lorsqu'une seule catégorie existe.
53
+ - Correction du rappel de réponse bloqué (skeleton loader).
54
+ - Texte troué et listes déroulantes : fin de texte manquante.
55
+ - Affichage des vidéos en plein écran.
56
+ - Affichage de la barre de lecture vidéo.
57
+ - Icône triangle des listes déroulantes.
58
+
59
+ #### Notes
60
+
61
+ - Inclut les correctifs des versions `2.2.0-beta.*`.
62
+
63
+ # 2.1.0 (2025-11-24)
64
+
65
+ ### Fixes
66
+
67
+ - Affichage des listes déroulantes.
68
+ - Validation des objets de quiz et contenu du pop-up neutre.
69
+ - Titres des pop-ups de fin d’activité et de leçon.
70
+ - Problème de complétion avec les fenêtres latérales.
71
+
72
+ ### Performance
73
+
74
+ - Optimisation des dépendances.
75
+ - Amélioration de `quizrecall`.
76
+ - Optimisation de la mise à jour de `currentPage` dans le store.
77
+
78
+ ### Features
79
+
80
+ - Ajout de `ScrollTrigger` à `$gsap`.
81
+ - Redéfinition de certains libellés spécifiques du FCAD.
82
+ - Tracking Analytics audio/vidéo.
83
+ - Tracking Learning Locker audio/vidéo.
84
+ - Informations supplémentaires en mode debug.
85
+
86
+ ### BREAKING CHANGES
87
+
88
+ - Intégration Google Analytics (`analytics_id` dans `app.vue`) et dépendance `vue-gtag@2.0.1`.
89
+ - Nouvelle structure de données pour les lecteurs audio/vidéo.
90
+ - Nouvelle structure de rétroactions (`title` et `hypertext` uniquement).
91
+ - Renommage de plusieurs classes CSS liées aux quiz et rétroactions.
92
+
93
+ # 2.0.3 (2025-08-27)
31
94
 
95
+ ### Fixes
96
+
97
+ - Renommage de `app-comp-quiz` en `app-comp-quiz-next` pour compatibilité descendante.
98
+
99
+ # 2.0.2 (2025-08-26)
100
+
101
+ ### Features
102
+
103
+ - Réécriture complète de la logique des exercices.
104
+
105
+ ### Fixes
106
+
107
+ - Renommage de `app-comp-quiz-nx` en `app-comp-quiz` pour compatibilité descendante.
108
+ - Mise à jour automatique du rappel de réponse.
109
+ - Amélioration responsive du lecteur audio.
110
+ - Skeleton loaders pendant le chargement.
111
+
112
+ ### Accessibility
113
+
114
+ - Fieldset annonce les consignes à l’arrivée sur un exercice.
115
+
116
+ # 2.0.1 (2025-08-12)
117
+
118
+ ### Changed
119
+
120
+ - Carrousel : remplacement du titre `h3` par `p` avec classe.
121
+ - Documentation FCAD 2 déplacée dans `documentation`.
122
+
123
+ ### Fixes
124
+
125
+ - Correctifs sur réponses ouvertes, radio et checkbox.
126
+
127
+ # 2.0.0 (2025-03-31)
32
128
 
33
129
  ### Features
34
130
 
35
- * **core:** expose app-store and app-router via provide for to external plugins and libraries ([42e776f](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/42e776f9af103490d58d067389d28223c61d7ee8))
131
+ - Idle detector.
132
+ - Fenêtre latérale custom.
133
+ - Support SCORM avec FCAD 2.
134
+
135
+ ### Changed
136
+
137
+ - Migration Vue 2 → Vue 3.
138
+ - Migration Bootstrap-Vue → Vuetify.
139
+ - Migration Webpack → Vite.
140
+ - Migration Vuex → Pinia.
141
+ - Internationalisation Vuetify selon la langue.
142
+
143
+ ### Fixes
144
+
145
+ - Divers bogues TOC / notes / popup.
146
+ - Import dynamique des branches.
147
+ - Fenêtre progression activité 99 → conclusion.
148
+ - Fermeture de fenêtre latérale avec espace.
149
+
150
+ ### Performance
151
+
152
+ - Optimisation des requêtes LRS au chargement.
153
+ - Nettoyage dépendances, commentaires et logs.
154
+
155
+ # 1.3.0 (2023-04-17)
156
+
157
+ ### Fixes
158
+
159
+ - Navigation précédente désactivée.
160
+ - Titre en trop dans le sommaire.
161
+ - Lecture de la durée média avec NVDA.
162
+ - Correctifs boutons d’embranchement.
163
+ - Interaction quiz / contrôleur média au clavier.
164
+ - Retrait de la confirmation avant fermeture d’onglet.
165
+
166
+ # 1.2.1 (2023-01-10)
167
+
168
+ ### Changed
169
+
170
+ - Remplacement de `hors-ecran` par `sr-only`.
171
+ - Correction de `anwser` → `answer` dans le code et les locales.
172
+
173
+ # 1.2.0 (2022-12-16)
174
+
175
+ ### BREAKING CHANGES
176
+
177
+ - Intervention CSS requise pour projets existants (quiz choix unique / multiple).
178
+
179
+ ### Accessibility
180
+
181
+ - Amélioration de l’accessibilité des rétroactions visuelles.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fcad-core-dragon",
3
- "version": "2.3.0-test.4",
3
+ "version": "2.3.0-test.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./src/main.js",
@@ -132,7 +132,8 @@ export default {
132
132
  'getBookmarkEnabled',
133
133
  'getAppDebugMode',
134
134
  'getLessonPosition',
135
- 'getApplicationSettings'
135
+ 'getApplicationSettings',
136
+ 'getMenuSettings'
136
137
  ]),
137
138
  appDebugMode() {
138
139
  return this.getAppDebugMode
@@ -223,7 +224,7 @@ export default {
223
224
  // this.updateTracker('appBase', 'loading')
224
225
  this.initializeApp(this.appConfig)
225
226
  }
226
-
227
+ this.setDocumentTitle()
227
228
  window.versionFCAD = this.$helper.getFcadVersionString()
228
229
  //check if this is running in a mobile environment and register state in the store
229
230
  const md = new mobileDetect(window.navigator.userAgent)
@@ -1063,6 +1064,20 @@ export default {
1063
1064
  if (this.f5KeyPressed) return
1064
1065
 
1065
1066
  this.executeCloseEventTriggered()
1067
+ },
1068
+
1069
+ /**
1070
+ * @description Method set the document title of the app.
1071
+ * The function check if the title exist in the appConfig file then set it as document title
1072
+ *
1073
+ */
1074
+ setDocumentTitle() {
1075
+ let lessonLabel, titleString
1076
+ let { lessonNumber, lessonTitle } = this.getMenuSettings
1077
+ lessonLabel = this.$t('text.lesson')
1078
+ lessonTitle = lessonTitle ? ` - ${lessonTitle}` : ''
1079
+ titleString = `${lessonLabel} ${lessonNumber}${lessonTitle}`
1080
+ document.title = titleString
1066
1081
  }
1067
1082
  }
1068
1083
  }
@@ -533,19 +533,6 @@ export default {
533
533
  document.removeEventListener('keydown', this.handleKeyboardControls)
534
534
  },
535
535
  created() {
536
- let lessonLabel, lessonNumber, lessonTitle, titleString
537
- lessonLabel = this.$t('text.lesson')
538
- lessonNumber = this.moduleConfig.id.replace('module_', '')
539
- lessonTitle = this.theTitle
540
- titleString = lessonLabel + ' ' + lessonNumber + ' – ' + lessonTitle
541
-
542
- //Remove prefix for introduction or conclusion, according to isIntroConclu setting in Module.vue
543
- if (typeof this.moduleConfig.isIntroConclu !== 'undefined') {
544
- if (this.moduleConfig.isIntroConclu) {
545
- titleString = lessonTitle
546
- }
547
- }
548
- document.title = titleString
549
536
  document.addEventListener('sidebarEvent', (e) => {
550
537
  // e. e.checkVisibility()
551
538
  this.$bus.$emit(
@@ -524,11 +524,11 @@ export default {
524
524
  completePage() {
525
525
  if (
526
526
  ['pg_menu', 'pg_branch'].includes(this.type) ||
527
- this.state == 'completed' ||
528
- this.isBranchingPage
527
+ this.state == 'completed'
529
528
  )
530
529
  return
531
530
 
531
+
532
532
  this.state = 'completed'
533
533
  this.userInteraction.state = this.state
534
534
  },
@@ -55,7 +55,6 @@ Si la composante est appelée sans prop, les boutons par défaut seront génér
55
55
 
56
56
  <app-comp-button-progress
57
57
  :set-target="sidebar"
58
- :percent="branch.progression ? branch.progression : 0"
59
58
  :branch-data="branch"
60
59
  :btn-title="getMatchingElement(branch.id).btnTitle"
61
60
  no-interaction
@@ -69,7 +68,6 @@ Si la composante est appelée sans prop, les boutons par défaut seront génér
69
68
  <v-card-title v-html="branch.title"></v-card-title>
70
69
  <app-comp-button-progress
71
70
  :set-target="sidebar"
72
- :percent="branch.progression ? branch.progression : 0"
73
71
  :branch-data="branch"
74
72
  :btn-title="getMatchingElement(branch.id).btnTitle"
75
73
  ></app-comp-button-progress>
@@ -80,7 +78,6 @@ Si la composante est appelée sans prop, les boutons par défaut seront génér
80
78
  <div v-else class="branch-btn-wrapper">
81
79
  <app-comp-button-progress
82
80
  :set-target="sidebar"
83
- :percent="branch.progression ? branch.progression : 0"
84
81
  :branch-data="branch"
85
82
  :btn-title="branch.text"
86
83
  ></app-comp-button-progress>
@@ -99,10 +96,6 @@ export default {
99
96
  AppCompButtonProgress
100
97
  },
101
98
  props: {
102
- consigne: {
103
- type: Boolean,
104
- default: false
105
- },
106
99
  sidebar: {
107
100
  type: String,
108
101
  default: 'branch-viewer'
@@ -202,7 +195,7 @@ export default {
202
195
  radius: svgRadius,
203
196
  circumference: svgRadius * 2 * Math.PI,
204
197
  branchs: null,
205
- branchsStateData: null,
198
+ branchsStateData: [],
206
199
  idActivity: null,
207
200
  isCustomButton: false,
208
201
  isCard: false,
@@ -237,11 +230,12 @@ export default {
237
230
  deep: true,
238
231
  //watch the completions to update the branches progression
239
232
  handler() {
233
+
240
234
  if (
241
235
  this.getAllCompleted[this.idActivity] &&
242
236
  this.getAllCompleted[this.idActivity].length
243
237
  )
244
- this.getbranchsData()
238
+ this.UpdateBranchProgress()
245
239
  }
246
240
  }
247
241
  },
@@ -251,102 +245,77 @@ export default {
251
245
  this.idActivity = this.$router.currentRoute.value.meta.activity_ref
252
246
  this.branchs = this.$router.currentRoute.value.meta.children
253
247
 
254
- this.getbranchsData()
248
+ this.WhatToLoad()
255
249
  },
256
250
  methods: {
257
251
  /**
258
- * @description Method to get the progression for a branch
259
- *
252
+ * @description Method used to sort according to input type
260
253
  */
261
- getbranchsData() {
262
- this.branchsStateData = []
263
- this.branchs.forEach((branch, index) => {
264
- let branchData = {}
265
- branchData.id = branch._ref
266
- branchData.route = branch._namedRoute
267
- let { state = 'new', progression = 0 } = this.getBranchProgression(
268
- branchData.id
269
- )
254
+ WhatToLoad(){
270
255
 
271
- branchData.state = state
272
- branchData.progression = progression
273
- if (isNaN(branchData.progression)) branchData.progression = 0
274
-
275
- if (this.isCard && this.getMatchingElement(branchData.id)) {
276
- const { title, text, imgFile, imgAlt, btnTitle } =
277
- this.getMatchingElement(branchData.id)
278
-
279
- branchData = {
280
- ...branchData,
281
- text,
282
- title,
283
- imgFile,
284
- imgAlt,
285
- btnTitle
286
- }
256
+ if(this.cards){
257
+ this.cards.forEach((e)=>{
258
+ this.ColletBranchData(e)
259
+ })
260
+ }
287
261
 
288
- if (
289
- typeof branchData.imgAlt === 'undefined' &&
290
- branchData.imgFile === 'undefined' &&
291
- import.meta.env.DEV
292
- ) {
293
- branchData.imgAlt = ''
294
- console.warn(
295
- `Bouton d’embranchement: ALT image sans valeur définie pour ${branchData.id}`
296
- )
297
- }
298
- }
299
- this.branchsStateData[index] = branchData
300
- })
262
+ if(this.customButtons){
263
+ this.customButtons.forEach((e)=>{
264
+ this.ColletBranchData(e)
265
+ })
266
+ }
301
267
  },
302
-
303
268
  /**
304
- * @description Method to get the progression for a branch
305
- * @param {String} idBranch the id of the branch ex: "P01_E01"
306
- * @return {Number} Return the percentage of completion (from 0 to 100) and the current state of a specific branch
269
+ * @description Method responsible for gathering all the information used to build the card or button
270
+ * @param {object} DataCard
271
+ * @return {Array} branchsStateData collection of all card or button to create
307
272
  */
308
- getBranchProgression(idBranch) {
309
- let result = { state: null, progression: null }
273
+ ColletBranchData(DataCard){
310
274
 
311
- if (!this.getAllCompleted[this.idActivity]) return result // no progression found for this activity return result
275
+ let branchData = {}
312
276
 
313
- const total = this.getBranchPagesCount(idBranch) // get all pages for in this branch
314
- //get all completed branches pages
315
- const completedPages = this.getAllCompleted[this.idActivity].filter(
316
- (page) => {
317
- return Object.keys(page)[0].search(idBranch) !== -1
318
- }
319
- )
320
- result.progression = Math.floor((completedPages.length / total) * 100)
277
+ let options = ['text','title','imgFile','imgAlt']
321
278
 
322
- if (isNaN(result.progression)) result.progression = 0
279
+ branchData = options.reduce((acc, opt)=>{
280
+ acc[opt] = opt in DataCard ? DataCard[opt]: null;
281
+ return acc
282
+ }, {})
323
283
 
324
- if (result.progression === 0) {
325
- result.state = this.status.NEW
326
- } else if (result.progression === 100) {
327
- result.state = this.status.COMPLETE
328
- } else {
329
- result.state = this.status.STARTED
284
+ branchData.id = DataCard.brchName
285
+
286
+ this.branchs.forEach((e)=>{
287
+ if(e._ref == branchData.id )
288
+ branchData.route = e._namedRoute
289
+ })
290
+
291
+ if(!this.branchsStateData.length) this.branchsStateData.push(branchData)
292
+ else{
293
+ this.branchsStateData.forEach((e)=>{
294
+ if(e.id != branchData.id){
295
+ this.branchsStateData.push(branchData)
296
+ }
297
+ })
330
298
  }
331
- return result
332
- },
333
299
 
300
+ },
334
301
  /**
335
- * @description Method to get the numbers of pages in a branch
336
- * @param {String} idBranch the id of the branch ex: "A02_E01_P01"
337
- * @return {Array} /Return the total of pages in a specific branch
302
+ * @description Method that updates the progression state of a branch
303
+ * @param N/A
304
+ * @return {String} Update State
338
305
  */
339
- getBranchPagesCount(idBranch) {
340
- if (this.$router.currentRoute.value.meta.type !== 'branching') return
341
-
342
- const allPages = this.getAllActivities()
343
- .list.get(this.idActivity)
344
- .get(this.$router.currentRoute.value.meta.id)
345
- .get(idBranch)
306
+ UpdateBranchProgress(){
307
+ if(!this.branchsStateData.length) return
308
+ let act = this.getAllCompleted[this.idActivity]
309
+ let t
310
+ this.branchsStateData.forEach((e)=>{
311
+ t = e.id
312
+
313
+ act.forEach((a)=>{
314
+ if(a.hasOwnProperty(t)) e.state = a[t]
315
+ })
316
+ })
346
317
 
347
- return allPages.size ? allPages.size : 1
348
318
  },
349
-
350
319
  /**
351
320
  * @description Method to validate data in the prop card|customButton.
352
321
  * @param {String} propName The name of the property card|customButton
@@ -356,14 +325,14 @@ export default {
356
325
  let isValid = true
357
326
  let errMsg = false
358
327
 
359
- switch (propName) {
328
+ switch (propName) {
360
329
  case 'cards': {
361
330
  // verify that numbers of element is equal to number
362
331
  //card must have at least 2 elements
363
332
  if (
364
333
  this.cards.constructor !== Array ||
365
- this.cards.length !== this.branchs.length
366
- ) {
334
+ this.cards.length < 1
335
+ ) {
367
336
  isValid = false
368
337
  errMsg = `La propriété cards doit être un tableau contenant ${this.branchs.length} elements`
369
338
  } else {
@@ -387,6 +356,7 @@ export default {
387
356
  b._ref.includes(el.brchName)
388
357
  )
389
358
 
359
+
390
360
  if (!searchEl) {
391
361
  errMsg = `Aucune branch correspondante avec le nom ${el.brchName} pour la carte ${
392
362
  index + 1
@@ -404,7 +374,7 @@ export default {
404
374
  case 'customButtons': {
405
375
  if (
406
376
  this.customButtons.constructor !== Array ||
407
- this.customButtons.length !== this.branchs.length
377
+ this.customButtons.length < 1
408
378
  ) {
409
379
  isValid = false
410
380
  errMsg = `La propriété customButtons doit être un tableau contenant ${this.branchs.length} elements`
@@ -470,7 +440,6 @@ export default {
470
440
 
471
441
  return errMsg
472
442
  },
473
-
474
443
  /**
475
444
  * @description methode to retive matching data of branch in the prop card| customButton
476
445
  * @param {String} id The id of the branch
@@ -41,11 +41,6 @@ export default {
41
41
  type: Boolean,
42
42
  default: false
43
43
  },
44
- percent: {
45
- type: [Number],
46
- default: 0,
47
- required: true
48
- },
49
44
  branchData: {
50
45
  type: Object,
51
46
  required: true
@@ -72,7 +67,7 @@ export default {
72
67
  status: {
73
68
  NEW: 'new',
74
69
  STARTED: 'started',
75
- COMPLETE: 'complete'
70
+ COMPLETE: 'completed'
76
71
  },
77
72
  withRouter: false, //Only for demo purpose. Remove after demo
78
73
  isActive: false,
@@ -202,7 +202,6 @@ export default {
202
202
  * @Return a collection of item representing the options for a the selectables
203
203
  */
204
204
  getItemOptions(index) {
205
- console.log(Object.values(this.mappedOptions[index])[0])
206
205
  return Object.values(this.mappedOptions[index])[0]
207
206
  },
208
207
  /**
@@ -284,10 +284,12 @@ export default {
284
284
  let tabcomplete = []
285
285
 
286
286
  if (nextIndex < menuInfo[this.activity].anchors.length) {
287
+ //console.log('dans le premier if')
287
288
  nextSec = menuInfo[this.activity].anchors[nextIndex].pageRef
288
289
  }
289
290
 
290
291
  if (nextSec != undefined) {
292
+ // console.log('dans le Deuxieme if')
291
293
  nb = parseInt(nextSec.substring(1))
292
294
 
293
295
  while (nb > parseInt(curSec.substring(1))) {
@@ -300,14 +302,20 @@ export default {
300
302
  let numPage = this.getAllActivitiesState[this.activity].size
301
303
 
302
304
  for (let g = 1; g == numPage; g++) {
303
- tabPageSec.push(`P${g}`)
305
+ if(g<10){
306
+ tabPageSec.push(`P0${g}`)
307
+ }else{
308
+ tabPageSec.push(`P${g}`)
309
+ }
304
310
  }
311
+
305
312
  if (
306
313
  typeof this.getAllCompleted[this.activity] !== 'undefined' &&
307
314
  this.getAllCompleted[this.activity].length !==
308
315
  this.getAllActivitiesState[this.activity].size
309
316
  )
310
- return false
317
+ return
318
+
311
319
  }
312
320
  tabPageSec.push(curSec)
313
321
  }
package/src/main.js CHANGED
@@ -131,6 +131,7 @@ export default {
131
131
  if (name !== 'initializeApp') return
132
132
  let { appConfigs } = appStore.$state
133
133
  let { remote = false, specification } = appConfigs
134
+
134
135
  const c = await configConnection(appConfigs)
135
136
  store.lrsConfig = c
136
137
  const { $scorm, $xapi, $idb } = app.config.globalProperties
@@ -139,21 +140,22 @@ export default {
139
140
  auth,
140
141
  endpoint,
141
142
  registration = $xapi.ruuid()
142
- } = store.lrsConfig
143
-
144
- const config = {
145
- auth,
146
- endpoint,
147
- registration,
148
- activity_platform: `SIPI_organizationId`
143
+ } = store?.lrsConfig ?? {}
144
+
145
+ if (auth && endpoint) {
146
+ const config = {
147
+ auth,
148
+ endpoint,
149
+ registration,
150
+ activity_platform: `SIPI_organizationId`
151
+ }
152
+ // configure and launch LRS
153
+ $xapi._configLRS(config)
149
154
  }
150
-
151
- $xapi._configLRS(config) // configure and launch LRS
152
155
  }
153
156
 
154
157
  //Configure connection with the Data from appBase
155
158
  //===================================================
156
-
157
159
  const activity_id = c ? c.activity_id : null
158
160
 
159
161
  //Redefine actor with value from connection informtion
@@ -191,6 +193,9 @@ export default {
191
193
  if (lessonPosition) appStore.setLessonPosition([lessonPosition])
192
194
  if (completedState) appStore.setCompletionState(completedState)
193
195
  }
196
+
197
+ if (window.location.hostname !== 'localhost') remote = false
198
+
194
199
  //Open Connection to IDB and Save the store state to localDB
195
200
  let dbStoreActive =
196
201
  !window.location.hostname.includes('cegepadistance.ca') && !remote
@@ -334,6 +339,8 @@ export default {
334
339
  }
335
340
  break
336
341
  }
342
+ default:
343
+ connectionInfo = null
337
344
  }
338
345
 
339
346
  return connectionInfo
@@ -346,7 +353,6 @@ export default {
346
353
  $idb,
347
354
  actor,
348
355
  activity_id,
349
- crs_id,
350
356
  idb_id,
351
357
  specification,
352
358
  remote
@@ -80,32 +80,6 @@ describe('AppCompBranchButtons.vue', () => {
80
80
  vi.clearAllMocks()
81
81
  })
82
82
 
83
- it('Renders ErrorDisplay when cards has errors', async () => {
84
- const wrapper = mount(AppCompBranchButtons, {
85
- global: globalConfig,
86
- props: {
87
- cards: [dummyProps.cards[0], dummyProps.cards[1]] // Only 2 cards passed instead of 3
88
- }
89
- })
90
-
91
- await wrapper.vm.$nextTick() // Must wait for DOM updates to display AppBaseErrorDisplay
92
-
93
- if (wrapper.vm.hasErrors) {
94
- const cards = wrapper.vm.cards
95
- console.log(colors.green, `\n ✅ Current cards: ${JSON.stringify(cards)}`)
96
- console.log(
97
- '✅ wrapper.vm.hasErrors:',
98
- wrapper.vm.hasErrors,
99
- colors.reset
100
- )
101
- }
102
- // Error should be displayed
103
- expect(wrapper.vm.hasErrors.length).toBeGreaterThan(0)
104
- expect(
105
- wrapper.findComponent({ name: 'AppBaseErrorDisplay' }).exists()
106
- ).toBe(true)
107
- })
108
-
109
83
  it('Renders ErrorDisplay when customButtons has errors', async () => {
110
84
  const wrapper = mount(AppCompBranchButtons, {
111
85
  global: globalConfig,
@@ -166,7 +140,6 @@ describe('AppCompBranchButtons.vue', () => {
166
140
  ).not.toBe(true)
167
141
  // element to rendered correctly in DOM
168
142
  expect(wrapper.find('#branch-buttons-component').exists()).toBe(true)
169
- //should display 3 buttons
170
- expect(wrapper.findAll('.branch-btn').length).toBe(3)
143
+
171
144
  })
172
145
  })