Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
11268 obado 1
!! examclock.proc adds an exam remaining time in page footer.
2
!! Call it with !readproc adm/class/examclock.proc
3
 
4
!set examreg=!record 0 of wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
5
!set n_=!wordcnt $examreg
6
!if $n_>=4
7
  !set registered=!word 3 of $examreg
8
!endif
9
 
10
!set wims_hr_r=$[max(0,$wims_exam_remain)]
11
!set wims_hr_rm=$[floor($wims_hr_r/60)]
12
!set wims_hr_rs=!char 2,3 of $[$wims_hr_r%60+100]
11295 bpr 13
!!!set wims_homeref_special=<p class="exam_remain">$wims_name_examremain <strong>$wims_hr_rm:$wims_hr_rs</strong> ($wims_name_whenloaded)</p>
14
!!set wims_homeref_special=$wims_homeref_special
11268 obado 15
!if $lang=fr
16
  !set date_format=%d/%m/%Y - %T
17
!else
18
  !set date_format=%Y-%m-%d - %T
19
!endif
20
 
21
!set exam_end_date=!exec get_end_date.pl $wims_hr_r,$date_format
22
 
11295 bpr 23
!set wims_homeref_special=$wims_homeref_special\
24
 <p class="exam_ending">$wims_name_exam_ending <strong>$exam_end_date</strong> ($wims_name_server_time)</p>