Errors found while checking this document as XHTML 1.0 Strict!

Result: 4 Errors
:
Modified:(undefined)
Server:Apache/2.2.16 (Debian)
Size:(undefined)
Content-Type:text/html
: utf-8
: XHTML 1.0 Strict
Root Element: html
Root Namespace: http://www.w3.org/1999/xhtml
Options

Help on the options is available.

↑ Top

Validation Output: 4 Errors

  1. Error Line 128, Column 81: there is no attribute "wrap"
    …questiontext" rows="5" cols="40" wrap="virtual">How much is {a} + {b} ?</texta…

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

  2. Error Line 141, Column 18: there is no attribute "align"
        <input align="left" type="text" id="formula0" name="answer[]" size="20" val…

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

  3. Error Line 148, Column 57: character """ is not allowed in the value of attribute "id"
    …left" type="text" id="tolerance0&quot;" name="tolerance[]" size="15" value="0.…

    It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.

  4. Error Line 173, Column 90: there is no attribute "target"
    …nctions can be found in the <a target="phpmathdoc" href="http://www.php.net/ma…

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

↑ Top

Source Listing

Below is the source input I used for this validation:

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <link rel="stylesheet" type="text/css" href="http://www.di.uevora.pt/moodle/theme/standard/styles.php" />
  6. <link rel="stylesheet" type="text/css" href="http://www.di.uevora.pt/moodle/theme/standardwhite/styles.php" />
  7. <script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/yui/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/yui/event/event-min.js"></script><script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/yui/connection/connection-min.js"></script><script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/swfobject/swfobject.js"></script><script type="text/javascript">
  8. //<![CDATA[
  9. var flashversion = swfobject.getFlashPlayerVersion();
  10. YAHOO.util.Connect.asyncRequest('GET','http://www.di.uevora.pt/moodle/login/environment.php?sesskey=lsVaWW98l6&flashversion='+flashversion.major+'.'+flashversion.minor+'.'+flashversion.release);
  11. //]]>
  12. </script>
  13. <!--[if IE 7]>
  14. <link rel="stylesheet" type="text/css" href="http://www.di.uevora.pt/moodle/theme/standard/styles_ie7.css" />
  15. <![endif]-->
  16. <!--[if IE 6]>
  17. <link rel="stylesheet" type="text/css" href="http://www.di.uevora.pt/moodle/theme/standard/styles_ie6.css" />
  18. <![endif]-->
  19. <meta name="keywords" content="moodle, Help " />
  20. <title>Help</title>
  21. <link rel="shortcut icon" href="http://www.di.uevora.pt/moodle/theme/standardwhite/favicon.ico" />
  22. <!--<style type="text/css">/*<![CDATA[*/ body{behavior:url(http://www.di.uevora.pt/moodle/lib/csshover.htc);} /*]]>*/</style>-->
  23. <script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/javascript-static.js"></script>
  24. <script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/javascript-mod.php"></script>
  25. <script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/overlib/overlib.js"></script>
  26. <script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/overlib/overlib_cssstyle.js"></script>
  27. <script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/cookies.js"></script>
  28. <script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/ufo.js"></script>
  29. <script type="text/javascript" src="http://www.di.uevora.pt/moodle/lib/dropdown.js"></script>
  30. <script type="text/javascript" defer="defer">
  31. //<![CDATA[
  32. setTimeout('fix_column_widths()', 20);
  33. //]]>
  34. </script>
  35. <script type="text/javascript">
  36. //<![CDATA[
  37. function openpopup(url, name, options, fullscreen) {
  38. var fullurl = "http://www.di.uevora.pt/moodle" + url;
  39. var windowobj = window.open(fullurl, name, options);
  40. if (!windowobj) {
  41. return true;
  42. }
  43. if (fullscreen) {
  44. windowobj.moveTo(0, 0);
  45. windowobj.resizeTo(screen.availWidth, screen.availHeight);
  46. }
  47. windowobj.focus();
  48. return false;
  49. }
  50. function uncheckall() {
  51. var inputs = document.getElementsByTagName('input');
  52. for(var i = 0; i < inputs.length; i++) {
  53. inputs[i].checked = false;
  54. }
  55. }
  56. function checkall() {
  57. var inputs = document.getElementsByTagName('input');
  58. for(var i = 0; i < inputs.length; i++) {
  59. inputs[i].checked = true;
  60. }
  61. }
  62. function inserttext(text) {
  63. text = ' ' + text + ' ';
  64. if ( opener.document.forms['theform'].message.createTextRange && opener.document.forms['theform'].message.caretPos) {
  65. var caretPos = opener.document.forms['theform'].message.caretPos;
  66. caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
  67. } else {
  68. opener.document.forms['theform'].message.value += text;
  69. }
  70. opener.document.forms['theform'].message.focus();
  71. }
  72. function getElementsByClassName(oElm, strTagName, oClassNames){
  73. var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
  74. var arrReturnElements = new Array();
  75. var arrRegExpClassNames = new Array();
  76. if(typeof oClassNames == "object"){
  77. for(var i=0; i<oClassNames.length; i++){
  78. arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
  79. }
  80. }
  81. else{
  82. arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
  83. }
  84. var oElement;
  85. var bMatchesAll;
  86. for(var j=0; j<arrElements.length; j++){
  87. oElement = arrElements[j];
  88. bMatchesAll = true;
  89. for(var k=0; k<arrRegExpClassNames.length; k++){
  90. if(!arrRegExpClassNames[k].test(oElement.className)){
  91. bMatchesAll = false;
  92. break;
  93. }
  94. }
  95. if(bMatchesAll){
  96. arrReturnElements.push(oElement);
  97. }
  98. }
  99. return (arrReturnElements)
  100. }
  101. //]]>
  102. </script>
  103. </head>
  104. <body class=" course-1 dir-ltr lang-en_utf8" id="help">
  105. <div id="page">
  106. <!-- END OF HEADER -->
  107. <div id="content" class=" clearfix"><div class="box generalbox generalboxcontent"><h1>Calculated questions</h1>
  108. <p>Calculated questions offers a way to create individual numerical question by the use of wildcards that are substituted with individual values when the quiz is taken.
  109. <br />Below is a shrunken view of the main editing page with some example inputs:
  110. </p>
  111. <table><tbody>
  112. <tr valign="top">
  113. <th scope="col" align="right">Question:</th>
  114. <td>
  115. <textarea id="questiontext" name="questiontext" rows="5" cols="40" wrap="virtual">How much is {a} + {b} ?</textarea>
  116. </td>
  117. </tr>
  118. <tr valign="top">
  119. <th scope="col" align="right">Image to display:</th>
  120. <td>
  121. <select name="image"><option value="" selected="selected">None</option><option value="grevture.gif">grevture.gif</option></select>
  122. </td>
  123. </tr>
  124. <tr valign="top">
  125. <th scope="col" align="right">Correct Answer Formula:</th>
  126. <td>
  127. <input align="left" type="text" id="formula0" name="answer[]" size="20" value="{a} + {b}" />&nbsp;&nbsp;
  128. <input type="hidden" name="fraction[]" value="1.0" />
  129. </td>
  130. </tr>
  131. <tr valign="top">
  132. <th scope="col" align="right">Tolerance:</th>
  133. <td>
  134. <input align="left" type="text" id="tolerance0&quot;" name="tolerance[]" size="15" value="0.01" />±
  135. </td>
  136. </tr>
  137. <tr valign="top">
  138. <th scope="col" align="right">Tolerance Type:</th>
  139. <td>
  140. <select name="tolerancetype[]"><option value="1" selected="selected">Relative</option><option value="2">Nominal</option><option value="3">Geometric</option></select>
  141. </td>
  142. </tr>
  143. <tr valign="top">
  144. <th scope="col" align="right">Significant Figures:</th>
  145. <td>
  146. <select name="correctanswerlength[]"><option value="1">1</option><option value="2" selected="selected">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
  147. </td>
  148. </tr>
  149. </tbody></table>
  150. <p>
  151. In the question text input and "Correct Answer Formula" {a} and {b} can be seen. These and any other {name} can be used as a wildcard that is substituted by some value when the quiz is taken. Also, the correct answer is calculated when the quiz is submitted using the expression in "Correct Answer Formula", which is calculated as a numerical expression after the substitution of the wildcards. The possible wildcard values are set or generated on a later page in "editing wizard" for calculated questions...
  152. </p> <p>
  153. The example formula uses the operator +. Other accepted operators are -*/ and % where % is the modulo operator. It is also possible to use some PHP-style mathematical function. Among these there are 24 single-argument function:<br /><b>
  154. abs, acos, acosh, asin, asinh, atan, atanh, ceil, cos, cosh, deg2rad, exp, expm1, floor, log, log10, log1p, rad2deg, round, sin, sinh, sqrt, tan, tanh
  155. </b><br />and two two-argument functions<br /><b>
  156. atan2, pow
  157. </b><br />and the functions <b>min</b> and <b>max</b> that can take two or more arguments. It is also possible to use the function <b>pi</b> that takes no arguments but do not forget the use the parentheses - the correct usage is <b>pi()</b>. Similarly the other function must have their argument(s) within parentheses. Possible usage is for example <b>sin({a}) + cos({b}) * 2</b>. It should not be any problem to wrap functions within each other like <b>cos(deg2rad({a} + 90))</b> etc.
  158. <br />More details on how to use these PHP-style functions can be found in the <a target="phpmathdoc" href="http://www.php.net/manual/en/ref.math.php">documentation at the PHP web site</a>
  159. </p> <p>
  160. As for numerical questions it is possible to allow a margin within which all responses are accepted as correct. The "Tolerance" field is used for this. However, there are three different types of tolerances. These are <b>Relative, Nominal and Geometric</b>. If we say that the correct answer at quiz time is calculated to 200 and the tolerance is set to 0.5 then the different tolerance types work like this:
  161. </p> <p><b>Relative:</b> A tolerance interval is calculated by multiplying the correct answer with 0.5, ie in this case we get 100 so for this tolerance the correct response must be between 100 and 300. (200 ± 100)<br />
  162. This is useful if the magnitude of the correct answer can differ greatly between different wildcard values.
  163. </p> <p><b>Nominal:</b> This is the simplest tolerance type but not very powerful. The correct response must be between 199.5 and 200.5 (200 ± 0.5)<br />
  164. This tolerance type can be useful if the differences between different correct answers are small.
  165. </p> <p><b>Geometric:</b> The upper limit of the tolerance interval is calculated as 200 + 0.5*200 and is the same as for the relative case. The lower limit is calculated as 200/(1 + 0.5). The correct response must then be between 133.33 and 300.<br />
  166. This is useful for complex calculation that must have great tolerances where relative tolerances of 1 or more would be used for the upper limit but clearly not acceptable for the lower limit as it would make zero a correct answer for all cases.
  167. </p> <p>
  168. The field <b>Significant Figures</b> does only relate to how the correct answer should be presented in the review or the reports. Examples: If it is set to 3 then the correct answer 13.333 would be presented as 13.3; 1236 would be presented as 1240; 23 would be presented as 23.0 etc.
  169. </p> <p>
  170. The feedback field and the optional unit fields work just like they do for numerical questions.
  171. </p></div><div class="closewindow">
  172. <form action="#"><div><input type="button" onclick="self.close();" value="Close this window" /></div></form></div>
  173. <p class="helpindex"><a href="help.php?file=index.html">Index of all help files</a></p></div><div id="footer"><hr /><p class="helplink"></p> <div class="validators"><ul>
  174. <li><a href="http://validator.w3.org/check?verbose=1&amp;ss=1&amp;uri=http%3A%2F%2Fwww.di.uevora.pt%2Fmoodle%2Fhelp.php%3Fmodule%3Dquiz%26file%3Dcalculated.html">Validate HTML</a></li>
  175. <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=http%3A%2F%2Fwww.di.uevora.pt%2Fmoodle%2Fhelp.php%3Fmodule%3Dquiz%26file%3Dcalculated.html">Section 508 Check</a></li>
  176. <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&amp;warnp2n3e=1&amp;url1=http%3A%2F%2Fwww.di.uevora.pt%2Fmoodle%2Fhelp.php%3Fmodule%3Dquiz%26file%3Dcalculated.html">WCAG 1 (2,3) Check</a></li>
  177. </ul></div>
  178. </div>
  179. </div>
  180. </body>
  181. </html>

↑ Top