Subversion Repositories wimsdev

Rev

Rev 13012 | Rev 13182 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13012 Rev 13064
Line 11... Line 11...
11
!read adm/class/initclass $class,auth
11
!read adm/class/initclass $class,auth
12
!set regvars_cnt=!itemcnt $regvars_class
12
!set regvars_cnt=!itemcnt $regvars_class
13
!!! test pour une nouvelle inscription dans une classe d'un groupement
13
!!! test pour une nouvelle inscription dans une classe d'un groupement
14
!if $auth_method isitemof $auth_method_list and $user_auth=$empty and $wims_user!=supervisor
14
!if $auth_method isitemof $auth_method_list and $user_auth=$empty and $wims_user!=supervisor
15
  !if $wims_external_auth!=$empty
15
  !if $wims_external_auth!=$empty
16
     m_test=!lookup $wims_external_auth in wimshome/log/classes/$wims_superclass/.userlist_external
16
    m_test=!lookup $wims_external_auth in wimshome/log/classes/$wims_superclass/.userlist_external
17
     !if $m_test=$wims_user
17
    !if $m_test=$wims_user
18
       user_auth=$wims_external_auth
18
      user_auth=$wims_external_auth
19
     !else
19
    !else
20
       m_test=!defof user_supervisable in  wimshome/log/classes/$wims_superclass/.users/$wims_realuser
20
      m_test=!defof user_supervisable in wimshome/log/classes/$wims_superclass/.users/$wims_realuser
21
       !if $m_test=yes
21
      !if $m_test=yes
22
        m_test=!lookup $wims_external_auth in wimshome/log/classes/$wims_superclass/.teacherlist_external
22
        m_test=!lookup $wims_external_auth in wimshome/log/classes/$wims_superclass/.teacherlist_external
23
        !if $m_test=$wims_realuser
23
        !if $m_test=$wims_realuser
24
          user_auth=$wims_external_auth
24
          user_auth=$wims_external_auth
25
        !endif
25
        !endif
26
       !endif
26
      !endif
27
     !endif
27
    !endif
28
  !endif
28
  !endif
29
!endif
29
!endif
30
 
30
 
31
!! inscription by the supervisor
31
!! inscription by the supervisor
32
!if $auth_method isitemof $auth_method_list and $wims_user=supervisor
32
!if $auth_method isitemof $auth_method_list and $wims_user=supervisor
Line 164... Line 164...
164
    !else
164
    !else
165
      !! non obligatory course
165
      !! non obligatory course
166
      !read adm/class/userdef classes,$wims_class,$wims_user
166
      !read adm/class/userdef classes,$wims_class,$wims_user
167
      scl=!defof user_participate in $userdef
167
      scl=!defof user_participate in $userdef
168
      !if $class notitemof $scl
168
      !if $class notitemof $scl
-
 
169
        tmp=!defof class_type in wimshome/log/classes/$class_parent/.def
-
 
170
        !!tmp=3 -> interclasse course
169
        !if $class_parent isin $scl
171
        !if $class_parent isin $scl or $tmp=3
170
          !setdef !set user_participate=$scl,$class in $userdef
172
          !setdef !set user_participate=$scl,$class in $userdef
171
          !setdef !set user_class=$class in wimshome/log/classes/$class/.users/$wims_user
173
          !setdef !set user_class=$class in wimshome/log/classes/$class/.users/$wims_user
172
          login=$wims_user
174
          login=$wims_user
173
          !appendfile wimshome/log/classes/$wims_class/.log $date $httpd_REMOTE_ADDR	User $login added
175
          !appendfile wimshome/log/classes/$wims_class/.log $date $httpd_REMOTE_ADDR	User $login added
174
          wims_module_log=registered $wims_class/$wims_user in $class
176
          wims_module_log=registered $wims_class/$wims_user in $class
-
 
177
          !reset tmp
175
          !read adm/class/mkuserlist $class
178
          !read adm/class/mkuserlist $class
176
        !else
179
        !else
177
          error=bad_optioncourse
180
          error=bad_optioncourse
178
          !exit
181
          !exit
-
 
182
          !reset tmp
179
        !endif
183
        !endif
180
      !else
184
      !else
181
        !exit
185
        !exit
182
      !endif
186
      !endif
183
    !endif
187
    !endif