Changeset 6533


Ignore:
Timestamp:
09/13/06 20:56:37 (5 years ago)
Author:
anp
Message:

preview des mcq

Location:
trunk/Wsp_ModelingAssmnt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_ModelingAssmnt/es/content/assmntUnitMlqPrim/xml.xed.xml

    r6407 r6533  
    228228                                                        </childs> 
    229229                                                </element> 
    230                                                 <!--  
    231230                                                <element se:name="sm:htmlPreview" se:bind="element" se:card="?"> 
    232231                                                        <childs> 
     
    250249                                                                        </childs> 
    251250                                                                </element> 
    252                                                                 <element se:bind="element" se:name="sm:choicesBlock" se:card="?"> 
     251                                                                <se:ref se:refid="eBase" se:name="sm:globalExplanationBlock"/> 
     252                                                                <se:ref se:refid="eBase" se:name="sm:hintBlock"/> 
     253                                                                <se:ref se:refid="eBase" se:name="sm:feedbackBlock"/> 
     254                                                                <se:ref se:refid="eBase" se:name="sm:groupBlock"/> 
     255                                                                <element se:bind="element" se:name="sm:labelList" se:card="?"> 
     256                                                                        <childs> 
     257                                                                                <se:choice se:card="*"> 
     258                                                                                        <element se:bind="element" se:name="sm:entryStyle"> 
     259                                                                                                <atts> 
     260                                                                                                        <attribute se:bind="attribute" se:name="key" se:mandat="true"> 
     261                                                                                                                <wordsInput notnull="true" trim="true"/> 
     262                                                                                                        </attribute> 
     263                                                                                                        <attribute se:bind="attribute" se:name="value" se:mandat="true"> 
     264                                                                                                                <wordsInput notnull="true" trim="true"/> 
     265                                                                                                        </attribute> 
     266                                                                                                </atts> 
     267                                                                                        </element> 
     268                                                                                        <element se:bind="element" se:name="sm:entryImgStyle"> 
     269                                                                                                <atts> 
     270                                                                                                        <attribute se:bind="attribute" se:name="key" se:mandat="true"> 
     271                                                                                                                <wordsInput notnull="true" trim="true"/> 
     272                                                                                                        </attribute> 
     273                                                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" se:mandat="true" class="xmlview"  regexpSgn=".*#Image\b.*"/> 
     274                                                                                                </atts> 
     275                                                                                        </element> 
     276                                                                                </se:choice> 
     277                                                                                <insert se:bind="current"/> 
     278                                                                        </childs> 
     279                                                                </element> 
     280                                                                <element se:bind="element" se:name="sm:orderLabelsBlock" se:card="?"> 
    253281                                                                        <atts> 
    254282                                                                                <attribute se:bind="attribute" se:name="display" se:mandat="false" se:defaultvalue="true"> 
     
    258286                                                                                        </choiceInput> 
    259287                                                                                </attribute> 
     288                                                                                <attribute se:bind="attribute" se:name="displayName" se:mandat="false"> 
     289                                                                                        <wordsInput trim="true"/> 
     290                                                                                </attribute> 
    260291                                                                        </atts> 
    261292                                                                        <childs> 
     
    266297                                                                                                </atts> 
    267298                                                                                        </element> 
    268                                                                                         <se:ref se:refid="sm:iconBlock" se:name="sm:iconChoice"/> 
    269                                                                                         <element se:bind="element" se:name="sm:tableStyles" se:card="?" forcefilled="true" se:show="ifExist"> 
    270                                                                                                 <atts> 
    271                                                                                                         <attribute se:bind="attribute" se:name="general"> 
    272                                                                                                                 <wordsInput/> 
    273                                                                                                         </attribute> 
    274                                                                                                         <attribute se:bind="attribute" se:name="lignes"> 
    275                                                                                                                 <wordsInput/> 
    276                                                                                                         </attribute> 
    277                                                                                                         <attribute se:bind="attribute" se:name="imgRow"> 
    278                                                                                                                 <wordsInput/> 
    279                                                                                                         </attribute> 
    280                                                                                                         <attribute se:bind="attribute" se:name="dataRow"> 
    281                                                                                                                 <wordsInput/> 
    282                                                                                                         </attribute> 
    283                                                                                                         <attribute se:bind="attribute" se:name="scoringRow"> 
    284                                                                                                                 <wordsInput/> 
    285                                                                                                         </attribute> 
    286                                                                                                         <attribute se:bind="attribute" se:name="commentRow"> 
    287                                                                                                                 <wordsInput/> 
    288                                                                                                         </attribute> 
    289                                                                                                 </atts> 
    290                                                                                         </element> 
    291                                                                                         <element se:bind="element" se:name="sm:dataStyles" se:card="?" forcefilled="true" se:show="ifExist"> 
    292                                                                                                 <atts> 
    293                                                                                                         <attribute se:bind="attribute" se:name="label"> 
    294                                                                                                                 <wordsInput/> 
    295                                                                                                         </attribute> 
    296                                                                                                         <attribute se:bind="attribute" se:name="explanation"> 
    297                                                                                                                 <wordsInput/> 
    298                                                                                                         </attribute> 
    299                                                                                                         <attribute se:bind="attribute" se:name="rowTitle"> 
    300                                                                                                                 <wordsInput/> 
    301                                                                                                         </attribute> 
    302                                                                                                 </atts> 
    303                                                                                         </element> 
    304                                                                                         <element se:bind="element" se:name="sm:booleanScoringLabels" se:card="?" forcefilled="true" se:show="ifExist"> 
    305                                                                                                 <atts> 
    306                                                                                                         <attribute se:bind="attribute" se:name="right"> 
    307                                                                                                                 <wordsInput/> 
    308                                                                                                         </attribute> 
    309                                                                                                         <attribute se:bind="attribute" se:name="wrong"> 
    310                                                                                                                 <wordsInput/> 
    311                                                                                                         </attribute> 
    312                                                                                                 </atts> 
    313                                                                                         </element> 
    314                                                                                         <element se:bind="element" se:name="sm:multipleUserResponseLabels" se:card="?" forcefilled="true" se:show="ifExist"> 
    315                                                                                                 <atts> 
    316                                                                                                         <attribute se:bind="attribute" se:name="checked"> 
    317                                                                                                                 <wordsInput/> 
    318                                                                                                         </attribute> 
    319                                                                                                         <attribute se:bind="attribute" se:name="unchecked"> 
    320                                                                                                                 <wordsInput/> 
    321                                                                                                         </attribute> 
    322                                                                                                         <attribute se:bind="attribute" se:name="undefined"> 
    323                                                                                                                 <wordsInput/> 
    324                                                                                                         </attribute> 
    325                                                                                                 </atts> 
    326                                                                                         </element> 
    327299                                                                                </insert4all> 
    328300                                                                        </childs> 
    329301                                                                </element> 
    330                                                                 <se:ref se:refid="eBase" se:name="sm:globalExplanationBlock"/> 
    331                                                                 <se:ref se:refid="eBase" se:name="sm:hintBlock"/> 
    332302                                                        </childs> 
    333                                                 </element> --> 
     303                                                </element> 
    334304                                        </childs> 
    335305                                </element> 
  • trunk/Wsp_ModelingAssmnt/spaces/gen/modelBuilder/bs.doss/_common/sma/communPreview.xsl.xsl

    r6458 r6533  
    127127                        ex : hints, ...--> 
    128128        <xsl0:template name="tGetBaseTemplateView"> 
     129                <xsl0:param name="pNoMatch"/> 
    129130                <xsl0:param name="pTitle"/><!-- optionnel --> 
    130131                <xsl0:param name="pElementName"/><!-- optionnel --> 
     
    133134                <xsl0:param name="pConfCode"/><!-- optionnel --> 
    134135                <xsl0:param name="pMode"/><!-- content --> 
     136                <xsl0:param name="pCateg"/><!-- content --> 
    135137                 
    136138                <xsl0:variable name="vElementName"> 
     
    142144                        </xsl0:choose> 
    143145                </xsl0:variable> 
    144                 <xsl:template mode="{resultatAgent('//codeModel')}"> 
    145                         <xsl0:attribute name="match"><xsl0:value-of select="concat(si(string-length(normalize-space($pElementNamespace))&gt;0, concat($pElementNamespace, ':'), 'sc:'), $vElementName)"/></xsl0:attribute> 
     146                 
     147                <xsl0:variable name="vContent"> 
    146148                        <xsl0:if test="not(key('htmlPreviewBlocks', concat($vElementName, '_', $pConfCode))) or key('htmlPreviewBlocks', concat($vElementName, '_', $pConfCode))/@display='true'"> 
    147149                                <xsl0:variable name="vIsResDefined" select="boolean(key('htmlPreviewBlocks', concat($vElementName, '_', $pConfCode))/sm:iconBlock/@sc:refUri)"/> 
     
    174176                                                <treeBlockElement title="{@name}"> 
    175177                                                        <content level="+"> 
    176                                                                 <imgBlock categ="{normalize-space(@name)}"> 
     178                                                                <imgBlock categ="{si($pCateg, $pCateg, normalize-space(@name))}"> 
    177179                                                                        <xsl0:attribute name="src"> 
    178180                                                                                <xsl0:value-of select="$vUriResGen"/> 
     
    197199                                </xsl0:choose> 
    198200                        </xsl0:if> 
    199                 </xsl:template> 
     201                </xsl0:variable> 
     202                 
     203                <xsl0:choose> 
     204                        <xsl0:when test="$pNoMatch='true'"> 
     205                                <xsl0:copy-of select="$vContent"/> 
     206                        </xsl0:when> 
     207                        <xsl0:otherwise> 
     208                                <xsl:template mode="{resultatAgent('//codeModel')}"> 
     209                                        <xsl0:attribute name="match"><xsl0:value-of select="concat(si(string-length(normalize-space($pElementNamespace))&gt;0, concat($pElementNamespace, ':'), 'sc:'), $vElementName)"/></xsl0:attribute> 
     210                                <xsl0:copy-of select="$vContent"/> 
     211                                </xsl:template> 
     212                        </xsl0:otherwise> 
     213                </xsl0:choose> 
     214                         
     215        </xsl0:template> 
     216         
     217        <!-- hints --> 
     218        <xsl0:template match="sm:hintModel"> 
     219                <xsl0:call-template name="tGetBaseTemplateView"> 
     220                        <xsl0:with-param name="pTitle"> 
     221                                <xsl:if test="@cost"> 
     222                                        (<xsl0:value-of select="sm:hintCost/@name"/> : <xsl0:if test="sm:hintCost/sm:percentageLost">-</xsl0:if><xsl:value-of select="@cost"/><xsl0:if test="sm:hintCost/sm:percentageLost">%</xsl0:if>) 
     223                                </xsl:if> 
     224                        </xsl0:with-param> 
     225                </xsl0:call-template> 
     226        </xsl0:template> 
     227         
     228        <!-- feedback --> 
     229        <xsl0:template match="sm:feedbackModel"> 
     230                <xsl0:call-template name="tGetBaseTemplateView"> 
     231                        <xsl0:with-param name="pElementName">feedbacks</xsl0:with-param> 
     232                        <xsl0:with-param name="pContent"> 
     233                                <xsl0:apply-templates/> 
     234                        </xsl0:with-param> 
     235                </xsl0:call-template> 
     236        </xsl0:template> 
     237         
     238        <xsl0:template match="sm:scaledScoreIntervals | sm:pointScoreIntervals"> 
     239                <xsl:for-each select="sc:feedback"> 
     240                        <treeBlockElement> 
     241                                <imgBlock src=""> 
     242                                        <titleBlock><xsl0:value-of select="sm:interval/@name"/> 
     243                                                <xsl:if test="@gt or @get or @lt or @let">&#160;:&#160;</xsl:if> 
     244                                                <xsl:if test="@gt"> 
     245                                                        <xsl0:value-of select="sm:interval/sm:scoreMoreThan/@name"/> 
     246                                                        <xsl:text>&#160;</xsl:text> 
     247                                                        <xsl0:choose> 
     248                                                                <xsl0:when test="local-name()='scaledScoreIntervals'"> 
     249                                                                        <xsl:call-template name="t_scaledScoreIntervals"><xsl:with-param name="pScore" select="@gt"/></xsl:call-template> 
     250                                                                </xsl0:when> 
     251                                                                <xsl0:otherwise><xsl:value-of select="@gt"/></xsl0:otherwise> 
     252                                                        </xsl0:choose> 
     253                                                        <xsl:if test="@gt"><xsl:text>&#160;et&#160;</xsl:text></xsl:if> 
     254                                                </xsl:if> 
     255                                                <xsl:if test="@get"> 
     256                                                        <xsl0:value-of select="sm:interval/sm:scoreMoreOrEqualThan/@name"/> 
     257                                                        <xsl:text>&#160;</xsl:text> 
     258                                                        <xsl0:choose> 
     259                                                                <xsl0:when test="local-name()='scaledScoreIntervals'"> 
     260                                                                        <xsl:call-template name="t_scaledScoreIntervals"><xsl:with-param name="pScore" select="@get"/></xsl:call-template> 
     261                                                                </xsl0:when> 
     262                                                                <xsl0:otherwise><xsl:value-of select="@get"/></xsl0:otherwise> 
     263                                                        </xsl0:choose> 
     264                                                </xsl:if> 
     265                                                <xsl:if test="@lt"> 
     266                                                        <xsl:if test="@gt or @get"><xsl:text>&#160;et&#160;</xsl:text></xsl:if> 
     267                                                        <xsl0:value-of select="sm:interval/sm:scoreLessThan/@name"/> 
     268                                                        <xsl:text>&#160;</xsl:text> 
     269                                                        <xsl0:choose> 
     270                                                                <xsl0:when test="local-name()='scaledScoreIntervals'"> 
     271                                                                        <xsl:call-template name="t_scaledScoreIntervals"><xsl:with-param name="pScore" select="@lt"/></xsl:call-template> 
     272                                                                </xsl0:when> 
     273                                                                <xsl0:otherwise><xsl:value-of select="@lt"/></xsl0:otherwise> 
     274                                                        </xsl0:choose> 
     275                                                </xsl:if> 
     276                                                <xsl:if test="@let"> 
     277                                                        <xsl:if test="@gt or @get"><xsl:text>&#160;et&#160;</xsl:text></xsl:if> 
     278                                                        <xsl0:value-of select="sm:interval/sm:scoreLessOrEqualThan/@name"/> 
     279                                                        <xsl:text>&#160;</xsl:text> 
     280                                                        <xsl0:choose> 
     281                                                                <xsl0:when test="local-name()='scaledScoreIntervals'"> 
     282                                                                        <xsl:call-template name="t_scaledScoreIntervals"><xsl:with-param name="pScore" select="@let"/></xsl:call-template> 
     283                                                                </xsl0:when> 
     284                                                                <xsl0:otherwise><xsl:value-of select="@let"/></xsl0:otherwise> 
     285                                                        </xsl0:choose> 
     286                                                </xsl:if> 
     287                                        </titleBlock> 
     288                                </imgBlock> 
     289                                <indent> 
     290                                        <xsl0:variable name="vAgtModel" select="concat('@', getIdFromPath(../@sc:refUri))"/> 
     291                                        <xsl:call-template name="{resultatAgent(concat($vAgtModel, '/codeModel'))}"><xsl:with-param name="pVisu">content</xsl:with-param></xsl:call-template> 
     292                                </indent> 
     293                        </treeBlockElement>              
     294                </xsl:for-each> 
     295        </xsl0:template> 
     296         
     297        <!-- scoreBounds --> 
     298        <xsl0:template match="sm:scoreBounds"> 
     299                <xsl0:call-template name="tGetBaseTemplateView"> 
     300                        <xsl0:with-param name="pElementName">score</xsl0:with-param> 
     301                        <xsl0:with-param name="pContent"> 
     302                                <xsl0:for-each select="*"> 
     303                                        <treeBlockElement> 
     304                                                <imgBlock src=""> 
     305                                                        <titleBlock><xsl0:value-of select="@name"/></titleBlock> 
     306                                                        <xsl:call-template name="{concat('t_', local-name())}"> 
     307                                                                <xsl:with-param name="pScore" select="{si(local-name()='pointsIfAllIsRight', '@max', '@min')}"/> 
     308                                                        </xsl:call-template> 
     309                                                </imgBlock> 
     310                                        </treeBlockElement> 
     311                                </xsl0:for-each> 
     312                        </xsl0:with-param> 
     313                </xsl0:call-template> 
    200314        </xsl0:template> 
    201315         
  • trunk/Wsp_ModelingAssmnt/spaces/gen/modelBuilder/bs.doss/sma_assmntUnitEditPrim/preview.xsl.xsl

    r6457 r6533  
    7777                <xsl0:call-template name="tGetBaseTemplateView"/> 
    7878        </xsl0:template> 
    79          
    80         <!-- hints --> 
    81         <xsl0:template match="sm:hintModel"> 
    82                 <xsl0:call-template name="tGetBaseTemplateView"> 
    83                         <xsl0:with-param name="pTitle"> 
    84                                 <xsl:if test="@cost"> 
    85                                         (<xsl0:value-of select="sm:hintCost/@name"/> : <xsl0:if test="sm:hintCost/sm:percentageLost">-</xsl0:if><xsl:value-of select="@cost"/><xsl0:if test="sm:hintCost/sm:percentageLost">%</xsl0:if>) 
    86                                 </xsl:if> 
    87                         </xsl0:with-param> 
    88                 </xsl0:call-template> 
    89         </xsl0:template> 
    90          
     79                 
    9180        <!-- # GapText --> 
    9281        <xsl0:template match="sm:gapInText"> 
     
    9887                </xsl0:call-template> 
    9988        </xsl0:template> 
    100          
    101         <xsl0:template match="sm:scoreBounds"> 
    102                 <xsl0:call-template name="tGetBaseTemplateView"> 
    103                         <xsl0:with-param name="pElementName">score</xsl0:with-param> 
    104                         <xsl0:with-param name="pContent"> 
    105                                 <xsl0:for-each select="*"> 
    106                                         <treeBlockElement> 
    107                                                 <imgBlock src=""> 
    108                                                         <titleBlock><xsl0:value-of select="@name"/></titleBlock> 
    109                                                         <xsl:call-template name="{concat('t_', local-name())}"> 
    110                                                                 <xsl:with-param name="pScore" select="{si(local-name()='pointsIfAllIsRight', '@max', '@min')}"/> 
    111                                                         </xsl:call-template> 
    112                                                 </imgBlock> 
    113                                         </treeBlockElement> 
    114                                 </xsl0:for-each> 
    115                         </xsl0:with-param> 
    116                 </xsl0:call-template> 
    117         </xsl0:template> 
    118          
    119         <xsl0:template match="sm:feedbackModel"> 
    120                 <xsl0:call-template name="tGetBaseTemplateView"> 
    121                         <xsl0:with-param name="pElementName">feedbacks</xsl0:with-param> 
    122                         <xsl0:with-param name="pContent"> 
    123                                 <xsl0:apply-templates/> 
    124                         </xsl0:with-param> 
    125                 </xsl0:call-template> 
    126         </xsl0:template> 
    127          
    128         <xsl0:template match="sm:scaledScoreIntervals | sm:pointScoreIntervals"> 
    129                 <xsl:for-each select="sc:feedback"> 
    130                         <treeBlockElement> 
    131                                 <imgBlock src=""> 
    132                                         <titleBlock> 
    133                                                 <xsl:if test="@gt"> 
    134                                                         <xsl0:value-of select="sm:interval/sm:scoreMoreThan/@name"/> 
    135                                                         <xsl:text>&#160;</xsl:text> 
    136                                                         <xsl0:choose> 
    137                                                                 <xsl0:when test="local-name()='scaledScoreIntervals'"> 
    138                                                                         <xsl:call-template name="t_scaledScoreIntervals"><xsl:with-param name="pScore" select="@gt"/></xsl:call-template> 
    139                                                                 </xsl0:when> 
    140                                                                 <xsl0:otherwise><xsl:value-of select="@gt"/></xsl0:otherwise> 
    141                                                         </xsl0:choose> 
    142                                                         <xsl:if test="@gt"><xsl:text>&#160;-&#160;</xsl:text></xsl:if> 
    143                                                 </xsl:if> 
    144                                                 <xsl:if test="@get"> 
    145                                                         <xsl0:value-of select="sm:interval/sm:scoreMoreOrEqualThan/@name"/> 
    146                                                         <xsl:text>&#160;</xsl:text> 
    147                                                         <xsl0:choose> 
    148                                                                 <xsl0:when test="local-name()='scaledScoreIntervals'"> 
    149                                                                         <xsl:call-template name="t_scaledScoreIntervals"><xsl:with-param name="pScore" select="@get"/></xsl:call-template> 
    150                                                                 </xsl0:when> 
    151                                                                 <xsl0:otherwise><xsl:value-of select="@get"/></xsl0:otherwise> 
    152                                                         </xsl0:choose> 
    153                                                 </xsl:if> 
    154                                                 <xsl:if test="@lt"> 
    155                                                         <xsl:if test="@gt or @get"><xsl:text>&#160;-&#160;</xsl:text></xsl:if> 
    156                                                         <xsl0:value-of select="sm:interval/sm:scoreLessThan/@name"/> 
    157                                                         <xsl:text>&#160;</xsl:text> 
    158                                                         <xsl0:choose> 
    159                                                                 <xsl0:when test="local-name()='scaledScoreIntervals'"> 
    160                                                                         <xsl:call-template name="t_scaledScoreIntervals"><xsl:with-param name="pScore" select="@lt"/></xsl:call-template> 
    161                                                                 </xsl0:when> 
    162                                                                 <xsl0:otherwise><xsl:value-of select="@lt"/></xsl0:otherwise> 
    163                                                         </xsl0:choose> 
    164                                                 </xsl:if> 
    165                                                 <xsl:if test="@let"> 
    166                                                         <xsl:if test="@gt or @get"><xsl:text>&#160;-&#160;</xsl:text></xsl:if> 
    167                                                         <xsl0:value-of select="sm:interval/sm:scoreLessOrEqualThan/@name"/> 
    168                                                         <xsl:text>&#160;</xsl:text> 
    169                                                         <xsl0:choose> 
    170                                                                 <xsl0:when test="local-name()='scaledScoreIntervals'"> 
    171                                                                         <xsl:call-template name="t_scaledScoreIntervals"><xsl:with-param name="pScore" select="@let"/></xsl:call-template> 
    172                                                                 </xsl0:when> 
    173                                                                 <xsl0:otherwise><xsl:value-of select="@let"/></xsl0:otherwise> 
    174                                                         </xsl0:choose> 
    175                                                 </xsl:if> 
    176                                         </titleBlock> 
    177                                 </imgBlock> 
    178                                 <indent> 
    179                                         <xsl0:variable name="vAgtModel" select="concat('@', getIdFromPath(../@sc:refUri))"/> 
    180                                         <xsl:call-template name="{resultatAgent(concat($vAgtModel, '/codeModel'))}"><xsl:with-param name="pVisu">content</xsl:with-param></xsl:call-template> 
    181                                 </indent> 
    182                         </treeBlockElement>              
    183                 </xsl:for-each> 
    184         </xsl0:template> 
    185          
     89                                 
    18690        <!-- # singleField --> 
    18791        <xsl0:template match="sm:singleField"> 
     
    278182        </xsl0:template> 
    279183         
    280          
    281          
    282          
    283184        <!-- création des templates gérants la présentation des notes --> 
    284         <xsl0:template match="sm:pointsIfAllIsRight| sm:pointsIfAllIsWrong | sm:scaledScoreIntervals | sm:solution | sm:undefinedResponse" mode="mScoreMgr"> 
     185        <xsl0:template match="sm:pointsIfAllIsRight| sm:pointsIfAllIsWrong | sm:scaledScoreIntervals | sm:pointScoreIntervals | sm:solution | sm:undefinedResponse" mode="mScoreMgr"> 
    285186                <xsl0:call-template name="tScoreMgr"> 
    286187                        <xsl0:with-param name="pNumericScoring"><xsl0:copy-of select="descendant-or-self::*[@displayFormat][1]"/></xsl0:with-param> 
     
    289190        </xsl0:template> 
    290191                         
    291         <xsl0:template match="*"/> 
    292192</xsl0:stylesheet> 
  • trunk/Wsp_ModelingAssmnt/spaces/gen/modelBuilder/bs.doss/sma_assmntUnitMlqPrim/preview.xsl.xsl

    r6301 r6533  
    4848        extension-element-prefixes="repeat" 
    4949        exclude-result-prefixes="sm sc sp sma"> 
    50         <xsl0:output method="xml" indent="no" omit-xml-declaration="yes"/> 
    51         <xsl0:namespace-alias stylesheet-prefix="xsl" result-prefix="xsl0"/> 
    5250 
    53         <xsl0:param name="vAgent"/> 
    54         <xsl0:param name="vDialog"/> 
    55  
    56         <xsl0:variable name="vSpace" select="resultatAgent('@@/rootSpaceSs')"/> 
    57         <xsl0:variable name="vMode" select="resultatAgent('//codeModel')"/> 
    58          
    59         <xsl0:variable name="vSolution" select="/*/sm:structure/sm:solution"/> 
     51        <xsl0:import href="bsco:sma/communPreview.xsl.xsl"/> 
    6052         
    6153        <xsl0:template match="sma:assmntUnitMlqPrim"> 
    6254                <xsl0:value-of select="execute(setEntryBuffer('ns', resultatAgent('//prefixModel'), resultatAgent('//nsModel')), setEntryBuffer('xslExcludePrefix', resultatAgent('//prefixModel')))"/> 
    6355                <xsl:template match="{resultatAgent('//qNameTagRootModel')}" name="{resultatAgent('//codeModel')}" mode="{resultatAgent('//codeModel')}"> 
    64                         <!-- <xsl:apply-templates select="*" mode="{$vMode}"/> --> 
     56                        <xsl:apply-templates select="*" mode="{$vMode}"/> 
    6557                </xsl:template> 
     58                <xsl0:apply-templates mode="mScoreMgr"/> 
     59                <xsl0:apply-templates/> 
    6660                <xsl:template match="*" mode="{$vMode}"/> 
    6761        </xsl0:template> 
     62         
     63        <xsl0:template match="sm:structure"> 
     64                <xsl0:apply-templates select="sm:meta" mode="structure"/> 
     65                <xsl0:apply-templates select="*[name()!='sm:meta']"/> 
     66        </xsl0:template> 
     67         
     68        <xsl0:template match="sm:interaction"> 
     69                <xsl0:apply-templates/> 
     70        </xsl0:template> 
     71         
     72        <!-- éléments d'interaction --> 
     73        <xsl0:template match="sm:matchTarget | sm:associateLabels"> 
     74                <xsl0:apply-templates/> 
     75        </xsl0:template> 
     76        <xsl0:template match="sm:orderLabels"> 
     77                <xsl:template match="sc:label[1]" mode="{resultatAgent('//codeModel')}"> 
     78                        <xsl0:call-template name="tGetBaseTemplateView"> 
     79                                <xsl0:with-param name="pNoMatch">true</xsl0:with-param> 
     80                                <xsl0:with-param name="pElementName">true</xsl0:with-param> 
     81                                <xsl0:with-param name="pCateg"> 
     82                                        <xsl0:value-of select="si(/*/sm:authoring/sm:htmlPreview/sm:orderLabelsBlock,/*/sm:authoring/sm:htmlPreview/sm:orderLabelsBlock/@displayName,'Order labels')"/> 
     83                                </xsl0:with-param> 
     84                                <xsl0:with-param name="pContent"> 
     85                                        <ul> 
     86                                                <xsl:apply-templates mode="{resultatAgent('//codeModel')}_labels" select="../sc:label"/> 
     87                                        </ul> 
     88                                </xsl0:with-param> 
     89                        </xsl0:call-template> 
     90                </xsl:template> 
     91                <xsl0:apply-templates/> 
     92        </xsl0:template> 
     93         
     94        <xsl0:template match="sm:group"> 
     95                <xsl0:call-template name="tGetBaseTemplateView"> 
     96                        <xsl0:with-param name="pElementName">group</xsl0:with-param> 
     97                        <xsl0:with-param name="pTitle"> 
     98                                <xsl0:choose> 
     99                                        <xsl0:when test="sm:targetModel"> 
     100                                                &#160;<xsl:apply-templates mode="{resultatAgent('//codeModel')}" select="sc:target"/> 
     101                                        </xsl0:when> 
     102                                        <xsl0:otherwise>&#160;n°&#160;<xsl:value-of select="count(preceding-sibling::sc:group)+1"/></xsl0:otherwise> 
     103                                </xsl0:choose> 
     104                        </xsl0:with-param> 
     105                        <xsl0:with-param name="pContent"> 
     106                                <ul> 
     107                                        <xsl:apply-templates mode="{resultatAgent('//codeModel')}_labels" select="sc:label"/> 
     108                                </ul> 
     109                        </xsl0:with-param> 
     110                </xsl0:call-template> 
     111                <xsl0:apply-templates select="*"/> 
     112        </xsl0:template> 
     113         
     114        <xsl0:template match="sm:targetModel"> 
     115                <xsl:template match="sc:target" mode="{resultatAgent('//codeModel')}"> 
     116                        <xsl0:variable name="vAgtModel" select="concat('@', getIdFromPath(@sc:refUri))"/> 
     117                        <xsl:call-template name="{resultatAgent(concat($vAgtModel, '/codeModel'))}"><xsl:with-param name="pVisu">content</xsl:with-param></xsl:call-template> 
     118                </xsl:template> 
     119        </xsl0:template> 
     120                                                         
     121        <xsl0:template match="sm:labelModel"> 
     122                <xsl:template match="sc:label" mode="{resultatAgent('//codeModel')}_labels"> 
     123                        <xsl0:variable name="vStyle"> 
     124                                <xsl0:for-each select="/*/sm:authoring/sm:htmlPreview/sm:labelList/sm:entryStyle"> 
     125                                        <xsl0:value-of select="@key"/> : <xsl0:value-of select="@value"/>; 
     126                                </xsl0:for-each> 
     127                                <xsl0:for-each select="/*/sm:authoring/sm:htmlPreview/sm:labelList/sm:entryImgStyle"> 
     128                                        <xsl0:value-of select="@key"/> : url("<xsl0:value-of select="resultatAgent('//', concat( 
     129                                                                        'res:src=wsp:',  
     130                                                                        @sc:refUri,  
     131                                                                        ';dst=content/',  
     132                                                                        resultatAgent('//codeModel'), 
     133                                                                        '/img/', 
     134                                                                        getIdFromPath(@sc:refUri), 
     135                                                                        '_', 
     136                                                                        extractFileNameFromPath(@sc:refUri) 
     137                                                                        ) 
     138                                                                )"/>") 
     139                                </xsl0:for-each> 
     140                        </xsl0:variable> 
     141                        <li style="{normalize-space($vStyle)}"> 
     142                                <xsl0:variable name="vAgtModel" select="concat('@', getIdFromPath(@sc:refUri))"/> 
     143                                <xsl:call-template name="{resultatAgent(concat($vAgtModel, '/codeModel'))}"><xsl:with-param name="pVisu">content</xsl:with-param></xsl:call-template> 
     144                        </li> 
     145                </xsl:template> 
     146        </xsl0:template> 
    68147                 
    69         <xsl0:template match="*"/> 
     148        <!-- # Elements communs --> 
     149        <!-- question/globalExplanation --> 
     150        <xsl0:template match="sm:questionModel | sm:globalExplanationModel"> 
     151                <xsl0:call-template name="tGetBaseTemplateView"/> 
     152        </xsl0:template> 
     153         
     154        <!-- création des templates gérants la présentation des notes --> 
     155        <xsl0:template match="sm:pointsIfAllIsRight| sm:pointsIfAllIsWrong | sm:scaledScoreIntervals | sm:pointScoreIntervals | sm:solution | sm:undefinedResponse" mode="mScoreMgr"> 
     156                <xsl0:call-template name="tScoreMgr"> 
     157                        <xsl0:with-param name="pNumericScoring"><xsl0:copy-of select="descendant-or-self::*[@displayFormat][1]"/></xsl0:with-param> 
     158                        <xsl0:with-param name="pTemplateName"><xsl0:value-of select="concat('t_', local-name())"/></xsl0:with-param> 
     159                </xsl0:call-template> 
     160        </xsl0:template> 
     161         
    70162</xsl0:stylesheet> 
Note: See TracChangeset for help on using the changeset viewer.