home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Edugen XSL Stylesheets V1.0 ======================================= File report.xsl This file is part of the Edugen XSL Stylesheets. Copyright (c) 2002 WWL Corp. - A Subsidiary of John Wiley & Sons, Inc. ========================================================================= --> <xsl:output method="html" indent="no"/> <!-- version --> <xsl:param name="version">1.0</xsl:param> <!-- dynamic param --> <xsl:param name="selector" select="report"/> <xsl:variable name="courseHttpPath"></xsl:variable> <xsl:variable name="edugenHttpPath"></xsl:variable> <xsl:variable name="courseFilePath"></xsl:variable> <xsl:variable name="edugenFilePath"></xsl:variable> <xsl:variable name="courseHttpPath"><?11?>?sid=<?1003?>&msg=3&course=<?1008?>&file=</xsl:variable> <xsl:variable name="edugenHttpPath"><?11?>?sid=global&msg=300&file=</xsl:variable> <xsl:variable name="courseFilePath"><?303?></xsl:variable> <xsl:variable name="edugenFilePath"><?301?></xsl:variable> <xsl:attribute-set name="body_attributes"> <xsl:attribute name="bgcolor">#ffffff</xsl:attribute> <xsl:attribute name="text">#000000</xsl:attribute> <xsl:attribute name="leftmargin">0</xsl:attribute> <xsl:attribute name="topmargin">0</xsl:attribute> <xsl:attribute name="marginwidth">0</xsl:attribute> <xsl:attribute name="marginheight">0</xsl:attribute> <xsl:attribute name="onresize">javascript:if(navigator.appName.indexOf('Netscape')!=-1)self.location.reload();</xsl:attribute> <xsl:attribute name="onload">javascript:doOnload();</xsl:attribute> <xsl:attribute name="onunload">javascript:doOnunload();</xsl:attribute> </xsl:attribute-set> <!-- Constants for Test Type: CUSTOM = 0 PRELIMINARY = 1 REVISION = 2 CONTENT = 3 --> <xsl:variable name="t_type"><xsl:value-of select="report/t_type"/></xsl:variable> <xsl:variable name="t_title"> <xsl:choose> <xsl:when test="$t_type='0'">Custom Test Report</xsl:when> <xsl:when test="$t_type='1'">Preliminary Test Report</xsl:when> <xsl:when test="$t_type='2'">Revision Test Report</xsl:when> <xsl:when test="$t_type='3'">Section Test Report</xsl:when> <xsl:otherwise>Unknown</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- Constants for Test Type Hint: NOT_MEANING = 0 ONLY_PLAN = 1 PLAN_AND_FULL = 2 ONLY_FULL = 3 WITHOUT_PLAN = 4 FROM_REV_PLAN = 5 --> <xsl:variable name="tt_hint"><xsl:value-of select="report/tt_hint"/></xsl:variable> <!-- Constants for Test Mode: TIMED = 0 PRACTICE = 1 --> <xsl:variable name="t_mode"><xsl:value-of select="report/t_mode"/></xsl:variable> <!-- Mark for Test --> <xsl:variable name="t_mark"><xsl:value-of select="report/t_mark"/></xsl:variable> <!-- If there must be button(s) --> <xsl:variable name="is_buttons"><xsl:if test="report/new"><xsl:value-of select="report/new"/></xsl:if></xsl:variable> <!-- ============= root =============================== --> <xsl:template match="/"> <html> <xsl:comment> Copyright (c) 1999-2001 Maris Technologies (http://www.maris.com/) Thank you for examining our code </xsl:comment> <head> <title><xsl:value-of select="$t_title"/></title> <meta name="generator" content="Edugen XSL Stylesheets V{$version}"/> <link rel="STYLESHEET" type="text/css" href="{$edugenHttpPath}media/css/style1.css"/> <link rel="STYLESHEET" type="text/css" href="{$edugenHttpPath}media/css/font2.css"/> <script type="text/javascript" language="JavaScript" src="{$edugenHttpPath}media/js/button.js"></script> <!-- <script type="text/javascript" language="JavaScript" src="{$edugenHttpPath}media/js/windows.js"></script> --> <script type="text/javascript" language="JavaScript" src="{$edugenHttpPath}media/js/misc.js"></script> <script type="text/javascript" language="JavaScript"><![CDATA[ var rnd = new Date(); rnd = rnd.getTime(); rnd = "&rnd=" + rnd; function doOnload() { var topLoc = top.location; var selfLoc = self.location; if (topLoc!=selfLoc) { top.bridge.location.replace("<?11?>?sid=<?1003?>&msg=4&course=<?1008?>&xml=/cmd/command.xml&xsl=/cmd/command.xsl&name=selector&select=commands/command[@id%3D'update']"); } } function doOnunload() { } function okacceptbutPress() { self.location.replace("<?11?>?sid=<?1003?>&msg=9023" + rnd); } function contrevisebutPress() { self.location.replace("<?11?>?sid=<?1003?>&msg=9025" + rnd); } function movetodonebutPress() { self.location.replace("<?11?>?sid=<?1003?>&msg=9024" + rnd); } function letmedecidebutPress() { self.location.replace("<?11?>?sid=<?1003?>&msg=9061" + rnd); } function gotoPage(in_Sec,in_PageId) { self.location.replace("<?11?>?sid=<?1003?>&msg=7000&type=xml&msgid=105&framesetid=0" + "&fileid=" + in_Sec + "&pageid=" + in_PageId); } function gotoQuestion(in_Question) { self.location.replace("<?11?>?sid=<?1003?>&msg=4073&PRM_ACTIVE_QUESTION=" + in_Question); } function gotoQuestionByID(in_QuestionID) { self.location.replace("<?11?>?sid=<?1003?>&msg=7000&gid=" + in_QuestionID); } ]]> <xsl:apply-templates select="$selector" mode="javascript"/> </script> </head> <body xsl:use-attribute-sets="body_attributes"> <xsl:apply-templates select="$selector"/> </body> </html> </xsl:template> <!-- ====== end of root =============================== --> <!-- ============= report =============================== --> <xsl:template match="report"> <xsl:apply-templates select="." mode="header"/> <br/> <center> <xsl:apply-templates select="." mode="userinfo"/> <xsl:apply-templates select="." mode="testinfo"/> <xsl:apply-templates select="." mode="buttons"/> </center> <!-- <hr /><xsl:apply-templates select="." mode="copyall"/> --> </xsl:template> <!-- ====== end of report =============================== --> <!-- ============= copy all =============================== --> <xsl:template match="report" mode="copyall"> <font face="Courier"> <<xsl:value-of select="name()"/>> <br /> <xsl:apply-templates select="*" mode="copyall"/> </<xsl:value-of select="name()"/>> <br /> </font> </xsl:template> <xsl:template match="report/*" mode="copyall"> <<xsl:value-of select="name()"/>><xsl:value-of select="."/></<xsl:value-of select="name()"/>> <br /> </xsl:template> <xsl:template match="report/questions_links" mode="copyall"> <<xsl:value-of select="name()"/>>...</<xsl:value-of select="name()"/>> <br /> </xsl:template> <!-- ====== end of copy all =============================== --> <!-- ============= report mode =============================== --> <xsl:template match="report" mode="javascript"> <!-- for reports right after test only --> <xsl:if test="$is_buttons='1'"> <xsl:choose> <!-- timed test --> <xsl:when test="$t_mode='0'"> <xsl:choose> <!-- Custom --> <xsl:when test="$t_type='0'"> <xsl:apply-templates select="." mode="okaccept_js"/> <xsl:apply-templates select="." mode="letmedecide_js"/> </xsl:when> <!-- Preliminary --> <xsl:when test="$t_type='1'"> <xsl:apply-templates select="." mode="okaccept_js"/> </xsl:when> <!-- Revision --> <xsl:when test="$t_type='2'"> <xsl:apply-templates select="." mode="okaccept_js"/> <xsl:apply-templates select="." mode="letmedecide_js"/> <xsl:apply-templates select="." mode="contrevise_js"/> <xsl:apply-templates select="." mode="movetodone_js"/> </xsl:when> <!-- Section --> <xsl:when test="$t_type='3'"> <xsl:apply-templates select="." mode="okaccept_js"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="." mode="okaccept_js"/> </xsl:otherwise> </xsl:choose> </xsl:when> <!-- practice test --> <xsl:when test="$t_mode='1'"> <xsl:apply-templates select="." mode="okaccept_js"/> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> <xsl:template match="report" mode="header"> <xsl:call-template name="header"> <xsl:with-param name="title"><xsl:value-of select="$t_title"/></xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="report" mode="userinfo"> <p class="userinfoText"> <!-- <xsl:apply-templates select="." mode="student"/> --> <xsl:apply-templates select="." mode="course"/> <xsl:apply-templates select="." mode="sections"/> <!-- <xsl:apply-templates select="." mode="study_level"/> <xsl:apply-templates select="." mode="exam_level"/> <xsl:apply-templates select="." mode="plan_type"/> --> <xsl:apply-templates select="." mode="date_time"/> </p> </xsl:template> <xsl:template match="report" mode="testinfo"> <table cellpadding="0" cellspacing="0" border="0" width="604"><tr> <td class="testinfoLine"><img src="{$edugenFilePath}media/graphics/pixel.gif" width="1" height="2" border="0"/></td> </tr></table> <table cellpadding="4" cellspacing="0" border="0" width="604"> <xsl:apply-templates select="." mode="test_mode"/> <xsl:apply-templates select="." mode="test_full_time"/> <xsl:apply-templates select="." mode="test_spent_time"/> <!-- <xsl:apply-templates select="." mode="test_questions"/> --> <xsl:apply-templates select="." mode="test_score"/> <!-- <xsl:apply-templates select="." mode="test_status"/> <xsl:apply-templates select="." mode="test_suggestion"/> --> </table> <table cellpadding="0" cellspacing="0" border="0" width="604"><tr> <td class="testinfoLine"><img src="{$edugenFilePath}media/graphics/pixel.gif" width="1" height="2" border="0"/></td> </tr></table> </xsl:template> <xsl:template match="report" mode="buttons"> <!-- for reports right after test only --> <xsl:if test="$is_buttons='1'"> <table cellpadding="0" cellspacing="0" border="0" width="604"> <tr> <td><img src="{$edugenFilePath}media/graphics/pixel.gif" width="1" height="2" border="0"/></td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" width="604"> <tr> <td align="right" nowrap="nowrap"> <xsl:choose> <!-- timed test --> <xsl:when test="$t_mode='0'"> <xsl:choose> <!-- Custom --> <xsl:when test="$t_type='0'"> <xsl:apply-templates select="." mode="okaccept"/> <xsl:apply-templates select="." mode="letmedecide"/> </xsl:when> <!-- Preliminary --> <xsl:when test="$t_type='1'"> <xsl:apply-templates select="." mode="okaccept"/> </xsl:when> <!-- Revision --> <xsl:when test="$t_type='2'"> <xsl:apply-templates select="." mode="okaccept"/> <xsl:apply-templates select="." mode="letmedecide"/> <xsl:apply-templates select="." mode="contrevise"/> <xsl:apply-templates select="." mode="movetodone"/> </xsl:when> <!-- Section --> <xsl:when test="$t_type='3'"> <xsl:apply-templates select="." mode="okaccept"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="." mode="okaccept"/> </xsl:otherwise> </xsl:choose> </xsl:when> <!-- practice test --> <xsl:when test="$t_mode='1'"> <xsl:apply-templates select="." mode="okaccept"/> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </td> </tr> </table> </xsl:if> </xsl:template> <!-- ====== end of report mode =============================== --> <!-- ============= header =============================== --> <xsl:template name="header"> <xsl:param name="title"></xsl:param> <table cellspacing="0" cellpadding="0" width="100%" height="54" border="0" background="{$edugenFilePath}media/graphics/headbgr.gif"> <tr valign="middle"> <td align="right" width="100%"><p class="title"><xsl:value-of select="$title"/> </p></td> <td><p class="title"><img src="{$edugenFilePath}media/graphics/headpoint.gif" border="0"/></p></td> <td><p class="title"> </p></td> </tr> </table> </xsl:template> <!-- ====== end of header =============================== --> <!-- ============= userinfo =============================== --> <xsl:template match="report" mode="student"> <xsl:variable name="student"><xsl:value-of select="student/first_name"/><xsl:text> </xsl:text><xsl:value-of select="student/last_name"/></xsl:variable> <span class="userinfoTitle">Student:</span> <xsl:copy-of select="$student"/><br/> </xsl:template> <xsl:template match="report" mode="course"> <xsl:variable name="course"><xsl:value-of select="course"/></xsl:variable> <span class="userinfoTitle">Course:</span> <xsl:copy-of select="$course"/><br/> </xsl:template> <xsl:template match="report" mode="sections"> <xsl:if test="section_links"> <xsl:variable name="sections"> <xsl:for-each select="section_links/section"> <xsl:choose> <!-- Custom or Revision --> <xsl:when test="$t_type='0' or $t_type='2'"> <xsl:value-of select="name"/> <xsl:choose> <xsl:when test="position()=last()"></xsl:when> <xsl:otherwise>, </xsl:otherwise> </xsl:choose> </xsl:when> <!-- Preliminary --> <xsl:when test="$t_type='1'">All sections in the course.</xsl:when> <!-- Section --> <xsl:when test="$t_type='3'"> <xsl:choose> <xsl:when test="$is_buttons='1'"> <xsl:value-of select="name"/> </xsl:when> <xsl:otherwise> <a class="seclink" href="javascript:gotoPage('{link}','{page}');"><xsl:value-of select="name"/></a> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:variable> <span class="userinfoTitle"> <xsl:choose> <!-- Custom or Preliminary or Revision --> <xsl:when test="$t_type='0' or $t_type='1' or $t_type='2'">Section(s):</xsl:when> <!-- Section --> <xsl:when test="$t_type='3'">Section:</xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </span> <xsl:copy-of select="$sections"/><br/> </xsl:if> </xsl:template> <xsl:template match="report" mode="study_level"> <xsl:variable name="study_level"><xsl:value-of select="study_level"/></xsl:variable> <span class="userinfoTitle">Level:</span> <xsl:copy-of select="$study_level"/><br/> </xsl:template> <xsl:template match="report" mode="exam_level"> <xsl:variable name="exam_level"><xsl:value-of select="exam_level"/></xsl:variable> <span class="userinfoTitle">Exam Board:</span> <xsl:copy-of select="$exam_level"/><br/> </xsl:template> <xsl:template match="report" mode="plan_type"> <xsl:variable name="plan_type"><xsl:value-of select="plan_type"/></xsl:variable> <span class="userinfoTitle">Revision Plan Type:</span> <xsl:copy-of select="$plan_type"/><br/> </xsl:template> <xsl:template match="report" mode="date_time"> <xsl:variable name="date_time"><xsl:value-of select="date"/><xsl:text>, </xsl:text><xsl:value-of select="time"/></xsl:variable> <span class="userinfoTitle">Date and Time:</span> <xsl:copy-of select="$date_time"/><br/> </xsl:template> <!-- ====== end of userinfo =============================== --> <!-- ============= testinfo =============================== --> <xsl:template match="report" mode="test_mode"> <xsl:variable name="test_mode"> <xsl:choose> <xsl:when test="$t_mode='0'">Timed</xsl:when> <xsl:when test="$t_mode='1'">Practice</xsl:when> <xsl:otherwise>Unknown</xsl:otherwise> </xsl:choose> </xsl:variable> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Test mode</span></td> <td width="30" valign="top"><span class="testinfoText"> </span></td> <td width="434" valign="top"><span class="testinfoText"><xsl:value-of select="$test_mode"/></span></td> </tr> </xsl:template> <xsl:template match="report" mode="test_full_time"> <!-- for timed test only --> <xsl:if test="$t_mode='0'"> <xsl:variable name="full_time"><xsl:value-of select="full_time"/></xsl:variable> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Test time</span></td> <td width="30" valign="top"><span class="testinfoText"> </span></td> <td width="434" valign="top"><span class="testinfoText"><xsl:value-of select="$full_time"/></span></td> </tr> </xsl:if> </xsl:template> <xsl:template match="report" mode="test_spent_time"> <!-- for timed test only --> <xsl:if test="$t_mode='0'"> <xsl:variable name="spent_time"><xsl:value-of select="spent_time"/></xsl:variable> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Completion time</span></td> <td width="30" valign="top"><span class="testinfoText"> </span></td> <td width="434" valign="top"><span class="testinfoText"><xsl:value-of select="$spent_time"/></span></td> </tr> </xsl:if> </xsl:template> <xsl:template match="report" mode="test_questions"> <xsl:choose> <xsl:when test="$is_buttons='1'"><!-- for reports right after test only --> <xsl:variable name="t_questions_links"> <xsl:for-each select="questions_links/section"> <xsl:variable name="question_id"><xsl:number/></xsl:variable> <a class="seclink" href="javascript:gotoQuestion('{$question_id}');"><xsl:value-of select="name"/></a><br/> </xsl:for-each> </xsl:variable> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Questions</span></td> <td width="30" valign="top"><span class="testinfoText"> </span></td> <td width="434" valign="top"><span class="testinfoText"><xsl:copy-of select="$t_questions_links"/></span></td> </tr> </xsl:when> <xsl:otherwise><!-- for reports from table of contents only --> <xsl:variable name="t_questions_links"> <xsl:for-each select="questions_links/section"> <xsl:variable name="question_id"><xsl:value-of select="link"/></xsl:variable> <a class="seclink" href="javascript:gotoQuestionByID('{$question_id}');"><xsl:value-of select="name"/></a><br/> </xsl:for-each> </xsl:variable> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Questions</span></td> <td width="30" valign="top"><span class="testinfoText"> </span></td> <td width="434" valign="top"><span class="testinfoText"><xsl:copy-of select="$t_questions_links"/></span></td> </tr> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="report" mode="test_score"> <xsl:variable name="t_score"><xsl:value-of select="t_score"/></xsl:variable> <xsl:variable name="total_questions"><xsl:value-of select="total_questions"/></xsl:variable> <xsl:variable name="answered_questions"><xsl:value-of select="answered_questions"/></xsl:variable> <xsl:variable name="correct_answers"><xsl:value-of select="correct_answers"/></xsl:variable> <!-- <xsl:variable name="test_mark"> <xsl:choose> <xsl:when test="$t_mark='0' or $t_mark='1' or $t_mark='2' or $t_mark='3'"> <xsl:choose> <xsl:when test="$answered_questions='0'">NO QUESTIONS ANSWERED</xsl:when> <xsl:otherwise>NICE TRY</xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="$t_mark='4'">GOOD</xsl:when> <xsl:when test="$t_mark='5'">EXCELLENT</xsl:when> <xsl:otherwise>NICE TRY</xsl:otherwise> </xsl:choose> </xsl:variable> --> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Overall test score</span></td> <td width="30" valign="top"><span class="testinfoText"> </span></td> <td width="434" valign="top"> <applet code="Progress.class" width="127" height="13" archive="{$edugenHttpPath}applets/simple.jar" align="absmiddle"> <param name="stats" value="{$t_score}"/> </applet> <span class="testinfoText"> <span class="testinfoText1"> <xsl:value-of select="$t_score"/>%</span> <br/> You answered <span class="testinfoText1"><xsl:value-of select="$answered_questions"/></span> questions out of total <span class="testinfoText1"><xsl:value-of select="$total_questions"/></span>. <br/> You had <span class="testinfoText1"><xsl:value-of select="$correct_answers"/></span> correct answers. <br/> <!-- <span class="testinfoTestmark"><xsl:value-of select="$test_mark"/></span> --> </span> </td> </tr> </xsl:template> <xsl:template match="report" mode="test_status"> <!-- for timed test only but not for preliminary --> <xsl:if test="$t_mode='0'"> <!-- names of weak sections --> <xsl:variable name="t_section_weak_names"> <xsl:for-each select="section_links/section"> <xsl:choose> <xsl:when test="status='0' or status='1' or status='2' or status='3'"> <xsl:choose> <xsl:when test="$is_buttons='1'"><xsl:value-of select="name"/> </xsl:when> <xsl:otherwise><a class="seclink" href="javascript:gotoPage('{link}','{page}');"><xsl:value-of select="name"/></a> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:variable> <!-- names of completed sections --> <xsl:variable name="t_section_know_names"> <xsl:for-each select="section_links/section"> <xsl:choose> <xsl:when test="status='4' or status='5'"> <xsl:choose> <xsl:when test="$is_buttons='1'"><xsl:value-of select="name"/> </xsl:when> <xsl:otherwise><a class="seclink" href="javascript:gotoPage('{link}','{page}');"><xsl:value-of select="name"/></a> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:variable> <xsl:choose> <!-- Custom or Revision --> <xsl:when test="$t_type='0' or $t_type='2'"> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Section(s) status</span></td> <td width="30" valign="top"><img src="{$edugenFilePath}media/reporting/graphics/weakarea.gif"/></td> <td width="434" valign="top"><span class="testinfoText">Weak Area: <xsl:choose> <xsl:when test="$t_section_weak_names=''">none</xsl:when> <xsl:otherwise><xsl:copy-of select="$t_section_weak_names"/></xsl:otherwise> </xsl:choose> </span></td> </tr> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> </span></td> <td width="30" valign="top"><img src="{$edugenFilePath}media/reporting/graphics/completed.gif"/></td> <td width="434" valign="top"><span class="testinfoText">Completed Revision: <xsl:choose> <xsl:when test="$t_section_know_names=''">none</xsl:when> <xsl:otherwise><xsl:copy-of select="$t_section_know_names"/></xsl:otherwise> </xsl:choose> </span></td> </tr> </xsl:when> <!-- Section --> <xsl:when test="$t_type='3'"> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Section status</span></td> <xsl:choose> <xsl:when test="$t_mark='0' or $t_mark='1' or $t_mark='2' or $t_mark='3'"> <td width="30" valign="top"><img src="{$edugenFilePath}media/reporting/graphics/weakarea.gif"/></td> <td width="434" valign="top"><span class="testinfoText">Weak Area</span></td> </xsl:when> <xsl:when test="$t_mark='4' or $t_mark='5'"> <td width="30" valign="top"><img src="{$edugenFilePath}media/reporting/graphics/completed.gif"/></td> <td width="434" valign="top"><span class="testinfoText">Completed Revision</span></td> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </tr> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> <xsl:template match="report" mode="test_suggestion"> <!-- for timed test reports right after test only --> <xsl:if test="$t_mode='0' and $is_buttons='1'"> <xsl:variable name="t_multisection_weak"><xsl:value-of select="t_multisection_weak"/></xsl:variable> <xsl:variable name="t_multisection_know"><xsl:value-of select="t_multisection_know"/></xsl:variable> <tr> <td class="testinfoBgr" valign="top" width="140" nowrap="nowrap"><span class="testinfoTitle"> Suggestion</span></td> <td width="30" valign="top"><span class="testinfoText"> </span></td> <td width="434" valign="top"> <span class="testinfoText"> <xsl:choose> <!-- Custom --> <xsl:when test="$t_type='0'"><span class="testinfoText1"><xsl:value-of select="$t_multisection_weak"/></span> topics were detected as your "Weak Area". <br/> <span class="testinfoText1"><xsl:value-of select="$t_multisection_know"/></span> topics were detected as your "Completed Revision". <br/> Choose 'OK. I accept' button if you agree with this result or 'Let me Decide' button to change the status by yourself / make your own adjustments.</xsl:when> <!-- Preliminary --> <xsl:when test="$t_type='1'"> <span class="testinfoText1"><xsl:value-of select="$t_multisection_weak"/></span> topics were detected as your "Weak Areas". <br/> Wizard will create your Revision Plan from these topics only.</xsl:when> <!-- Revision --> <xsl:when test="$t_type='2'"> <span class="testinfoText1"><xsl:value-of select="$t_multisection_weak"/></span> topics were detected as your "Weak Area". We suggest you remove these topics from the "Done" folder. <br/> <span class="testinfoText1"><xsl:value-of select="$t_multisection_know"/></span> topics were detected as your "Completed Revision". We suggest you leave them in your "Done" folder.</xsl:when> <!-- Section --> <xsl:when test="$t_type='3'"> <xsl:choose> <xsl:when test="$tt_hint='3' or $tt_hint='4'">This topic does not exist in your Revision Plan. The result of this test will not affect your Plan (time adjustment, planning, Done etc.). However, the result will be taken into account in the Summary Test Report.</xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$t_mark='0' or $t_mark='1' or $t_mark='2' or $t_mark='3'">This topic was detected as your "Weak Area". We suggest you continue to revise this topic.</xsl:when> <xsl:when test="$t_mark='4' or $t_mark='5'">This topic was detected as part of your "Completed Revision". We suggest you move this topic to your "Done" folder and begin to revise the next topic of your revision plan.</xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </span> </td> </tr> </xsl:if> </xsl:template> <!-- ====== end of testinfo =============================== --> <!-- ============= buttons =============================== --> <xsl:template match="report" mode="okaccept"> <xsl:call-template name="button"> <xsl:with-param name="button_id">okaccept</xsl:with-param> <xsl:with-param name="alt">OK. I accept</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="report" mode="letmedecide"> <xsl:call-template name="button"> <xsl:with-param name="button_id">letmedecide</xsl:with-param> <xsl:with-param name="alt">Let me decide</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="report" mode="contrevise"> <xsl:call-template name="button"> <xsl:with-param name="button_id">contrevise</xsl:with-param> <xsl:with-param name="alt">Continue to revise</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="report" mode="movetodone"> <xsl:call-template name="button"> <xsl:with-param name="button_id">movetodone</xsl:with-param> <xsl:with-param name="alt">Move to Done folder</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="button"> <xsl:param name="button_id"></xsl:param> <xsl:param name="alt"></xsl:param> <a href="javascript:{$button_id}butPress();" onmouseover="javascript:{$button_id}butImage.mOver(); top.status='{$alt}'; return true;" onmouseout="javascript:{$button_id}butImage.mOut(); top.status=''; return true;" onmousedown="javascript:{$button_id}butImage.mDown();" onmouseup="javascript:{$button_id}butImage.mOver();"><img name="{$button_id}but" src="{$edugenFilePath}media/graphics/buttons/{$button_id}/out.gif" border="0" alt="{$alt}"/></a> </xsl:template> <!-- mode javascript --> <xsl:template match="report" mode="okaccept_js"> <xsl:call-template name="button_js"> <xsl:with-param name="button_id">okaccept</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="report" mode="letmedecide_js"> <xsl:call-template name="button_js"> <xsl:with-param name="button_id">letmedecide</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="report" mode="contrevise_js"> <xsl:call-template name="button_js"> <xsl:with-param name="button_id">contrevise</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="report" mode="movetodone_js"> <xsl:call-template name="button_js"> <xsl:with-param name="button_id">movetodone</xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="button_js"> <xsl:param name="button_id"></xsl:param> var <xsl:value-of select="$button_id"/>butImage = new imageObject("<xsl:value-of select="$button_id"/>but", "<xsl:value-of select="$edugenHttpPath"/>media/graphics/buttons/<xsl:value-of select="$button_id"/>/"); </xsl:template> <!-- ====== end of buttons =============================== --> <!-- ========================================================================= Thank you for examining our code. Please direct all questions, bug reports, or suggestions for changes to the info@maris.com ========================================================================== --> </xsl:stylesheet>