| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 
 |  
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" indent="yes" encoding="ISO-8859-1"/><!-- intégration avec formulaire or tomcat est configuré en iso !! -->
 
	<xsl:variable name="quote">'</xsl:variable>
	<xsl:template match="/el">
 
			<xsl:apply-templates mode="standard">
				<xsl:with-param name="level">1</xsl:with-param>
			</xsl:apply-templates>
 
	</xsl:template>
 
 
	<xsl:template match="el" mode="elWithChildAsLeaf">
		<xsl:if test="boolean(scoreInfo)">
			<xsl:variable name="scoreNode" select="scoreInfo"/>
			<xsl:variable name="score" select="round((100 * $scoreNode/@numerator) div $scoreNode/@denominator)"/> 
			<xsl:variable name="done" select="round((100 * $scoreNode/@denominator) div @nTotalPoint)"/>
 
			<tr>
				<td>
				<xsl:value-of select="@title"/>
				</td>
				<td class="percent">
				<xsl:value-of select="$score"/> %
				</td>
				<td class="percent">
				<xsl:value-of select="$done"/> %
				</td>
			</tr>
		</xsl:if>
	</xsl:template>
 
	<xsl:template match="el" mode="standard">
		<xsl:param name="level"/>
 
		<xsl:variable name="hasBeenViewed" select="@hasBeenViewed='true'"/>
		<!--<xsl:message><xsl:value-of select="$hasBeenViewed"/></xsl:message>-->
		<xsl:if test="$hasBeenViewed">
			<!--<xsl:message>DoIT</xsl:message>-->
			<xsl:variable name="isNotChildLeaf" select="boolean(el/el)"/>
 
			<xsl:variable name="spanId" select="concat('span-',@identifier)"/>
			<xsl:variable name="linkId" select="concat('link-',@identifier)"/>
			<xsl:variable name="titleId" select="concat('title-',@identifier)"/>
 
 
			<a class="txt_deroulant">
 
				<xsl:attribute name="id"><xsl:value-of select="$linkId"/></xsl:attribute>
				<!--<xsl:attribute name="onclick">javascript:<xsl:value-of select="concat('click(',$quote,$spanId,$quote,',',$quote,$linkId,$quote,',',$quote,$titleId,$quote,');return false;')"/></xsl:attribute>-->
				<xsl:attribute name="href">javascript:<xsl:value-of select="concat('click(',$quote,$spanId,$quote,',',$quote,$linkId,$quote,',',$quote,$titleId,$quote,');')"/></xsl:attribute>
			<!--<div id="genNode">	-->
 
 
			<div>
				<!--concat('show(','''',$spanId,''',',$linkId,''',',$titleId,'''); return false;')-->
 
 
					<xsl:attribute name="id"><xsl:value-of select="$titleId"/></xsl:attribute>
 
						<table width="100%" class="header">
							<tr>	
								<td width="50%">
									<xsl:attribute name="class">h<xsl:value-of select="$level"/></xsl:attribute>
									<xsl:value-of select="@title"/>
								</td>
								<td id="noPad">
								<xsl:attribute name="class">h<xsl:value-of select="$level"/></xsl:attribute>
								<xsl:choose>
										<xsl:when test="boolean(scoreInfo)">								
											<xsl:variable name="scoreNode" select="scoreInfo"/>
											<xsl:value-of select="round((100 * $scoreNode/@numerator) div $scoreNode/@denominator)"/> 
										%
										</xsl:when>
										<xsl:otherwise>-</xsl:otherwise>
									</xsl:choose>
 
 
 
 
								</td>
								<td id="noPad">
 
									<xsl:attribute name="class">h<xsl:value-of select="$level"/></xsl:attribute>
									Done
								</td>						
							</tr>
						</table>
						<!--<div id="left">
							<xsl:attribute name="class">h<xsl:value-of select="$level"/></xsl:attribute>
							<xsl:value-of select="@title"/>
						</div>
 
						<div id="right">
							<xsl:choose>
								<xsl:when test="boolean(scoreInfo)">								
									<xsl:variable name="scoreNode" select="scoreInfo"/>
									<xsl:value-of select="round((100 * $scoreNode/@numerator) div $scoreNode/@denominator)"/> 
									%
								</xsl:when>
								<xsl:otherwise>-</xsl:otherwise>
							</xsl:choose>
						</div>
 
						<div id="center">
							<xsl:attribute name="class">h<xsl:value-of select="$level"/></xsl:attribute>
							Score
						</div>-->
					</div>
				<!--</div>				-->
			</a>
 
 
 
			<div id="hiddenTxt">
				<span style="display:none;">
					<xsl:attribute name="id"><xsl:value-of select="$spanId"/></xsl:attribute>
					<xsl:choose>
						<xsl:when test="$isNotChildLeaf">
							<xsl:apply-templates mode="standard">				
								<xsl:with-param name="level" select="$level+1"/>
							</xsl:apply-templates>
						</xsl:when>
						<xsl:otherwise>
							<br />
								<table class="studentProgress">
									<tr class="titleCells">
										<td class="hollow">&nbsp;</td>
										<td class="percent">
										Score
										</td>
										<td class="percent">
										% Done
										</td>
									</tr>	
									<xsl:apply-templates mode="elWithChildAsLeaf"/>				
								</table>
							<br />						
						</xsl:otherwise>
					</xsl:choose>
				</span>
			</div>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet> | 
Partager