Subversion Repositories wimsdev

Rev

Rev 1114 | Rev 9305 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1114 bpr 1
!set wims_html_onload=examclock();
6099 bpr 2
!set wims_html_header=!append line <script type="text/javascript"> to $wims_html_header
1114 bpr 3
!if $wims_exam_remain=$empty
4
 !set wims_html_header=!append line function examclock() {\
5
 } to  $wims_html_header
6
!else
7
  !set wims_html_header=!append line var examtick=$wims_exam_remain;\
8
 function examclock() {\
9
 var timeStr;\
10
 examtick=(examtick>1)? examtick-1:0;\
11
 minutes=Math.floor(examtick/60); seconds=examtick%60;\
12
 timeStr= ((minutes < 10) ? "0" : "") + minutes;\
13
 timeStr+= ((seconds < 10) ? ":0" : ":") + seconds;\
14
 window.status="$wims_name_examremain" + " " + timeStr;\
15
 Timer= setTimeout("examclock()",1000);\
16
} to $wims_html_header
17
!endif
18
!set wims_html_header=!append line </script> to $wims_html_header