Subversion Repositories wimsdev

Rev

Rev 1116 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !!should use examclock1.phtml
  2.  
  3. !set wims_html_onload=examclock();
  4. <script type="text/javascript">
  5. !if $wims_exam_remain=$empty
  6.  function examclock() {
  7.  }
  8. !else
  9.  var examtick=$wims_exam_remain;
  10.  function examclock() {
  11.  var timeStr;
  12.  examtick=(examtick>1)? examtick-1:0;
  13.  minutes=Math.floor(examtick/60); seconds=examtick%60;
  14.  timeStr= ((minutes < 10) ? "0" : "") + minutes;
  15.  timeStr+= ((seconds < 10) ? ":0" : ":") + seconds;
  16.  window.status="$wims_name_examremain" + " " + timeStr;
  17.  Timer= setTimeout("examclock()",1000);
  18. }
  19. !endif
  20. </script>
  21.  
  22.