Subversion Repositories wimsdev

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
17070 guerimand 1
!! check if score is open according to score restriction define for sheet and user define by wims_read_parm
2
!! wims_read_parm=user,sheet
3
 
4
!distribute item $wims_read_parm into U_,S_
5
 
6
expir_=!record 0 of wimshome/log/classes/$wims_class/.$S_
7
!if $expir_=$empty
8
  scoreopen=1
9
  !exit
10
!endif
11
 
12
cle_=!word 1 of $expir_
13
!! process for technical variable definition (replace expir_user by value decide by the technical variable)
14
!if \ isin $cle_
15
  idtechvar_=!line 1 of $expir_
16
  idtechvar_=!char 2 to -1 of $idtechvar_
17
  !readproc adm/class/userdef ,$wims_class,$U_
18
  val_=!defof user_techvar_$(idtechvar_) in $userdef
19
  !default val_=EMPTY
20
  !reset expir_
21
  expir_=!defof techvar_$val_ in wimshome/log/classes/$wims_class/.$S_
22
  !default expir_=none
23
!endif
24
!! end process technical variable
25
 
26
!if $expir_=none
27
  scoreopen=0
28
  !exit
29
!endif
30
 
31
!reset S_expiration_ S_beginning_
32
expir_=!words2items $expir_
33
!for l_ in $expir_
34
  !if < isin $l_ or > isin $l_
35
    !if < isin $l_
36
      l_=!replace internal < by ?, in $l_
37
      cle_=expiration
38
    !else
39
      l_=!replace internal > by ?, in $l_
40
      cle_=beginning
41
    !endif
42
    !if ? isitemof $l_
43
      S_($cle_)_=!text select 0123456789 of $(l_[2])
44
    !endif
45
  !endif
46
!next l_
47
!default S_expiration=999999999999
48
!default S_beginning_=0
49
now_=!text select 0123456789 of $wims_now
50
!if $now_>=$S_beginning_ and $now_<=$S_expiration_
51
  scoreopen=1
52
!else
53
  scoreopen=0
54
!endif