Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hdoc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Stephane Crozat
hdoc
Commits
8a28c152
Commit
8a28c152
authored
Jan 05, 2017
by
Neveux Anais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add order exercise
parent
d092646c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
1 deletion
+76
-1
canoprof_to_hdoc/xsl/programmation.xsl
canoprof_to_hdoc/xsl/programmation.xsl
+46
-0
canoprof_to_opale/sample/Ordonnancement.scar
canoprof_to_opale/sample/Ordonnancement.scar
+0
-0
canoprof_to_opale/sample/Ordonnancement_transclusion.scar
canoprof_to_opale/sample/Ordonnancement_transclusion.scar
+0
-0
hdoc_to_opale/xsl/transformation2.xsl
hdoc_to_opale/xsl/transformation2.xsl
+28
-1
schemas/xhtml/type.rng
schemas/xhtml/type.rng
+2
-0
No files found.
canoprof_to_hdoc/xsl/programmation.xsl
View file @
8a28c152
...
...
@@ -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'
>
...
...
canoprof_to_opale/sample/Ordonnancement.scar
0 → 100644
View file @
8a28c152
File added
canoprof_to_opale/sample/Ordonnancement_transclusion.scar
0 → 100644
View file @
8a28c152
File added
hdoc_to_opale/xsl/transformation2.xsl
View file @
8a28c152
...
...
@@ -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>
...
...
schemas/xhtml/type.rng
View file @
8a28c152
...
...
@@ -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>
...
...
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