Subversion Repositories wimsdev

Rev

Rev 876 | Go to most recent revision | Details | Compare with Previous | 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
12159 obado 10
  !let script_reply=yes
11
  !exit
861 guerimand 12
!else
12159 obado 13
  f_=.users/$u_
861 guerimand 14
!endif
15
 
16
scl_=!defof class_superclass in $d_/$c_/.def
17
scl_=!item -1 of $scl_
18
!if $scl_=$empty
12159 obado 19
  !let script_reply=!defof user_exists in $d_/$c_/$f_
861 guerimand 20
!else
12159 obado 21
  !let auth_=!defof user_participate in $d_/$scl_/$f_
22
  !let c_=!replace internal / by , in $c_
23
  !let c_=!item 1 to 3 of $c_
24
  !let c_=!replace internal , by / in $c_
25
  !let c_=!nospace $c_
26
  !if $c_ isitemof $auth_
27
    !let script_reply=yes
28
  !endif
861 guerimand 29
!endif
30