Parent Directory
|
Revision Log
Revision 5451 -
(view)
(download)
Original Path: trunk/webwork-modperl/conf/templates/union/gateway.template
| 1 : | dpvc | 5451 | <!DOCTYPE html |
| 2 : | PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 3 : | SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 4 : | |||
| 5 : | <!-- | ||
| 6 : | ################################################################################ | ||
| 7 : | # WeBWorK Online Homework Delivery System | ||
| 8 : | # Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ | ||
| 9 : | # $CVSHeader: webwork2/conf/templates/ur/gateway.template,v 1.2 2006/01/25 23:13:49 sh002i Exp $ | ||
| 10 : | # | ||
| 11 : | # This program is free software; you can redistribute it and/or modify it under | ||
| 12 : | # the terms of either: (a) the GNU General Public License as published by the | ||
| 13 : | # Free Software Foundation; either version 2, or (at your option) any later | ||
| 14 : | # version, or (b) the "Artistic License" which comes with this package. | ||
| 15 : | # | ||
| 16 : | # This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 17 : | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 18 : | # FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the | ||
| 19 : | # Artistic License for more details. | ||
| 20 : | ################################################################################ | ||
| 21 : | --> | ||
| 22 : | |||
| 23 : | <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> | ||
| 24 : | <head> | ||
| 25 : | <title><!--#path style="text" text=" : " textonly="1"--></title> | ||
| 26 : | <!--#head--> | ||
| 27 : | <style type="text/css" media="all">@import "<!--#url type="webwork" name="stylesheet"-->";</style> | ||
| 28 : | |||
| 29 : | <style type="text/css"> | ||
| 30 : | /******************/ | ||
| 31 : | /* gateway styles */ | ||
| 32 : | /******************/ | ||
| 33 : | |||
| 34 : | .LoginStatus {position:absolute; right:0px; top:-.5em} | ||
| 35 : | |||
| 36 : | div.gwMessage { background-color:#dddddd; color: black; } | ||
| 37 : | div.gwTiming { | ||
| 38 : | background-color:#EECCCC; | ||
| 39 : | color: black; | ||
| 40 : | padding: .5em 2em; | ||
| 41 : | float: right; | ||
| 42 : | } | ||
| 43 : | div.gwTiming form {margin:0px} | ||
| 44 : | div.gwWarning { background-color:#ffffdd; color: black; } | ||
| 45 : | |||
| 46 : | span.resultsWithError { | ||
| 47 : | background-color: #ffcccc; | ||
| 48 : | color: black; | ||
| 49 : | padding: 1px 2em; | ||
| 50 : | margin-left: 1em; | ||
| 51 : | } | ||
| 52 : | span.resultsWithoutError { | ||
| 53 : | background-color: #66ff99; | ||
| 54 : | color: black; | ||
| 55 : | padding: 1px 2em; | ||
| 56 : | margin-left: 1em; | ||
| 57 : | } | ||
| 58 : | |||
| 59 : | div.gwCorrect { | ||
| 60 : | background-color: #66ff99; | ||
| 61 : | color: black; | ||
| 62 : | padding: 1px 2em; | ||
| 63 : | margin-left: 1em; | ||
| 64 : | } | ||
| 65 : | div.gwIncorrect { | ||
| 66 : | background-color: #ff9999; | ||
| 67 : | color: black; | ||
| 68 : | padding: 1px 2em; | ||
| 69 : | margin-left: 1em; | ||
| 70 : | } | ||
| 71 : | |||
| 72 : | div.gwProblem { | ||
| 73 : | clear: both; | ||
| 74 : | background-color: white; | ||
| 75 : | color: black; | ||
| 76 : | padding: 1em 2em; | ||
| 77 : | border-top-style: solid; border-bottom-style: solid; | ||
| 78 : | border-width: 2px; border-color: #DDBBBB; | ||
| 79 : | } | ||
| 80 : | hr {display: none} | ||
| 81 : | .div.gwProblem hr {display:block} | ||
| 82 : | |||
| 83 : | div.gwSoln { | ||
| 84 : | /* background-color: #e0e0ff; */ | ||
| 85 : | background-color: transparent; | ||
| 86 : | color: black; | ||
| 87 : | /* padding: 2px; */, | ||
| 88 : | /* border: dashed black 1px; */ | ||
| 89 : | } | ||
| 90 : | div.gwSoln b { color: navy; } | ||
| 91 : | |||
| 92 : | p.gwPreview { | ||
| 93 : | font-size: smaller; | ||
| 94 : | text-align: right; | ||
| 95 : | margin-top: 0px; | ||
| 96 : | margin-bottom: 0px; | ||
| 97 : | } | ||
| 98 : | |||
| 99 : | table.gwAttemptResults { | ||
| 100 : | border-width: 0px; | ||
| 101 : | } | ||
| 102 : | table.gwAttemptResults td.label { | ||
| 103 : | font-weight: bold; | ||
| 104 : | background-color: transparent; | ||
| 105 : | color: navy; | ||
| 106 : | } | ||
| 107 : | table.gwAttemptResults td.output { | ||
| 108 : | padding: 2px; | ||
| 109 : | border: solid black 1px; | ||
| 110 : | background-color: #eeeeee; | ||
| 111 : | } | ||
| 112 : | |||
| 113 : | </style> | ||
| 114 : | <script language="javascript" type="text/javascript"> | ||
| 115 : | function jumpTo(ref) { // scrolling javascript function | ||
| 116 : | if ( ref ) { | ||
| 117 : | var pn = ref - 1; // we start anchors at 1, not zero | ||
| 118 : | if ( navigator.appName == "Netscape" && | ||
| 119 : | parseFloat(navigator.appVersion) < 5 ) { | ||
| 120 : | var xpos = document.anchors[pn].x; | ||
| 121 : | var ypos = document.anchors[pn].y; | ||
| 122 : | } else { | ||
| 123 : | var xpos = document.anchors[pn].offsetLeft; | ||
| 124 : | var ypos = document.anchors[pn].offsetTop; | ||
| 125 : | } | ||
| 126 : | if ( window.scrollTo == null ) { // cover for anyone | ||
| 127 : | window.scroll(xpos,ypos); // lacking js1.2 | ||
| 128 : | } else { | ||
| 129 : | window.scrollTo(xpos,ypos); | ||
| 130 : | } | ||
| 131 : | } | ||
| 132 : | return false; // prevent link from being followed | ||
| 133 : | } | ||
| 134 : | |||
| 135 : | // timer for gateway | ||
| 136 : | var theTime = -1; // -1 before we've initialized | ||
| 137 : | var alerted = -1; // -1 = no alert set; 1 = 1st alert set | ||
| 138 : | // this shouldn't really be needed | ||
| 139 : | |||
| 140 : | function runtimer() { | ||
| 141 : | // aesthetically this is displeasing: we're assuming that the | ||
| 142 : | // ContentGenerator will put the appropriate form elements in that | ||
| 143 : | // page for us to manipulate. even with error checking, it seems sort | ||
| 144 : | // of odd. | ||
| 145 : | if ( document.gwtimer == null ) { // no timer | ||
| 146 : | return; | ||
| 147 : | } else { | ||
| 148 : | var tm = document.gwtimer.gwtime; | ||
| 149 : | var st = document.gwtimer.gwpagetimeleft.value; | ||
| 150 : | |||
| 151 : | if ( st == 0 ) { // no time limit | ||
| 152 : | return; | ||
| 153 : | } else { | ||
| 154 : | if ( theTime == -1 ) { | ||
| 155 : | theTime = st; | ||
| 156 : | tm.value = toMinSec(theTime); | ||
| 157 : | setTimeout("runtimer()", 1000); // 1000 ms = 1 sec | ||
| 158 : | } else if ( theTime == 0 && alerted != 3 ) { | ||
| 159 : | alert("* You are out of time! *"); | ||
| 160 : | alerted = 3; | ||
| 161 : | } else if ( alerted != 3 ) { | ||
| 162 : | theTime--; | ||
| 163 : | tm.value = toMinSec(theTime); | ||
| 164 : | setTimeout("runtimer()", 1000); // 1000 ms = 1 sec | ||
| 165 : | if ( theTime == 35 && alerted != 2 ) { // time is in seconds | ||
| 166 : | alert("* You have only about 30 seconds to complete " + | ||
| 167 : | "this assignment. Press Grade very soon! *\n" + | ||
| 168 : | "* The timer stops while this alert box is open. *"); | ||
| 169 : | alerted = 2; | ||
| 170 : | theTime -= 5; | ||
| 171 : | } else if ( theTime == 75 && alerted != 1) { | ||
| 172 : | alert("* You have only about a minute left " + | ||
| 173 : | "to complete this assignment! *\n" + | ||
| 174 : | "* The timer stops while this alert box is open. *"); | ||
| 175 : | alerted = 1; | ||
| 176 : | theTime -= 5; | ||
| 177 : | } | ||
| 178 : | } | ||
| 179 : | } | ||
| 180 : | } | ||
| 181 : | } | ||
| 182 : | function toMinSec(t) { | ||
| 183 : | // convert to min:sec | ||
| 184 : | mn = Math.floor(t/60); | ||
| 185 : | sc = t - 60*mn; | ||
| 186 : | if ( mn < 10 && mn > -1 ) { | ||
| 187 : | mn = "0" + mn; | ||
| 188 : | } | ||
| 189 : | if ( sc < 10 ) { | ||
| 190 : | sc = "0" + sc; | ||
| 191 : | } | ||
| 192 : | return mn + ":" + sc; | ||
| 193 : | } | ||
| 194 : | </script> | ||
| 195 : | </head> | ||
| 196 : | <body onload="runtimer();"> | ||
| 197 : | <table width="100%" cellpadding="10" cellspacing="0" border="0"> | ||
| 198 : | <tr valign="top"> | ||
| 199 : | <!-- removed left sidebar --> | ||
| 200 : | <!--#if can="info"--> | ||
| 201 : | <td class="TopPanel" colspan="2"> | ||
| 202 : | <!--#else--> | ||
| 203 : | <td class="TopPanel" > | ||
| 204 : | <!--#endif--> | ||
| 205 : | <div style="position:relative; width:100%;"> | ||
| 206 : | <!--#if can="path"--> | ||
| 207 : | <span class="Path"> | ||
| 208 : | <!--#path style="text" image="/webwork2_files/images/right_arrow.png" text=" > "--> | ||
| 209 : | </span> | ||
| 210 : | <!--#endif--> | ||
| 211 : | |||
| 212 : | <!--#if loggedin="1"--> | ||
| 213 : | <!--#if can="loginstatus"--> | ||
| 214 : | |||
| 215 : | <span class="LoginStatus"> | ||
| 216 : | |||
| 217 : | <!--#loginstatus--> | ||
| 218 : | </span> | ||
| 219 : | <!--#endif--> | ||
| 220 : | <!--#endif--> | ||
| 221 : | </div> | ||
| 222 : | </td> | ||
| 223 : | </tr> | ||
| 224 : | <tr valign="top"> | ||
| 225 : | <!--#if warnings="1"--> | ||
| 226 : | <td class="ContentPanelError" bgcolor="#ffcccc"> | ||
| 227 : | <!--#else--> | ||
| 228 : | <td class="ContentPanel" bgcolor="#ffffff"> | ||
| 229 : | <!--#endif--> | ||
| 230 : | <!-- removed nav button to go up --> | ||
| 231 : | <!--#if can="title"--> | ||
| 232 : | <div class="Title"> | ||
| 233 : | <!--#title--> | ||
| 234 : | </div> | ||
| 235 : | <!--#endif--> | ||
| 236 : | <!--#if can="message"--> | ||
| 237 : | <div class="Message"> | ||
| 238 : | <!--#message--> | ||
| 239 : | </div> | ||
| 240 : | <!--#endif--> | ||
| 241 : | |||
| 242 : | <!--#if can="submiterror"--> | ||
| 243 : | <div class="SubmitError"> | ||
| 244 : | <!--#submiterror--> | ||
| 245 : | </div> | ||
| 246 : | <!--#endif--> | ||
| 247 : | <!--#if can="body"--> | ||
| 248 : | <div class="Body"> | ||
| 249 : | <!--#body--> | ||
| 250 : | </div> | ||
| 251 : | <!--#endif--> | ||
| 252 : | <!--#if warnings="1"--> | ||
| 253 : | <hr> | ||
| 254 : | <div class="Warnings"> | ||
| 255 : | <!--#warnings--> | ||
| 256 : | </div> | ||
| 257 : | <!--#endif--> | ||
| 258 : | <!--#if can="message"--> | ||
| 259 : | <div class="Message"> | ||
| 260 : | <!--#message--> | ||
| 261 : | </div> | ||
| 262 : | <!--#endif--> | ||
| 263 : | </td> | ||
| 264 : | <!--#if can="info"--> | ||
| 265 : | <td class="InfoPanel"> | ||
| 266 : | <div class="Info"> | ||
| 267 : | <!--#info--> | ||
| 268 : | </div> | ||
| 269 : | </td> | ||
| 270 : | <!--#endif--> | ||
| 271 : | </tr> | ||
| 272 : | <tr> | ||
| 273 : | <td class = "Timestamp", colspan=3> | ||
| 274 : | Updated: <!--#timestamp--> | ||
| 275 : | </td> | ||
| 276 : | </tr> | ||
| 277 : | </table> | ||
| 278 : | </body> | ||
| 279 : | </html> |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |