Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenQuizz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Weber Rodolphe
OpenQuizz
Commits
6bcfdad1
Commit
6bcfdad1
authored
Sep 24, 2021
by
Jérémie Passerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout des unités dans xml calculée simple
parent
c4ff6f76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
168 additions
and
7 deletions
+168
-7
Edit_Calculee_Simple.vue
src/components/moodle/Edit_Calculee_Simple.vue
+168
-7
No files found.
src/components/moodle/Edit_Calculee_Simple.vue
View file @
6bcfdad1
...
@@ -47,6 +47,9 @@
...
@@ -47,6 +47,9 @@
<td
style=
"width: 70%; text-align: left"
>
<td
style=
"width: 70%; text-align: left"
>
<input
type=
"text"
style=
"height: 25px; width: 75px; margin-right: 5px"
v-model=
"tolerance[j - 1]"
/>
<input
type=
"text"
style=
"height: 25px; width: 75px; margin-right: 5px"
v-model=
"tolerance[j - 1]"
/>
Type
Type
<select
v-model=
"typeTolerance"
>
<option
v-for=
"i in optionType.length"
:key=
"i"
>
{{
optionType
[
i
-
1
]
}}
</option>
</select>
</td>
</td>
...
@@ -57,24 +60,83 @@
...
@@ -57,24 +60,83 @@
<td
style=
"width: 30%; text-align: left"
>
Affichage de la réponse
</td>
<td
style=
"width: 30%; text-align: left"
>
Affichage de la réponse
</td>
<td
style=
"width: 70%; text-align: left"
>
<td
style=
"width: 70%; text-align: left"
>
<input
type=
"text"
style=
"height: 25px; width: 75px; margin-right: 5px"
v-model=
"tolerance[j - 1]"
/>
<select
v-model=
"tailleReponse"
>
<option
v-for=
"i in 10"
:key=
"i"
>
{{
i
-
1
}}
</option>
</select>
Format
Format
<select
v-model=
"formatReponse"
>
<option
v-for=
"i in optionFormat.length"
:key=
"i"
>
{{
optionFormat
[
i
-
1
]
}}
</option>
</select>
</td>
</td>
</tr>
</tr>
<tr
:key=
"j + 'feedback'"
>
<tr
:key=
"j + 'feedback'"
style=
"height: 225px"
>
<td
style=
"width: 30%; text-align: left"
>
Feedback
</td>
<td
style=
"width: 30%; text-align: left"
>
Feedback
</td>
<td
style=
"width: 70%"
>
<td
style=
"width: 70%"
>
<quill-editor
style=
"height: 100px; margin-top:
2
6px"
v-model=
"feedback[j - 1]"
/>
<quill-editor
style=
"height: 100px; margin-top:
-6
6px"
v-model=
"feedback[j - 1]"
/>
</td>
</td>
</tr>
</tr>
</
template
>
</
template
>
<span
class=
"nvelleReponse"
@
click=
"ajouterReponse"
>
Ajouter une réponse
</span>
<!-- Traitement de l'unité -->
<tr
style=
"height: 69px"
>
<td
style=
"width: 30%; text-align: left"
>
Traitement de l'unité
</td>
<td
style=
"width: 70%; text-align: left"
>
<select
v-model=
"traitementUnite"
@
change=
"changerOptions"
>
<option
v-for=
"i in optionsTraitementUnite.length"
:key=
"i"
>
{{optionsTraitementUnite[i - 1]}}
</option>
</select>
</td>
</tr>
<!-- <tr style="height: 69px">
<td style="width: 30%; text-align: left">Pénalité d'unité</td>
<td style="width: 70%">
</td>
</tr>-->
<tr
style=
"height: 69px"
>
<td
style=
"width: 30%; text-align: left"
>
Les unités sont saisies en utilisant
</td>
<td
style=
"width: 70%; text-align: left"
>
<select
v-model=
"saisieUnite"
:disabled=
"noUnit || optionalUnit"
>
<option
v-for=
"i in optionsZoneSaisieUnite.length"
:key=
"i"
>
{{optionsZoneSaisieUnite[i - 1]}}
</option>
</select>
</td>
</tr>
<tr
style=
"height: 69px"
>
<td
style=
"width: 30%; text-align: left"
>
Position de l'unité
</td>
<td
style=
"width: 70%; text-align: left"
>
<select
v-model=
"positionUnite"
:disabled=
"noUnit"
>
<option
v-for=
"i in optionsPositionUnite.length"
:key=
"i"
>
{{optionsPositionUnite[i - 1]}}
</option>
</select>
</td>
</tr>
<!-- Unités -->
<
template
v-for=
"i in unites.length"
>
<tr
style=
"height: 69px"
:key=
"i + 'unite'"
>
<td
style=
"width: 30%; text-align: left"
>
Unité
</td>
<td
style=
"width: 70%; text-align: left"
>
<input
type=
"text"
style=
"width: 7vw; margin-right: 1vw"
v-model=
"unites[i - 1]"
>
Coefficient
<input
type=
"text"
style=
"width: 7vw; margin-left: 1vw"
v-model=
"unitesCoeffs[i - 1]"
disabled
>
</td>
</tr>
</
template
>
<span
class=
"nvelleReponse"
@
click=
"ajouterUnite"
>
Ajouter une unité
</span>
</table>
</table>
<button
style=
"width: auto; height: auto; margin-left: -100px; position: fixed; bottom: 18px"
v-on:click=
"action('modifier')"
>
modifier
</button>
<button
style=
"width: auto; height: auto; margin-left: -15px; position: fixed; bottom: 18px"
v-on:click=
"action('arriere')"
>
retour en arriere
</button>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -97,10 +159,80 @@ export default {
...
@@ -97,10 +159,80 @@ export default {
generalFeedback
:
''
,
generalFeedback
:
''
,
options
:
[
"Aucun"
,
"100%"
,
"90%"
,
"83.33%"
,
"80%"
,
"75%"
,
"70%"
,
"66.66%"
,
"60%"
,
"50%"
,
"40%"
,
"33.33%"
,
"30%"
,
"25%"
,
"20%"
,
"16.6667%"
,
"14.28571%"
,
options
:
[
"Aucun"
,
"100%"
,
"90%"
,
"83.33%"
,
"80%"
,
"75%"
,
"70%"
,
"66.66%"
,
"60%"
,
"50%"
,
"40%"
,
"33.33%"
,
"30%"
,
"25%"
,
"20%"
,
"16.6667%"
,
"14.28571%"
,
"12.5%"
,
"11.11%"
,
"10%"
,
"5%"
],
"12.5%"
,
"11.11%"
,
"10%"
,
"5%"
],
optionType
:
[
"Relatif"
,
"Nominal"
],
optionFormat
:
[
"decimal"
,
"chiffres significatifs"
],
optionsTraitementUnite
:
[
"Les unités ne sont pas utilisees. Seule la valeur numérique est utilisée"
,
"Les unités sont optionelles. Si une unité est saisie, elle est utilisée pour la conversion de la réponse donnée vers l'unité 1 avant l'évaluation"
,
"L'unité doit être indiquée, et sera comprise dans la note"
],
optionsPenaliteUnite
:
[
"comme une fraction entre 0 et 1 de la note de la question"
,
"comme une fraction entre 0 et 1 de la note de la réponse"
],
optionsZoneSaisieUnite
:
[
"la zone de saisie du texte"
,
"une sélection de choix multiple"
,
"un menu déroulant"
],
optionsPositionUnite
:
[
'A droite, comme 2.5 cm ou 12.5 km'
,
'A gauche, comme € 2.5 ou $ 1.25'
],
noUnit
:
false
,
optionalUnit
:
false
,
reponses
:
[],
reponses
:
[],
notes
:
[],
notes
:
[],
feedback
:
[],
feedback
:
[],
tolerance
:
[]
tolerance
:
[],
typeTolerance
:
''
,
formatReponse
:
''
,
tailleReponse
:
''
,
unites
:
[],
unitesCoeffs
:
[],
positionUnite
:
''
,
saisieUnite
:
''
,
traitementUnite
:
''
}
},
methods
:
{
/**
* @vuese
* Récupération de l'action utilisateur
*
* @param actionChoisie
*/
action
:
function
(
actionChoisie
)
{
if
(
actionChoisie
===
'arriere'
)
{
this
.
$emit
(
"actionMoodle"
,
{
action
:
actionChoisie
})
}
else
{
this
.
questionParsee
.
nom_question
=
this
.
nomQuestion
this
.
questionParsee
.
intitule_question
=
this
.
texteQuestion
this
.
questionParsee
.
note_defaut
=
this
.
noteDefaut
this
.
questionParsee
.
feedback_general
=
this
.
generalFeedback
}
},
/**
* @vuese
* Modification des acces aux options de traitement de l'unite
*/
changerOptions
:
function
()
{
if
(
this
.
traitementUnite
===
this
.
optionsTraitementUnite
[
0
]){
this
.
noUnit
=
true
this
.
optionalUnit
=
false
}
else
if
(
this
.
traitementUnite
===
this
.
optionsTraitementUnite
[
1
]){
this
.
noUnit
=
false
this
.
optionalUnit
=
true
}
else
{
this
.
noUnit
=
false
this
.
optionalUnit
=
false
}
},
/**
* @vuese
* Ajouter une réponse au contenu
*/
ajouterReponse
:
function
()
{
this
.
reponses
.
push
(
""
)
this
.
notes
.
push
(
this
.
options
[
0
])
this
.
feedback
.
push
(
" "
)
this
.
tolerance
.
push
(
"0"
)
},
/**
* @vuese
* Ajouter une unité au contenu
*/
ajouterUnite
:
function
()
{
this
.
unites
.
push
(
""
)
this
.
unitesCoeffs
.
push
(
'1'
)
}
}
},
},
watch
:
{
watch
:
{
...
@@ -116,6 +248,27 @@ export default {
...
@@ -116,6 +248,27 @@ export default {
this
.
notes
=
this
.
notes
.
map
(
note
=>
{
if
(
note
===
'0%'
)
return
'Aucun'
;
else
return
note
;})
this
.
notes
=
this
.
notes
.
map
(
note
=>
{
if
(
note
===
'0%'
)
return
'Aucun'
;
else
return
note
;})
this
.
feedback
=
this
.
questionParsee
.
liste_feedback
this
.
feedback
=
this
.
questionParsee
.
liste_feedback
this
.
tolerance
=
this
.
questionParsee
.
liste_tolerance
this
.
tolerance
=
this
.
questionParsee
.
liste_tolerance
this
.
typeTolerance
=
this
.
optionType
[
parseInt
(
this
.
questionParsee
.
liste_tolerance_type
)
-
1
]
this
.
tailleReponse
=
parseInt
(
this
.
questionParsee
.
liste_reponse_taille
)
this
.
formatReponse
=
this
.
optionFormat
[
parseInt
(
this
.
questionParsee
.
liste_reponse_format
)
-
1
]
this
.
unites
=
this
.
questionParsee
.
liste_unite_nom
.
filter
(
unite
=>
unite
)
this
.
unitesCoeffs
=
this
.
questionParsee
.
liste_unite_coef
.
filter
(
coef
=>
coef
)
this
.
positionUnite
=
this
.
optionsPositionUnite
[
this
.
questionParsee
.
position_unite
]
this
.
saisieUnite
=
this
.
optionsZoneSaisieUnite
[
this
.
questionParsee
.
saisie_unite
]
if
(
this
.
questionParsee
.
saisie_unite
===
"3"
)
{
this
.
noUnit
=
true
this
.
traitementUnite
=
this
.
optionsTraitementUnite
[
this
.
questionParsee
.
traitement_unite
]
this
.
saisieUnite
=
this
.
optionsZoneSaisieUnite
[
0
]
}
else
{
if
(
this
.
questionParsee
.
traitement_unite
===
'0'
){
this
.
optionalUnit
=
true
}
this
.
traitementUnite
=
this
.
optionsTraitementUnite
[
parseInt
(
this
.
questionParsee
.
traitement_unite
)
+
1
]
}
}
}
}
}
}
}
...
@@ -129,7 +282,7 @@ label {
...
@@ -129,7 +282,7 @@ label {
}
}
.edit
{
.edit
{
width
:
6
0vw
;
width
:
7
0vw
;
margin-left
:
auto
;
margin-left
:
auto
;
margin-right
:
auto
;
margin-right
:
auto
;
height
:
79.35vh
;
height
:
79.35vh
;
...
@@ -137,7 +290,7 @@ label {
...
@@ -137,7 +290,7 @@ label {
}
}
.editDark
{
.editDark
{
width
:
6
0vw
;
width
:
7
0vw
;
margin-left
:
auto
;
margin-left
:
auto
;
margin-right
:
auto
;
margin-right
:
auto
;
height
:
79.35vh
;
height
:
79.35vh
;
...
@@ -163,4 +316,12 @@ label {
...
@@ -163,4 +316,12 @@ label {
td
>
*
{
td
>
*
{
vertical-align
:
middle
;
vertical-align
:
middle
;
}
}
.nvelleReponse
::before
{
content
:
"\002B"
;
}
.nvelleReponse
{
text-decoration
:
underline
;
}
</
style
>
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment