Subversion Repositories wimsdev

Rev

Rev 876 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
861 guerimand 1
# test if the user "user" is registered in the class "class".
2
# Calling parameter: class,user.
3
 
4
!distribute items $wims_read_parm into c_,u_
5
!let d_=wimshome/log/classes
6
!default c_=$wims_class
7
!let script_reply=no
8
 
9
!if $u_=supervisor
10
 !let script_reply=yes
11
 !exit
12
!else
13
 f_=.users/$u_
14
!endif
15
 
16
scl_=!defof class_superclass in $d_/$c_/.def
17
scl_=!item -1 of $scl_
18
!if $scl_=$empty
19
 !let script_reply=!defof user_exists in $d_/$c_/$f_
20
!else
21
 !let auth_=!defof user_participate in $d_/$scl_/$f_
22
 !if $c_ isitemof $auth_
23
  !let script_reply=yes
24
 !endif
25
!endif
26
 
27