[system] / branches / rel-2-3-dev / webwork2 / conf / templates / math / gateway.template Repository:
ViewVC logotype

Annotation of /branches/rel-2-3-dev/webwork2/conf/templates/math/gateway.template

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4022 - (view) (download)
Original Path: trunk/webwork2/conf/templates/math/gateway.template

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9