Parent Directory
|
Revision Log
*** empty log message ***
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <!-- WeBWorK Online Homework Delivery System 4 -- Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ 5 -- $CVSHeader: webwork2/conf/templates/math/gateway.template,v 1.3.2.2 2006/01/20 00:08:50 sh002i Exp $ 6 -- 7 -- This program is free software; you can redistribute it and/or modify it under 8 -- the terms of either: (a) the GNU General Public License as published by the 9 -- Free Software Foundation; either version 2, or (at your option) any later 10 -- version, or (b) the "Artistic License" which comes with this package. 11 -- 12 -- This program is distributed in the hope that it will be useful, but WITHOUT 13 -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 -- FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the 15 -- Artistic License for more details. 16 --> 17 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 18 <head> 19 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 20 <meta http-equiv="Pragma" content="no-cache"/> 21 <meta http-equiv="expires" content="Wed, 21 Dec 2005 00:00:01 GMT"/> 22 <link rel="stylesheet" type="text/css" media="All" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/> 23 <!-- [gateway] since the left-side menus are gone, don't indent the main content area --> 24 <link rel="stylesheet" type="text/css" media="All" href="<!--#url type="webwork" name="htdocs"-->/css/gateway.css"/> 25 <title><!--#path style="text" text=" : " textonly="1"--></title> 26 <!--#head--> 27 <script language="javascript" type="text/javascript"> 28 function jumpTo(ref) { // scrolling javascript function 29 if ( ref ) { 30 var pn = ref - 1; // we start anchors at 1, not zero 31 if ( navigator.appName == "Netscape" && 32 parseFloat(navigator.appVersion) < 5 ) { 33 var xpos = document.anchors[pn].x; 34 var ypos = document.anchors[pn].y; 35 } else { 36 var xpos = document.anchors[pn].offsetLeft; 37 var ypos = document.anchors[pn].offsetTop; 38 } 39 if ( window.scrollTo == null ) { // cover for anyone 40 window.scroll(xpos,ypos); // lacking js1.2 41 } else { 42 window.scrollTo(xpos,ypos); 43 } 44 } 45 return false; // prevent link from being followed 46 } 47 48 // timer for gateway 49 var theTime = -1; // -1 before we've initialized 50 var alerted = -1; // -1 = no alert set; 1 = 1st alert set 51 // this shouldn't really be needed 52 function runtimer() { 53 // aesthetically this is displeasing: we're assuming that the 54 // ContentGenerator will put the appropriate form elements in that 55 // page for us to manipulate. even with error checking, it seems sort 56 // of odd. 57 58 if ( document.gwtimer == null ) { // no timer 59 return; 60 } else { 61 var tm = document.gwtimer.gwtime; 62 var st = document.gwtimer.gwpagetimeleft.value; 63 64 if ( st == 0 ) { // no time limit 65 return; 66 } else { 67 if ( theTime == -1 ) { 68 theTime = st; 69 tm.value = toMinSec(theTime); 70 setTimeout("runtimer()", 1000); // 1000 ms = 1 sec 71 } else if ( theTime == 0 && alerted != 3 ) { 72 alert("* You are out of time! *"); 73 alerted = 3; 74 } else if ( alerted != 3 ) { 75 theTime--; 76 tm.value = toMinSec(theTime); 77 setTimeout("runtimer()", 1000); // 1000 ms = 1 sec 78 if ( theTime == 35 && alerted != 2 ) { // time is in seconds 79 alert("* You have only about 30 seconds to complete " + 80 "this assignment. Press Grade very soon! *\n" + 81 "* The timer stops while this alert box is open. *"); 82 alerted = 2; 83 theTime -= 5; 84 } else if ( theTime == 75 && alerted != 1) { 85 alert("* You have only about a minute left " + 86 "to complete this assignment! *\n" + 87 "* The timer stops while this alert box is open. *"); 88 alerted = 1; 89 theTime -= 5; 90 } 91 } 92 } 93 } 94 } 95 function toMinSec(t) { 96 // convert to min:sec 97 if ( t < 0 ) { // don't deal with negative times 98 t = 0; 99 } 100 mn = Math.floor(t/60); 101 sc = t - 60*mn; 102 if ( mn < 10 && mn > -1 ) { 103 mn = "0" + mn; 104 } 105 if ( sc < 10 ) { 106 sc = "0" + sc; 107 } 108 return mn + ":" + sc; 109 } 110 111 // for some reason putting this as an onload event in the body tag 112 // isn't working. so start the timer here; the 500ms delay is to be 113 // sure that the timer form fields have loaded 114 setTimeout("runtimer()",500); 115 </script> 116 </head> 117 <body bgcolor="white"> 118 119 <div id="masthead"> 120 <div id="loginstatus"> 121 <!--#loginstatus--> 122 </div> 123 <div id="logo"> 124 <img src="<!--#url type="webwork" name="htdocs"-->/images/webwork_rectangle.png" alt="WeBWorK" height="51" width="267" /> 125 </div> 126 </div> 127 <hr class="for-broken-browsers"/> 128 <div id="big-wrapper"> 129 <div id="breadcrumbs"> 130 <!--#path style="text" text=" → "--> 131 </div> 132 <div id="content"> 133 134 <!--#if can="info"--> 135 <!--<div id="page-info">--> 136 <!--<div class="info-box" id="fisheye">--> 137 <!--#info--> 138 <!--</div>--> 139 <!--</div>--> 140 <!--#endif--> 141 142 <!-- [gateway] removed nav button to go up --> 143 144 <!--#if can="title"--> 145 <h1><!--#title--></h1> 146 <!--#endif--> 147 148 <!--#if can="message"--> 149 <div class="Message"> 150 <!--#message--> 151 </div> 152 <!--#endif--> 153 154 <!--#if can="body"--> 155 <div class="Body"> 156 <!--#body--> 157 </div> 158 <!--#endif--> 159 160 <!--#if warnings="1"--> 161 <hr> 162 <div class="Warnings"> 163 <!--#warnings--> 164 </div> 165 <!--#endif--> 166 167 <!--#if can="message"--> 168 <div class="Message"> 169 <!--#message--> 170 </div> 171 <!--#endif--> 172 173 </div> <!-- content --> 174 <hr class="for-broken-browsers"/> 175 <div id="footer"> 176 <p id="last-modified">Page generated at <!--#timestamp--></p> 177 <div id="copyright"> 178 WeBWorK © 2000-2006 <a href="http://openwebwork.sf.net/">The WeBWorK Project</a> 179 </div> 180 </div> 181 <!-- [gateway] removed left sidebar --> 182 </div> <!-- big-wrapper --> 183 184 </body> 185 </html>
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |