Commit 8a28c152 authored by Neveux Anais's avatar Neveux Anais

add order exercise

parent d092646c
......@@ -341,6 +341,52 @@
<!-- ******** EXERCICE AVEC ET SANS CORRIGE ******** -->
<!-- Ordonnancement -->
<xsl:template match='sp:question/cp:order | sp:exercice/cp:order'>
<section data-hdoc-type='order'>
<header>
<h1><xsl:value-of select='cp:questionM/sp:title'/></h1>
</header>
<div data-hdoc-type='question'>
<xsl:apply-templates select='sc:question/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para'/>
</div>
<xsl:apply-templates select="//sc:label"/>
<xsl:if test="../name() = 'sp:question'">
<div data-hdoc-type='explanation'>
<xsl:apply-templates select="sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
</div>
</xsl:if>
</section>
</xsl:template>
<xsl:template match='sc:item/cp:order'>
<xsl:param name="withoutExplanation"/>
<section data-hdoc-type='order'>
<header>
<h1><xsl:value-of select='cp:questionM/sp:title'/></h1>
</header>
<div data-hdoc-type='question'>
<xsl:apply-templates select='sc:question/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para'/>
</div>
<xsl:apply-templates select="//sc:label"/>
<xsl:if test="$withoutExplanation = 'sp:question'">
<div data-hdoc-type='explanation'>
<xsl:apply-templates select="sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
</div>
</xsl:if>
</section>
</xsl:template>
<xsl:template match="sc:label">
<div data-hdoc-type = 'label'>
<xsl:apply-templates select='cp:label/sp:txt/cp:txtLabel/sc:para'/>
</div>
</xsl:template>
<!-- Texte à trou -->
<xsl:template match="sp:question/cp:cloze | sp:exercice/cp:cloze">
<section data-hdoc-type='fill-in-the-blank'>
......
......@@ -445,7 +445,7 @@
<xsl:choose>
<!-- If it is directly included in a div, we have to add Opale's text markups -->
<xsl:when test="parent::*[name() = 'div'] and not(parent::*[@data-hdoc-type = 'gapText'])">
<xsl:when test="parent::*[name() = 'div'] and not(parent::*[@data-hdoc-type = 'gapText']) and not(parent::*[@data-hdoc-type = 'label'])">
<sp:txt>
<op:txt>
<xsl:call-template name="blockloop"/>
......@@ -630,6 +630,33 @@
</sp:listing>
</xsl:template>
<!-- Order exercise -->
<xsl:template match="h:section[@data-hdoc-type = 'order']" priority="2">
<sp:trainUcOrdWord>
<op:ordWord>
<op:exeM>
<sp:title><xsl:value-of select="h:header/h:h1"/></sp:title>
</op:exeM>
<xsl:apply-templates select="h:div[@data-hdoc-type='question']"/>
<xsl:apply-templates select="h:div[@data-hdoc-type= 'label']"/>
<sc:globalExplanation>
<op:res>
<xsl:apply-templates select="./h:div[@data-hdoc-type = 'explanation']/h:p"/>
</op:res>
</sc:globalExplanation>
</op:ordWord>
</sp:trainUcOrdWord>
</xsl:template>
<xsl:template match="h:div[@data-hdoc-type = 'label']">
<sc:label>
<op:labelTxt>
<xsl:apply-templates select="./*"/>
</op:labelTxt>
</sc:label>
</xsl:template>
<!-- Fill-in-the-blank -->
<xsl:template match="h:section[@data-hdoc-type = 'fill-in-the-blank']" priority="2">
<sp:trainUcCloze>
......
......@@ -29,6 +29,7 @@
<value>activity</value>
<value>aims</value>
<value>synthesis</value>
<value>order</value>
</choice>
</attribute>
</optional>
......@@ -61,6 +62,7 @@
<value>openQuestion</value>
<value>hint</value>
<value>gapText</value>
<value>label</value>
</choice>
</attribute>
</optional>
......
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