fcad-core-dragon 2.5.0-test.2 → 2.5.0-test.4
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 +17 -0
- package/package.json +1 -1
- package/src/components/AppBasePage.vue +0 -1
- package/src/components/AppCompInputCategorieCheckBoxNx.vue +1 -3
- package/src/components/AppCompMenuItem.vue +9 -2
- package/src/components/AppCompQuizNext.vue +18 -4
- package/src/components/AppCompTableOfContent.vue +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# [2.5.0-test.4](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.5.0-test.3...v2.5.0-test.4) (2026-06-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **quiz:** ajout nouveau quiz dans quiz ([2303128](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/23031281322e5b2cc8a493a88d31dd53a873f9ec))
|
|
7
|
+
* **quiz:** correction ([2e45cd4](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/2e45cd4400abbf463dab2f5a86d87011959bd7a8))
|
|
8
|
+
* **quiz:** correction enregistrer faute d'authographe ([c2d62cf](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/c2d62cf44c1adf15be8bb11808ef6412c5f94d72))
|
|
9
|
+
* **quiz:** fix du quiz catégorie ([0732fd4](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/0732fd4fab65598506b871d98c6647aa193f8207))
|
|
10
|
+
|
|
11
|
+
# [2.5.0-test.3](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.5.0-test.2...v2.5.0-test.3) (2026-06-15)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **fix:** correction du calcul du pourcentage de completion ([98b98ab](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/commit/98b98ab6e55d15211d0bb58b7851cd63ce15ad25))
|
|
17
|
+
|
|
1
18
|
# [2.5.0-test.2](https://git.crosemont.qc.ca/fcad/core/fcad-core-2/compare/v2.5.0-test.1...v2.5.0-test.2) (2026-06-09)
|
|
2
19
|
|
|
3
20
|
|
package/package.json
CHANGED
|
@@ -120,9 +120,7 @@ export default {
|
|
|
120
120
|
return this.$bus.$emit('input-error', { e: this.id, errors })
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
mounted() {
|
|
124
|
-
},
|
|
125
|
-
|
|
123
|
+
mounted() {},
|
|
126
124
|
methods: {
|
|
127
125
|
/**
|
|
128
126
|
* @description validate the raw data received by the component to render is view
|
|
@@ -156,7 +156,9 @@ export default {
|
|
|
156
156
|
completed = this.getAllCompleted[idActivity] //get all completed page for the activity
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
let noBranch = completed.filter(item => !Object.keys(item)[0].includes("_"))
|
|
160
|
+
|
|
161
|
+
return noBranch.length
|
|
160
162
|
}
|
|
161
163
|
},
|
|
162
164
|
/**
|
|
@@ -174,10 +176,15 @@ export default {
|
|
|
174
176
|
const allActivitiesState = JSON.parse(
|
|
175
177
|
JSON.stringify(this.getAllActivitiesState)
|
|
176
178
|
)
|
|
179
|
+
|
|
180
|
+
const actList = this.getAllActivities().list
|
|
181
|
+
|
|
177
182
|
let size = allActivitiesState[activityID]
|
|
178
|
-
?
|
|
183
|
+
? actList.get(activityID).size
|
|
179
184
|
: 0
|
|
180
185
|
|
|
186
|
+
// console.log(activityID,size)
|
|
187
|
+
|
|
181
188
|
return size
|
|
182
189
|
},
|
|
183
190
|
createRoutes(data) {
|
|
@@ -95,6 +95,9 @@ export default {
|
|
|
95
95
|
AppCompInputCheckBox: defineAsyncComponent(
|
|
96
96
|
() => import('./AppCompInputCheckBoxNx.vue')
|
|
97
97
|
),
|
|
98
|
+
AppCompInputCategorieCheckBoxNx: defineAsyncComponent(
|
|
99
|
+
() => import('./AppCompInputCategorieCheckBoxNx.vue')
|
|
100
|
+
),
|
|
98
101
|
AppCompInputDropdown: defineAsyncComponent(
|
|
99
102
|
() => import('./AppCompInputDropdownNx.vue')
|
|
100
103
|
),
|
|
@@ -179,6 +182,7 @@ export default {
|
|
|
179
182
|
]),
|
|
180
183
|
quizElement() {
|
|
181
184
|
const propMapping = {
|
|
185
|
+
choix_catergorie: 'inputData',
|
|
182
186
|
choix_reponse: 'inputData',
|
|
183
187
|
texte_base: 'textBase',
|
|
184
188
|
max_essai: 'maxEssai'
|
|
@@ -228,6 +232,9 @@ export default {
|
|
|
228
232
|
case type_question == 'choix_mult':
|
|
229
233
|
inputComponent = 'AppCompInputCheckBox'
|
|
230
234
|
break
|
|
235
|
+
case type_question == 'choix_mult_cat':
|
|
236
|
+
inputComponent = 'AppCompInputCategorieCheckBoxNx'
|
|
237
|
+
break
|
|
231
238
|
case type_question == 'reponse_ouverte':
|
|
232
239
|
inputComponent = 'AppCompInputTextBox'
|
|
233
240
|
break
|
|
@@ -437,10 +444,17 @@ export default {
|
|
|
437
444
|
|
|
438
445
|
this.totalAttempts = total_attempts
|
|
439
446
|
if (this.quizLimitActive) this.quizCompleted = true //Signal that quiz has been completed
|
|
440
|
-
let
|
|
441
|
-
if (
|
|
442
|
-
|
|
443
|
-
|
|
447
|
+
let isException = ['choix_unique','choix_mult_cat']
|
|
448
|
+
if (isException.includes(type_question)) {
|
|
449
|
+
switch(type_question){
|
|
450
|
+
case 'choix_unique' :
|
|
451
|
+
this.isReady = true
|
|
452
|
+
return (this.response = [value])
|
|
453
|
+
case 'choix_mult_cat' :
|
|
454
|
+
this.isReady = true
|
|
455
|
+
this.response = value.map((e) => { return e.map((a) => (a.selected)) })
|
|
456
|
+
return this.response
|
|
457
|
+
}
|
|
444
458
|
}
|
|
445
459
|
|
|
446
460
|
this.response = value.map((a) => (a = a.filled || a.selected))
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
<div v-if="error" id="sidebar-submenu" :class="{ isOpen: isOpened }">
|
|
12
12
|
<focus-trap :active="isOpened" :prevent-scroll="true">
|
|
13
13
|
<div ref="target">
|
|
14
|
-
<!-- <div class="submenu-header"> -->
|
|
15
14
|
<app-base-button
|
|
16
15
|
id="close-toc"
|
|
17
16
|
class="btn-ghost"
|
|
@@ -22,9 +21,7 @@
|
|
|
22
21
|
<use href="#close-square-icon" />
|
|
23
22
|
</svg>
|
|
24
23
|
</app-base-button>
|
|
25
|
-
<!-- </div> -->
|
|
26
24
|
|
|
27
|
-
<!-- <div class="submenu-content"> -->
|
|
28
25
|
<p class="t-act" v-html="`${title}`"></p>
|
|
29
26
|
<div class="box-prog-act">
|
|
30
27
|
<p>
|
|
@@ -100,6 +97,7 @@ export default {
|
|
|
100
97
|
'getAnchorsForActivity',
|
|
101
98
|
'getBifChoice',
|
|
102
99
|
'getAllCompleted',
|
|
100
|
+
'getAllActivities',
|
|
103
101
|
'getAllActivitiesState'
|
|
104
102
|
])
|
|
105
103
|
},
|
|
@@ -249,15 +247,20 @@ export default {
|
|
|
249
247
|
completed = this.getAllCompleted[idActivity] //get all completed page for the activity
|
|
250
248
|
}
|
|
251
249
|
|
|
250
|
+
let noBranch = completed.filter(item => !Object.keys(item)[0].includes("_"))
|
|
251
|
+
|
|
252
252
|
const allActivitiesState = JSON.parse(
|
|
253
253
|
JSON.stringify(this.getAllActivitiesState)
|
|
254
254
|
)
|
|
255
|
+
|
|
256
|
+
const actList = this.getAllActivities().list
|
|
257
|
+
|
|
255
258
|
let size = allActivitiesState[idActivity]
|
|
256
|
-
?
|
|
259
|
+
? actList.get(idActivity).size
|
|
257
260
|
: 0
|
|
258
261
|
|
|
259
262
|
// return pourcent of activity completion
|
|
260
|
-
this.actProgress = `${Math.round((
|
|
263
|
+
this.actProgress = `${Math.round((noBranch.length * 100) / size)} %`
|
|
261
264
|
}
|
|
262
265
|
},
|
|
263
266
|
close() {
|
|
@@ -284,12 +287,10 @@ export default {
|
|
|
284
287
|
let tabcomplete = []
|
|
285
288
|
|
|
286
289
|
if (nextIndex < menuInfo[this.activity].anchors.length) {
|
|
287
|
-
//console.log('dans le premier if')
|
|
288
290
|
nextSec = menuInfo[this.activity].anchors[nextIndex].pageRef
|
|
289
291
|
}
|
|
290
292
|
|
|
291
293
|
if (nextSec != undefined) {
|
|
292
|
-
// console.log('dans le Deuxieme if')
|
|
293
294
|
nb = parseInt(nextSec.substring(1))
|
|
294
295
|
|
|
295
296
|
while (nb > parseInt(curSec.substring(1))) {
|
|
@@ -328,6 +329,7 @@ export default {
|
|
|
328
329
|
tabcomplete.push(w[0])
|
|
329
330
|
})
|
|
330
331
|
|
|
332
|
+
//console.log(completeActPage)
|
|
331
333
|
const isSubset = (array1, array2) =>
|
|
332
334
|
array2.every((element) => array1.includes(element))
|
|
333
335
|
|