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
d4b5195d
Commit
d4b5195d
authored
Sep 23, 2021
by
Jérémie Passerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit reponse courte ok et choix multiple entamé
parent
3d7cb6d0
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
207 additions
and
71 deletions
+207
-71
Manuel.vue
src/Manuel.vue
+0
-1
Menu.vue
src/Menu.vue
+16
-13
TagsFixes.vue
src/TagsFixes.vue
+1
-1
Choix_Mode.vue
src/components/Choix_Mode.vue
+2
-2
Consulter_Contenu.vue
src/components/Consulter_Contenu.vue
+0
-1
Modifier_Contenu.vue
src/components/Modifier_Contenu.vue
+2
-1
Volet_Base.vue
src/components/Volet_Base.vue
+22
-4
Edit_Choix_Multiple.vue
src/components/moodle/Edit_Choix_Multiple.vue
+92
-4
Edit_Reponse_Courte.vue
src/components/moodle/Edit_Reponse_Courte.vue
+67
-44
Edit_Vrai_Faux.vue
src/components/moodle/Edit_Vrai_Faux.vue
+5
-0
No files found.
src/Manuel.vue
View file @
d4b5195d
...
@@ -551,7 +551,6 @@ export default {
...
@@ -551,7 +551,6 @@ export default {
margin-bottom
:
5vh
;
margin-bottom
:
5vh
;
margin-left
:
21vw
;
margin-left
:
21vw
;
border
:
1px
solid
coral
;
border
:
1px
solid
coral
;
}
}
img
{
img
{
...
...
src/Menu.vue
View file @
d4b5195d
...
@@ -4,13 +4,15 @@
...
@@ -4,13 +4,15 @@
{'margin-top': '10px'}, {'margin-left': '10px'}]" @switched="onSwitched"/>
{'margin-top': '10px'}, {'margin-left': '10px'}]" @switched="onSwitched"/>
<Choix
_Mode_Variante
v-bind:darkMode=
"darkMode"
class=
"menuVariante"
v-show=
"variante && nouveauTitre !== 'Manuel d\'utilisation de l\'application OpenQuizz'"
/>
<Choix
_Mode_Variante
v-bind:darkMode=
"darkMode"
class=
"menuVariante"
v-show=
"variante && nouveauTitre !== 'Manuel d\'utilisation de l\'application OpenQuizz'"
/>
<span
v-show=
"!variante || nouveauTitre === 'Manuel d\'utilisation de l\'application OpenQuizz'"
:class=
"etat !== 'manuel' ? 'prout' : 'proutManuel'"
>
{{
titrePage
}}
</span>
<span
v-show=
"!variante || nouveauTitre === 'Manuel d\'utilisation de l\'application OpenQuizz'"
:class=
"etat !== 'manuel' ? 'prout' : 'proutManuel'"
>
{{
titrePage
}}
</span>
<div
class=
"notif"
v-on:click=
"choixIconeNotification"
v-show=
"isNotif === true"
v-bind:style=
"[!variante ?
{'margin-left': '90%'} : {'margin-left': '32%'}]">
</div>
<div
class=
"circle"
id=
"menuAuteur"
v-if=
"etat !=='manuel'"
v-on:click=
"isAffiche = !isAffiche"
>
<!-- v-bind:style="styleCircle">-->
<div
id=
"notif & circle"
style=
"display: flex; padding-top: 0.5vh; padding-bottom: 0.5vh"
>
<div
class=
"notif"
v-on:click=
"choixIconeNotification"
v-show=
"isNotif === true"
></div>
<div
class=
"circle"
id=
"menuAuteur"
v-if=
"etat !=='manuel'"
v-on:click=
"isAffiche = !isAffiche"
>
</div>
</div>
<div
:class=
"darkMode ? 'circleVideDark' : 'circleVide'"
v-else
>
</div>
<div
:class=
"darkMode ? 'circleVideDark' : 'circleVide'"
v-else
>
</div>
<!-- v-bind:style="styleCircle">-->
</div>
<div
class=
"menu"
v-bind:class=
"darkMode ? 'menuDark' : ''"
v-show=
"isAffiche"
>
<div
class=
"menu"
v-bind:class=
"darkMode ? 'menuDark' : ''"
v-show=
"isAffiche"
>
<div
v-if=
"etat !== 'Profil'"
class=
"sous_menu"
v-bind:class=
"darkMode ? 'sous_menuDark' : ''"
v-on:click=
"choixMenuAnnexe"
>
Profil
</div>
<div
v-if=
"etat !== 'Profil'"
class=
"sous_menu"
v-bind:class=
"darkMode ? 'sous_menuDark' : ''"
v-on:click=
"choixMenuAnnexe"
>
Profil
</div>
<div
v-else
class=
"sous_menu"
v-bind:class=
"darkMode ? 'sous_menuDark' : ''"
v-on:click=
"choixMenuAnnexe"
>
Contenu
</div>
<div
v-else
class=
"sous_menu"
v-bind:class=
"darkMode ? 'sous_menuDark' : ''"
v-on:click=
"choixMenuAnnexe"
>
Contenu
</div>
...
@@ -262,7 +264,7 @@ export default {
...
@@ -262,7 +264,7 @@ export default {
margin-top
:
0.25%
;
margin-top
:
0.25%
;
margin-bottom
:
0.25%
;
margin-bottom
:
0.25%
;
border-radius
:
50%
;
border-radius
:
50%
;
/* display: flex; !* or inline-flex *!
/* display: flex; !* or inline-flex *!
align-items: center;
align-items: center;
justify-content: center;*/
justify-content: center;*/
height
:
4.2vh
;
height
:
4.2vh
;
...
@@ -305,7 +307,7 @@ export default {
...
@@ -305,7 +307,7 @@ export default {
width
:
100px
;
width
:
100px
;
background
:
white
;
background
:
white
;
border
:
thin
solid
black
;
border
:
thin
solid
black
;
/* margin-top: 46px;
/* margin-top: 46px;
margin-left: 94.75%;*/
margin-left: 94.75%;*/
position
:
absolute
;
position
:
absolute
;
right
:
0.1vw
;
right
:
0.1vw
;
...
@@ -321,15 +323,16 @@ export default {
...
@@ -321,15 +323,16 @@ export default {
.notif
{
.notif
{
border
:
thin
solid
black
;
border
:
thin
solid
black
;
border-radius
:
30%
;
border-radius
:
30%
;
height
:
30px
;
height
:
4vh
;
width
:
30px
;
width
:
4vh
;
z-index
:
1
;
z-index
:
1
;
margin-
left
:
90%
;
margin-
right
:
1vw
;
background-image
:
url(assets/img/cloche.png)
;
background-image
:
url(assets/img/cloche.png)
;
background-size
:
cover
;
background-size
:
cover
;
margin-top
:
0.5%
;
margin-top
:
0.5%
;
margin-bottom
:
0.5%
;
margin-bottom
:
0.5%
;
}
}
.sous_menu
{
.sous_menu
{
...
...
src/TagsFixes.vue
View file @
d4b5195d
<
template
>
<
template
>
<div
style=
"text-align: center"
>
<div
style=
"text-align: center"
>
<p>
Bienvenue dans la page de choix des tags
</p>
<p
style=
"margin-top: 1vh"
>
Bienvenue dans la page de choix des tags
</p>
<p>
Pour compléter le contenu ajouté, il va falloir lui associer des tags
</p>
<p>
Pour compléter le contenu ajouté, il va falloir lui associer des tags
</p>
<label>
Choisir le tag de niveau 1
</label><br><br>
<label>
Choisir le tag de niveau 1
</label><br><br>
...
...
src/components/Choix_Mode.vue
View file @
d4b5195d
...
@@ -79,8 +79,8 @@ export default {
...
@@ -79,8 +79,8 @@ export default {
flex-grow
:
1
;
flex-grow
:
1
;
text-align
:
center
;
text-align
:
center
;
vertical-align
:
bottom
;
vertical-align
:
bottom
;
/*padding-bottom: 0;*/
padding-bottom
:
0
;
padding-top
:
1
vh
;
padding-top
:
2
vh
;
}
}
.nonClicked
{
.nonClicked
{
...
...
src/components/Consulter_Contenu.vue
View file @
d4b5195d
...
@@ -193,7 +193,6 @@ export default {
...
@@ -193,7 +193,6 @@ export default {
contenuClique
:
function
()
{
contenuClique
:
function
()
{
let
that
=
this
let
that
=
this
alert
(
"AYA"
)
if
(
this
.
contenuCliqueProvenance
===
'maj'
){
if
(
this
.
contenuCliqueProvenance
===
'maj'
){
this
.
idContenu
=
this
.
contenuClique
.
idContenuEnCours
this
.
idContenu
=
this
.
contenuClique
.
idContenuEnCours
}
else
{
}
else
{
...
...
src/components/Modifier_Contenu.vue
View file @
d4b5195d
...
@@ -158,11 +158,12 @@ export default {
...
@@ -158,11 +158,12 @@ export default {
*/
*/
changerVersion
:
function
()
{
changerVersion
:
function
()
{
let
that
=
this
let
that
=
this
if
(
this
.
contenuCliqueProvenance
===
'perso'
&&
this
.
versionMax
>
1
){
Service
.
recupererTexteVersionContenu
(
JSON
.
stringify
(
this
.
contenuClique
.
_id
),
this
.
versionChoisie
).
then
(
Service
.
recupererTexteVersionContenu
(
JSON
.
stringify
(
this
.
contenuClique
.
_id
),
this
.
versionChoisie
).
then
(
function
(
response
)
{
function
(
response
)
{
that
.
texteDuContenu
=
response
.
data
that
.
texteDuContenu
=
response
.
data
}
}
)
)
}
},
},
/**
/**
* @vuese
* @vuese
...
...
src/components/Volet_Base.vue
View file @
d4b5195d
...
@@ -90,7 +90,8 @@ isActif ? {'margin-left': '1vw', 'margin-right': '1vw'} : {'margin-left': '0.6vw
...
@@ -90,7 +90,8 @@ isActif ? {'margin-left': '1vw', 'margin-right': '1vw'} : {'margin-left': '0.6vw
<td
v-if=
"item.provenance === 'en-cours'"
>
-
</td>
<td
v-if=
"item.provenance === 'en-cours'"
>
-
</td>
<td
v-else
>
{{
calculerNote
(
item
)
}}
</td>
<td
v-else
>
{{
calculerNote
(
item
)
}}
</td>
<td>
{{
item
.
note_perso
}}
</td>
<td>
{{
item
.
note_perso
}}
</td>
<td
v-show=
"!isActif"
v-if=
"item.provenance !== 'en-cours'"
v-b-popover
.
hover
.
bottom=
"item.tags_fixes.toString()"
>
{{
item
.
tags_fixes
.
toString
()
}}
</td>
<td
v-show=
"!isActif"
v-if=
"item.provenance !== 'en-cours'"
v-b-popover
.
hover
.
bottom=
"tagsFixesContenu(item.tags_fixes)"
>
{{
tagsFixesContenu
(
item
.
tags_fixes
)
}}
</td>
<td
v-show=
"!isActif"
v-else
v-b-popover
.
hover
.
bottom=
"'tags non disponibles'"
>
tags non disponibles
</td>
<td
v-show=
"!isActif"
v-else
v-b-popover
.
hover
.
bottom=
"'tags non disponibles'"
>
tags non disponibles
</td>
<td
v-show=
"!isActif"
v-if=
"item.provenance !== 'en-cours'"
v-b-popover
.
hover
.
bottom=
"tagsLibresContenu(item)"
>
<td
v-show=
"!isActif"
v-if=
"item.provenance !== 'en-cours'"
v-b-popover
.
hover
.
bottom=
"tagsLibresContenu(item)"
>
{{
tagsLibresContenu
(
item
)
}}
</td>
{{
tagsLibresContenu
(
item
)
}}
</td>
...
@@ -112,7 +113,8 @@ isActif ? {'margin-left': '1vw', 'margin-right': '1vw'} : {'margin-left': '0.6vw
...
@@ -112,7 +113,8 @@ isActif ? {'margin-left': '1vw', 'margin-right': '1vw'} : {'margin-left': '0.6vw
<td>
{{
item
.
versionEnCours
.
date
}}
</td>
<td>
{{
item
.
versionEnCours
.
date
}}
</td>
<td>
{{
item
.
popularite
}}
</td>
<td>
{{
item
.
popularite
}}
</td>
<td>
{{
calculerNote
(
item
)
}}
</td>
<td>
{{
calculerNote
(
item
)
}}
</td>
<td
v-show=
"!isActif"
v-b-popover
.
hover
.
bottom=
"item.tags_fixes.toString()"
>
{{
item
.
tags_fixes
.
toString
()
}}
</td>
<td
v-show=
"!isActif"
v-b-popover
.
hover
.
bottom=
"tagsFixesContenu(item.tags_fixes)"
>
{{
tagsFixesContenu
(
item
.
tags_fixes
)
}}
</td>
<td>
{{
item
.
type
}}
</td>
<td>
{{
item
.
type
}}
</td>
<td>
{{
item
.
source
}}
</td>
<td>
{{
item
.
source
}}
</td>
<td
class=
"boutonSupprimer"
>
<input
type=
"checkbox"
v-on:change=
"ajouterCoche($event, item._id, item.versionEnCours)"
class=
"horns"
name=
"horns"
/></td>
<td
class=
"boutonSupprimer"
>
<input
type=
"checkbox"
v-on:change=
"ajouterCoche($event, item._id, item.versionEnCours)"
class=
"horns"
name=
"horns"
/></td>
...
@@ -126,8 +128,8 @@ isActif ? {'margin-left': '1vw', 'margin-right': '1vw'} : {'margin-left': '0.6vw
...
@@ -126,8 +128,8 @@ isActif ? {'margin-left': '1vw', 'margin-right': '1vw'} : {'margin-left': '0.6vw
v-bind:style=
"
{'margin-left': (!isActif ? '94.8%' : '94%')}">
v-bind:style=
"
{'margin-left': (!isActif ? '94.8%' : '94%')}">
<b-popover
target=
"ajouterContenu"
triggers=
"click"
placement=
"lefttop"
>
<b-popover
target=
"ajouterContenu"
triggers=
"click"
placement=
"lefttop"
>
<template
#
title
>
Choix :
</
template
>
<template
#
title
>
Choix :
</
template
>
<button
v-on:click=
"ajouterContenu('1')"
v-bind:style=
"'height: auto; width: auto'"
>
1. Créer un markdown
</button>
<button
class=
"newContenu"
style=
"margin-bottom: 0.5vh"
v-on:click=
"ajouterContenu('1')"
v-bind:style=
"'height: auto; width: auto'"
>
1. Créer un markdown
</button>
<button
v-on:click=
"ajouterContenu('2')"
v-bind:style=
"'height: auto; width: auto'"
>
2. Importer un xml moodle
</button>
<button
class=
"newContenu"
v-on:click=
"ajouterContenu('2')"
v-bind:style=
"'height: auto; width: auto'"
>
2. Importer un xml moodle
</button>
</b-popover>
</b-popover>
</div>
</div>
...
@@ -349,6 +351,16 @@ export default {
...
@@ -349,6 +351,16 @@ export default {
else
else
return
item
.
tags_libres
.
toString
()
return
item
.
tags_libres
.
toString
()
},
},
/**
* @vuese
* Formatte les tags libres du contenu (si existants)
*/
tagsFixesContenu
:
function
(
tags
)
{
if
(
typeof
tags
===
'string'
)
tags
=
JSON
.
parse
(
tags
)
return
tags
.
toString
()
},
/**
/**
* @vuese
* @vuese
* Charger les contenus du panier de l'auteur connecté
* Charger les contenus du panier de l'auteur connecté
...
@@ -654,6 +666,7 @@ export default {
...
@@ -654,6 +666,7 @@ export default {
that
.
panierChoisi
=
true
that
.
panierChoisi
=
true
})
})
}
else
{
}
else
{
Service
.
exporterXML
(
JSON
.
stringify
(
this
.
contenuClique
.
_id
)).
then
(
function
(
reponse
)
{
Service
.
exporterXML
(
JSON
.
stringify
(
this
.
contenuClique
.
_id
)).
then
(
function
(
reponse
)
{
const
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
reponse
.
data
]));
const
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
reponse
.
data
]));
const
link
=
document
.
createElement
(
'a'
)
const
link
=
document
.
createElement
(
'a'
)
...
@@ -1332,4 +1345,9 @@ th image
...
@@ -1332,4 +1345,9 @@ th image
}
}
.newContenu
{
background
:
lightgoldenrodyellow
;
border
:
none
;
}
</
style
>
#FF8C00
</
style
>
#FF8C00
\ No newline at end of file
src/components/moodle/Edit_Choix_Multiple.vue
View file @
d4b5195d
...
@@ -27,11 +27,20 @@
...
@@ -27,11 +27,20 @@
</tr>
</tr>
<tr
style=
"height: 69px"
>
<tr
style=
"height: 69px"
>
<td
style=
"width: 30%; text-align: left"
>
Plusieurs réponses ou une seule?
</td>
<td
style=
"width: 30%; text-align: left"
>
Plusieurs réponses ou une seule?
</td>
<td
style=
"width: 70%; text-align: left"
>
<td
style=
"width: 70%; text-align: left
; padding-top: 4vh
"
>
<select
v-model=
"multipleChoisie"
>
<select
v-model=
"multipleChoisie"
>
<option>
Réponses multiples autorisées
</option>
<option>
Réponses multiples autorisées
</option>
<option>
Une seule réponse
</option>
<option>
Une seule réponse
</option>
</select>
</select>
<br>
<input
type=
"checkbox"
style=
"margin-top: -0.25vh; margin-right: 0.25vw"
v-model=
"isShuffle"
>
<label
style=
"margin-top: -0.25vh"
>
Mélanger les réponses
</label>
</td>
</tr>
<tr>
<td
style=
"width: 30%; text-align: left"
></td>
<td
style=
"width: 70%; text-align: left"
>
</td>
</td>
</tr>
</tr>
<tr
style=
"height: 69px"
>
<tr
style=
"height: 69px"
>
...
@@ -68,7 +77,12 @@
...
@@ -68,7 +77,12 @@
</td>
</td>
</tr>
</tr>
</
template
>
</
template
>
<span
id=
"nvelleReponse"
@
click=
"ajouterReponse"
>
Ajouter une réponse
</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>
...
@@ -89,6 +103,7 @@ export default {
...
@@ -89,6 +103,7 @@ export default {
nomQuestion
:
''
,
nomQuestion
:
''
,
texteQuestion
:
''
,
texteQuestion
:
''
,
noteDefaut
:
0
,
noteDefaut
:
0
,
isShuffle
:
false
,
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%"
],
...
@@ -101,7 +116,69 @@ export default {
...
@@ -101,7 +116,69 @@ export default {
multipleChoisie
:
''
multipleChoisie
:
''
}
}
},
},
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
this
.
questionParsee
.
liste_reponse
=
this
.
reponses
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
.
questionParsee
.
liste_note
.
map
(
note
=>
{
if
(
note
===
'Aucun'
)
return
'0'
;
else
return
note
;})
this
.
questionParsee
.
melange_reponse
=
this
.
isShuffle
switch
(
this
.
questionParsee
.
numerotation
)
{
case
this
.
optionsNumerotation
[
0
]:
this
.
questionParsee
.
numerotation
=
"abc"
break
case
this
.
optionsNumerotation
[
1
]:
this
.
questionParsee
.
numerotation
=
"ABCD"
break
case
this
.
optionsNumerotation
[
2
]:
this
.
questionParsee
.
numerotation
=
"123"
break
case
this
.
optionsNumerotation
[
3
]
:
this
.
questionParsee
.
numerotation
=
"iii"
break
case
this
.
optionsNumerotation
[
4
]
:
this
.
questionParsee
.
numerotation
=
"IIII"
break
case
this
.
optionsNumerotation
[
5
]:
this
.
questionParsee
.
numerotation
=
"none"
break
}
this
.
questionParsee
.
multipleChoisie
=
this
.
multipleChoisie
===
'Une seule réponse'
?
'1'
:
'0'
/* this.feedbacks = this.questionParsee.liste_feedback
this.reponses = this.questionParsee.liste_reponse
this.notes = this.questionParsee.liste_note.map(note => note + "%")
this.notes = this.notes.map(note => {if (note === '0%') return 'Aucun'; else return note;})*/
this
.
$emit
(
"actionMoodle"
,
{
action
:
actionChoisie
,
questionParsee
:
this
.
questionParsee
})
}
},
/**
* @vuese
* Ajouter une réponse au contenu
*/
ajouterReponse
:
function
()
{
this
.
reponses
.
push
(
""
)
this
.
notes
.
push
(
this
.
options
[
0
])
this
.
feedbacks
.
push
(
""
)
}
},
watch
:
{
watch
:
{
questionParsee
:
function
()
{
questionParsee
:
function
()
{
if
(
this
.
questionParsee
.
type_question
===
'multichoice'
)
{
if
(
this
.
questionParsee
.
type_question
===
'multichoice'
)
{
...
@@ -116,7 +193,6 @@ export default {
...
@@ -116,7 +193,6 @@ 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
;})
switch
(
this
.
questionParsee
.
numerotation
)
{
switch
(
this
.
questionParsee
.
numerotation
)
{
case
"abc"
:
case
"abc"
:
this
.
optionNumChoisie
=
this
.
optionsNumerotation
[
0
]
this
.
optionNumChoisie
=
this
.
optionsNumerotation
[
0
]
...
@@ -138,13 +214,16 @@ export default {
...
@@ -138,13 +214,16 @@ export default {
break
break
}
}
this
.
isShuffle
=
this
.
questionParsee
.
melange_reponse
if
(
this
.
questionParsee
.
nb_reponse
){
if
(
this
.
questionParsee
.
nb_reponse
){
this
.
multipleChoisie
=
"Une seule réponse"
this
.
multipleChoisie
=
"Une seule réponse"
}
else
{
}
else
{
this
.
multipleChoisie
=
"Réponses multiples autorisées"
this
.
multipleChoisie
=
"Réponses multiples autorisées"
}
}
}
}
}
},
}
}
}
}
</
script
>
</
script
>
...
@@ -190,4 +269,13 @@ label {
...
@@ -190,4 +269,13 @@ 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
src/components/moodle/Edit_Reponse_Courte.vue
View file @
d4b5195d
...
@@ -38,58 +38,31 @@
...
@@ -38,58 +38,31 @@
</td>
</td>
</tr>
</tr>
<template
v-for=
"i in texteReponse.length"
>
<tr>
<tr
:key=
"i + 'reponse'"
>
<td
style=
"width: 30%; text-align: left"
>
Réponse
1
</td>
<td
style=
"width: 30%; text-align: left"
>
Réponse
{{
i
}}
</td>
<td
style=
"width: 70%; text-align: left"
>
<td
style=
"width: 70%; text-align: left"
>
<input
type=
"text"
style=
"height: 25px;"
v-model=
"texteReponse[
0
]"
/>
<label
id=
"note"
>
Note
</label>
<input
type=
"text"
style=
"height: 25px;"
v-model=
"texteReponse[
i - 1
]"
/>
<label
id=
"note"
>
Note
</label>
<select
style=
"width: 75px;"
v-model=
"noteReponse[
0
]"
>
<select
style=
"width: 75px;"
v-model=
"noteReponse[
i - 1
]"
>
<option
v-for=
"i in options.length"
:key=
"i"
>
{{
options
[
i
-
1
]
}}
</option>
<option
v-for=
"j in options.length"
:key=
"j"
>
{{
options
[
j
-
1
]
}}
</option>
</select>
</select>
</td>
</td>
</tr>
</tr>
<tr
style=
"height: 225px"
>
<tr
style=
"height: 225px"
:key=
"i + 'feedback'"
>
<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: -66px"
v-model=
"feedbackReponse[0]"
/>
<quill-editor
style=
"height: 100px; margin-top: -66px"
v-model=
"feedbackReponse[i - 1]"
/>
</td>
</tr>
<tr>
<td
style=
"width: 30%; text-align: left"
>
Réponse 2
</td>
<td
style=
"width: 70%; text-align: left"
>
<input
type=
"text"
style=
"height: 25px;"
v-model=
"texteReponse[1]"
/>
<label
id=
"note"
>
Note
</label>
<select
style=
"width: 75px;"
v-model=
"noteReponse[1]"
>
<option
v-for=
"i in options.length"
:key=
"i"
>
{{
options
[
i
-
1
]
}}
</option>
</select>
</td>
</td>
</tr>
</tr>
</
template
>
<tr
style=
"height: 225px"
>
<span
id=
"nvelleReponse"
@
click=
"ajouterReponse"
>
Ajouter une réponse
</span>
<td
style=
"width: 30%; text-align: left"
>
Feedback
</td>
<td
style=
"width: 70%"
>
<quill-editor
style=
"height: 100px; margin-top: -66px"
v-model=
"feedbackReponse[1]"
/>
</td>
</tr>
<tr>
<td
style=
"width: 30%; text-align: left"
>
Réponse 3
</td>
<td
style=
"width: 70%; text-align: left"
>
<input
type=
"text"
style=
"height: 25px;"
v-model=
"texteReponse[2]"
/>
<label
id=
"note"
>
Note
</label>
<select
style=
"width: 75px;"
v-model=
"noteReponse[2]"
>
<option
v-for=
"i in options.length"
:key=
"i"
>
{{
options
[
i
-
1
]
}}
</option>
</select>
</td>
</tr>
<tr
style=
"height: 225px"
>
<td
style=
"width: 30%; text-align: left"
>
Feedback
</td>
<td
style=
"width: 70%"
>
<quill-editor
style=
"height: 100px; margin-top: -66px"
v-model=
"feedbackReponse[2]"
/>
</td>
</tr>
</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>
...
@@ -119,6 +92,47 @@ export default {
...
@@ -119,6 +92,47 @@ export default {
"12.5%"
,
"11.11%"
,
"10%"
,
"5%"
]
"12.5%"
,
"11.11%"
,
"10%"
,
"5%"
]
}
}
},
},
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
this
.
questionParsee
.
liste_reponse
=
this
.
texteReponse
this
.
questionParsee
.
liste_note
=
this
.
noteReponse
.
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_feedback
=
this
.
feedbackReponse
this
.
questionParsee
.
majuscule
=
this
.
choixCasse
===
this
.
optionsCasse
[
0
]
?
0
:
1
/* this.texteReponse = this.questionParsee.liste_reponse.filter(reponse => reponse)
this.noteReponse = this.questionParsee.liste_note.map(note => note + "%")
this.feedbackReponse = this.questionParsee.liste_feedback
this.choixCasse = this.optionsCasse[this.questionParsee.majuscule]*/
this
.
$emit
(
"actionMoodle"
,
{
action
:
actionChoisie
,
questionParsee
:
this
.
questionParsee
})
}
},
/**
* @vuese
* Ajouter une réponse au contenu
*/
ajouterReponse
:
function
()
{
this
.
texteReponse
.
push
(
""
)
this
.
noteReponse
.
push
(
this
.
options
[
0
])
this
.
feedbackReponse
.
push
(
""
)
}
},
watch
:
{
watch
:
{
questionParsee
:
function
()
{
questionParsee
:
function
()
{
if
(
this
.
questionParsee
.
type_question
===
'shortanswer'
)
{
if
(
this
.
questionParsee
.
type_question
===
'shortanswer'
)
{
...
@@ -183,4 +197,13 @@ td > * {
...
@@ -183,4 +197,13 @@ td > * {
margin-right
:
5px
;
margin-right
:
5px
;
margin-bottom
:
7.5px
;
margin-bottom
:
7.5px
;
}
}
#nvelleReponse
::before
{
content
:
"\002B"
;
}
#nvelleReponse
{
text-decoration
:
underline
;
}
</
style
>
</
style
>
\ No newline at end of file
src/components/moodle/Edit_Vrai_Faux.vue
View file @
d4b5195d
...
@@ -83,6 +83,11 @@ export default {
...
@@ -83,6 +83,11 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
/**
* @vuese
* récupération de l'action utilisateur
* @param actionChoisie
*/
action
:
function
(
actionChoisie
)
{
action
:
function
(
actionChoisie
)
{
if
(
actionChoisie
===
'arriere'
){
if
(
actionChoisie
===
'arriere'
){
this
.
$emit
(
"actionMoodle"
,
{
action
:
actionChoisie
})
this
.
$emit
(
"actionMoodle"
,
{
action
:
actionChoisie
})
...
...
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