Commit c4ff6f76 authored by Jérémie Passerat's avatar Jérémie Passerat

Edition, export ok xml numériques

parent cc0f74ab
...@@ -134,7 +134,6 @@ export default { ...@@ -134,7 +134,6 @@ export default {
this.questionParsee.liste_reponse = this.reponses this.questionParsee.liste_reponse = this.reponses
this.questionParsee.liste_feedback = this.feedbacks this.questionParsee.liste_feedback = this.feedbacks
this.noteReponse = this.questionParsee.liste_note.map(note => note + "%")
this.questionParsee.liste_note = this.notes.map(note => note.substring(0, note.length-1)) this.questionParsee.liste_note = this.notes.map(note => note.substring(0, note.length-1))
this.questionParsee.liste_note = this.questionParsee.liste_note.map(note => {if (note === 'Aucun') return '0'; else return note;}) this.questionParsee.liste_note = this.questionParsee.liste_note.map(note => {if (note === 'Aucun') return '0'; else return note;})
this.questionParsee.melange_reponse = this.isShuffle this.questionParsee.melange_reponse = this.isShuffle
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<td style="width: 30%; text-align: left">Reponse {{j}}</td> <td style="width: 30%; text-align: left">Reponse {{j}}</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="reponses[j - 1]"/> <input type="text" style="height: 25px; width: 75px; margin-right: 5px" v-model="reponses[j - 1]"/>
Erreur Erreur
<input type="text" style="height: 25px; width: 75px; margin-left: 5px; margin-right: 5px" v-model="tolerance[j - 1]"/> <input type="text" style="height: 25px; width: 75px; margin-left: 5px; margin-right: 5px" v-model="tolerance[j - 1]"/>
Note Note
<select style="margin-left: 5px" v-model="notes[j - 1]"> <select style="margin-left: 5px" v-model="notes[j - 1]">
...@@ -60,18 +60,18 @@ ...@@ -60,18 +60,18 @@
<tr style="height: 69px"> <tr style="height: 69px">
<td style="width: 30%; text-align: left">Traitement de l'unité</td> <td style="width: 30%; text-align: left">Traitement de l'unité</td>
<td style="width: 70%; text-align: left"> <td style="width: 70%; text-align: left">
<select v-model="traitementUnite" @change="changerOptions"> <select v-model="traitementUnite" @change="changerOptions">
<option v-for="i in optionsTraitementUnite.length" :key="i">{{optionsTraitementUnite[i - 1]}}</option> <option v-for="i in optionsTraitementUnite.length" :key="i">{{optionsTraitementUnite[i - 1]}}</option>
</select> </select>
</td> </td>
</tr> </tr>
<!-- <tr style="height: 69px"> <!-- <tr style="height: 69px">
<td style="width: 30%; text-align: left">Pénalité d'unité</td> <td style="width: 30%; text-align: left">Pénalité d'unité</td>
<td style="width: 70%"> <td style="width: 70%">
</td> </td>
</tr>--> </tr>-->
<tr style="height: 69px"> <tr style="height: 69px">
<td style="width: 30%; text-align: left">Les unités sont saisies en utilisant</td> <td style="width: 30%; text-align: left">Les unités sont saisies en utilisant</td>
<td style="width: 70%; text-align: left"> <td style="width: 70%; text-align: left">
...@@ -93,15 +93,15 @@ ...@@ -93,15 +93,15 @@
<!-- Unités --> <!-- Unités -->
<template v-for="i in unites.length"> <template v-for="i in unites.length">
<tr style="height: 69px" :key="i + 'unite'"> <tr style="height: 69px" :key="i + 'unite'">
<td style="width: 30%; text-align: left">Unité</td> <td style="width: 30%; text-align: left">Unité</td>
<td style="width: 70%; text-align: left"> <td style="width: 70%; text-align: left">
<input type="text" style="width: 7vw; margin-right: 1vw" v-model="unites[i - 1]"> <input type="text" style="width: 7vw; margin-right: 1vw" v-model="unites[i - 1]">
Coefficient Coefficient
<input type="text" style="width: 7vw; margin-left: 1vw" v-model="unitesCoeffs[i - 1]" disabled> <input type="text" style="width: 7vw; margin-left: 1vw" v-model="unitesCoeffs[i - 1]" disabled>
</td> </td>
</tr> </tr>
</template> </template>
<span class="nvelleReponse" @click="ajouterUnite"> Ajouter une unité</span> <span class="nvelleReponse" @click="ajouterUnite"> Ajouter une unité</span>
...@@ -167,6 +167,44 @@ export default { ...@@ -167,6 +167,44 @@ export default {
this.questionParsee.note_defaut = this.noteDefaut this.questionParsee.note_defaut = this.noteDefaut
this.questionParsee.feedback_general = this.generalFeedback this.questionParsee.feedback_general = this.generalFeedback
this.questionParsee.liste_reponse = this.reponses
this.questionParsee.liste_feedback = this.feedback
this.questionParsee.liste_note = this.notes.map(note => note.substring(0, note.length-1))
this.questionParsee.liste_note = this.questionParsee.liste_note.map(note => {if (note === 'Aucun') return '0'; else return note;})
this.questionParsee.liste_tolerance = this.tolerance
this.questionParsee.liste_unite_nom = this.unites
this.questionParsee.liste_unite_coef = this.unitesCoeffs
this.questionParsee.position_unite = this.positionUnite === this.optionsPositionUnite[0] ? '0' : '1'
switch (this.positionUnite) {
case (this.optionsTraitementUnite[0]):
this.questionParsee.saisie_unite = 3
this.questionParsee.traitement_unite = 0
break
case (this.optionsTraitementUnite[1]):
this.questionParsee.traitement_unite = 0
break
case (this.optionsTraitementUnite[2]):
this.questionParsee.traitement_unite = 1
break
}
if (this.questionParsee.saisie_unite !== 3){
switch (this.traitementUnite) {
case (this.optionsTraitementUnite[0]):
this.questionParsee.traitement_unite = 0
break
case (this.optionsTraitementUnite[1]):
this.questionParsee.traitement_unite = 1
break
case (this.optionsTraitementUnite[2]):
this.questionParsee.traitement_unite = 2
break
}
}
this.$emit("actionMoodle", {action: actionChoisie, questionParsee: this.questionParsee})
} }
}, },
/** /**
...@@ -192,7 +230,8 @@ export default { ...@@ -192,7 +230,8 @@ export default {
ajouterReponse: function () { ajouterReponse: function () {
this.reponses.push("") this.reponses.push("")
this.notes.push(this.options[0]) this.notes.push(this.options[0])
this.feedbacks.push("") this.feedback.push(" ")
this.tolerance.push("0")
}, },
/** /**
* @vuese * @vuese
......
...@@ -115,6 +115,7 @@ export default { ...@@ -115,6 +115,7 @@ export default {
this.questionParsee.liste_feedback = this.feedbackReponse this.questionParsee.liste_feedback = this.feedbackReponse
this.questionParsee.majuscule = this.choixCasse === this.optionsCasse[0] ? 0 : 1 this.questionParsee.majuscule = this.choixCasse === this.optionsCasse[0] ? 0 : 1
/* this.texteReponse = this.questionParsee.liste_reponse.filter(reponse => reponse) /* this.texteReponse = this.questionParsee.liste_reponse.filter(reponse => reponse)
this.noteReponse = this.questionParsee.liste_note.map(note => note + "%") this.noteReponse = this.questionParsee.liste_note.map(note => note + "%")
this.feedbackReponse = this.questionParsee.liste_feedback this.feedbackReponse = this.questionParsee.liste_feedback
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment