Commit abbf5cdf authored by Neveux Anais's avatar Neveux Anais

Update README for both projects. Add choice explanation for QCM and QCU. Add...

Update README for both projects. Add choice explanation for QCM and QCU. Add choice explanation in hdoc_to_opale xsl for QCU.
parent c1ac4703
# Convertisseur Canoprof vers HDOC
##Credits
### Autumn 2016
* NEVEUX Anaïs
* BELLIER Pierre-Ulysse
## User story
Un utilisateur a créé un cours de mathématiques à l'aide de l'outil Canoprof. Il souhaite, pour une raison quelconque, convertir son projet (et donc ses activités et programmations) dans un autre format. Pour cela il utilise notre convertisseur qui permet préalablement une conversion vers un format intermédiare (hdoc). Il fait donc un clic droit sur l'élément principal de son projet sous Canoprof et clique sur "exporter l'archive". Il laisse les options (Inclure le réseau descendant complet des items sélectionnés, et Préserver les espaces de l'atelier) par défaut. Il déplace ensuite le fichier .scar obtenu dans le dossier input du convertisseur puis exécute le fichier run.bat (ou run.sh sous un système UNIX). Une fois l'exécution terminée, il récupère son hdoc dans le dossier output.
......@@ -16,4 +24,15 @@ Un utilisateur a cr
- Information/Warning/Advice/ect...
- Method and Remind fully functional.
- Add QCU and QCM. Transclusion of them available too. Need to fix a schema validation error when putting a title to a question, without filling the question content.
-Add "Exercice redactionnel" and transclusion.
\ No newline at end of file
- Add "Exercice redactionnel" and transclusion.
## Known bugs
- You can have an exercice with no question but a solution. We should add a if statement to handle this.
- Something create a "keywrds" node inside the opale output, that make the schema invalid. Editing the title inside myScenari and just pressing enter is sufficient to fix that. But it will be better to fix that inside one of the xsl files.
## TODO List
- Allow user to convert scar files which contain a .programme file with a name different than "Test.programme".
- Handle multiple files conversion
- Add all other type of exercices
- Handle other kind of paragraph
- Handle resources (images for example)
\ No newline at end of file
......@@ -343,7 +343,7 @@
</header>
<section>
<header><h1/></header>
<xsl:if test="sp:question/cp:flow/*">
<xsl:if test="sp:question/cp:flow/*[name() != 'sp:profInstruction']">
<div data-hdoc-type='openQuestion'>
<xsl:apply-templates select="sp:question/cp:flow/sp:txt/cp:txt//sc:para"/>
</div>
......@@ -394,7 +394,7 @@
<h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
</header>
<div data-hdoc-type = 'question'>
<xsl:apply-templates select='sc:question/cp:block'/>
<xsl:apply-templates select='sc:question/cp:block/sp:body'/>
</div>
<xsl:apply-templates select="sc:choices/sc:choice"/>
<xsl:if test="$withoutExplanation = 'sp:question' and sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt">
......@@ -411,7 +411,7 @@
<h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
</header>
<div data-hdoc-type = 'question'>
<xsl:apply-templates select='sc:question/cp:block'/>
<xsl:apply-templates select='sc:question/cp:block/sp:body'/>
</div>
<xsl:apply-templates select="sc:choices/sc:choice"/>
<xsl:if test="../name() = 'sp:question' and sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt">
......@@ -429,7 +429,7 @@
<h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
</header>
<div data-hdoc-type='singlechoicequestion'>
<xsl:apply-templates select="sc:question/cp:block"/>
<xsl:apply-templates select="sc:question/cp:block/sp:body"/>
</div>
<xsl:apply-templates select="sc:choices//sc:choice"/>
<div data-hdoc-type='solution'><p><xsl:value-of select="sc:solution/@choice"/></p></div>
......@@ -448,7 +448,7 @@
<h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
</header>
<div data-hdoc-type='singlechoicequestion'>
<xsl:apply-templates select="sc:question/cp:block"/>
<xsl:apply-templates select="sc:question/cp:block/sp:body"/>
</div>
<xsl:apply-templates select="sc:choices//sc:choice"/>
<div data-hdoc-type='solution'><p><xsl:value-of select="sc:solution/@choice"/></p></div>
......@@ -464,12 +464,13 @@
<xsl:template match="sc:choice">
<div data-hdoc-type='choice'>
<xsl:apply-templates select="sc:choiceLabel/cp:txt/sc:para"/>
<xsl:if test="sc:choiceExplanation">
<div data-hdoc-type='explanation-choice-correct'>
<xsl:apply-templates select="sc:choiceExplanation/cp:txt/sc:para"/>
</div>
</xsl:if>
</div>
<xsl:if test="sc:choiceExplanation">
<div data-hdoc-type='explanation-choice-correct'>
<xsl:apply-templates select="sc:choiceExplanation/cp:txt/sc:para"/>
</div>
</xsl:if>
</xsl:template>
......@@ -478,19 +479,25 @@
<xsl:when test="@solution = 'checked'">
<div data-hdoc-type='choice-correct'>
<xsl:apply-templates select="sc:choiceLabel/cp:txt/sc:para"/>
<xsl:if test="sc:choiceExplanation">
<div data-hdoc-type='explanation-choice-correct'>
<xsl:apply-templates select="sc:choiceExplanation/cp:txt/sc:para"/>
</div>
</xsl:if>
</div>
</xsl:when>
<xsl:otherwise>
<div data-hdoc-type='choice-incorrect'>
<xsl:apply-templates select="sc:choiceLabel/cp:txt/sc:para"/>
<xsl:if test="sc:choiceExplanation">
<div data-hdoc-type='explanation-choice-incorrect'>
<xsl:apply-templates select="sc:choiceExplanation/cp:txt/sc:para"/>
</div>
</xsl:if>
</div>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="sc:choiceExplanation">
<div data-hdoc-type='explanation-choice-correct'>
<xsl:apply-templates select="sc:choiceExplanation/cp:txt/sc:para"/>
</div>
</xsl:if>
</xsl:template>
<xsl:template match="sp:question[@sc:refUri] | sp:exercice[@sc:refUri]">
......
# Canoprof2Opale
##Credits
### Autumn 2016
* NEVEUX Anaïs
* BELLIER Pierre-Ulysse
## User story
Un utilisateur a créé un cours de mathématiques à l'aide de l'outil Canoprof. Il souhaite, pour une raison quelconque, convertir son projet (et donc ses activités et programmations) au format Opale. Pour cela il utilise notre convertisseur qui va agir en deux étapes : une conversion dans un format intermédiaire (le format hdoc), puis conversion de ce hdoc dans le format Opale. Une fois son cours créé, il effectue un clic-droit sur l'élément racine de son projet, et choisit "exporter l'archive". Il laisse les options (Inclure le réseau descendant complet des items sélectionnés, et Préserver les espaces de l'atelier) par défaut. Il déplace ensuite le fichier .scar obtenu dans le dossier input du convertisseur puis exécute le fichier run.bat (ou run.sh sous un système UNIX). Il récupère ensuite un nouveau fichier .scar dans le dossier output, qu'il pourra importer dans Scenari.
## Getting started
- Put the Canoprof .scar in the input folder. The scar should be the only one in this folder. The .programme should be into the root of your .scar and should be named Test.programme
An .scar example is already in the input folder.
A .scar example is already in the input folder.
- Check if there's no .scar file in the input folder of canoprof_to_hdoc folder. If files exist, please remove them. Otherwise, the converter can take one of the .scar in this folder instead of the one you want to convert.
- Use the run.bat file to launch conversion.
- You will find your converted .scar in the output folder.
......@@ -14,10 +22,19 @@ An .scar example is already in the input folder.
## What the converter handle
- Sequence
- Session
- Activity created in the .programme, transclusion should be available soon.
- Activity created in the .programme, transclusion available.
- Information/Warning/Advice/ect...
- Method and Remind fully functional
- QCM and QCU working, even with transclusion.
- Add "Exercice redactionnel" and transclusion.
## Known bugs
- You can have an exercice with no question but a solution. We should add a if statement to handle this.
- Something create a "keywrds" node inside the opale output, that make the schema invalid. Editing the title inside myScenari and just pressing enter is sufficient to fix that. But it will be better to fix that inside one of the xsl files.
## TODO List
- Allow user to convert scar files which contain a .programme file with a name different than "Test.programme".
- Handle multiple files conversion
- Add all other type of exercices
- Handle other kind of paragraph
- Handle resources (images for example)
......@@ -758,7 +758,7 @@
<xsl:template match="h:div[@data-hdoc-type = 'choice-correct']">
<sc:choice solution="checked">
<xsl:call-template name="choice" />
<sc:choiceExplanation>
<sc:choiceExplanation>
<op:txt>
<sc:para>
<xsl:apply-templates select="./h:div[@data-hdoc-type = 'explanation-choice-correct']/h:p/text()"/>
......@@ -784,6 +784,15 @@
<xsl:template match="./h:div[@data-hdoc-type = 'choice']">
<sc:choice>
<xsl:call-template name="choice" />
<xsl:if test="h:div[@data-hdoc-type = 'explanation-choice-correct']">
<sc:choiceExplanation>
<op:txt>
<sc:para>
<xsl:apply-templates select="./h:div[@data-hdoc-type = 'explanation-choice-correct']/h:p/text()"/>
</sc:para>
</op:txt>
</sc:choiceExplanation>
</xsl:if>
</sc:choice>
</xsl:template>
......
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