Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
1429 bpr 1
!default CL_Name=$CL_Names
2
!set arr=--->
5110 bpr 3
 
4799 guerimand 4
!if $supervisable=yes
4800 bpr 5
 !read subclasses_user.phtml
5104 bpr 6
 !if $wims_user=supervisor or $wims_class=$wims_superclass     
7
   !href module=adm/class/classes&type=supervisor&superclass=$wims_class $U_supervise
8
 !endif
4799 guerimand 9
!endif
5110 bpr 10
<p>
11
!if $(subclasscnt1)>0 and $insc!=yes and
33 reyssat 12
  !if $supervisable!=yes
13
   $U_gotoclass
14
  !else
5110 bpr 15
   $(U_gotoclass1)
33 reyssat 16
  !endif
5110 bpr 17
!endif
18
!if $auth_method isitemof $auth_method_list and $wims_user!=supervisor
19
      !set u_=$wims_external_auth
20
!else
21
      !set u_=$wims_user
22
!endif
23
 
24
!if $subclass1=$empty
25
  !goto end
26
!endif
27
  <ul class="wims_subclasses"><!--wims_subclasses-->
28
!reset alreadyseen
29
!if $wims_class!=$wims_superclass
30
   !set subclass1=$wims_class,$subclass1
31
!endif
32
 
33
!for c in $subclass1
34
     !set name=!defof class_description in wimshome/log/classes/$c/.def
35
     !set type=!defof class_type in wimshome/log/classes/$c/.def
36
     !set type_name=!defof class_typename in wimshome/log/classes/$c/.def
37
     !read adm/class/initclass $c,auth
38
 
33 reyssat 39
    !set t_=participant
5020 bpr 40
    !set type_class=!defof class_type in wimshome/log/classes/$class/.def
5110 bpr 41
     !if $c notitemof $alreadyseen
42
      <li> $arr <span class="wims_classes_direct_$type_name">
43
      !if $c!=$wims_class
44
      !href module=adm/class/classes&type=authparticipant&class=$c&auth_user=$u_ $name
45
      !else
46
        $name
1434 bpr 47
      !endif
5110 bpr 48
      ($(CL_Name[2]))</span>
49
     !set alreadyseen=!append item $c to $alreadyseen
1434 bpr 50
     !set sub_=!record 0 of wimshome/log/classes/$c/courses
51
     !set sub_cnt=!linecnt $sub_
52
     !if $sub_cnt>0
5110 bpr 53
       <ul><!--2-->
1429 bpr 54
      !for k_ =1 to $sub_cnt
55
       !set parent_c=!defof class_parent in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.def
1641 bpr 56
       !set split=!replace internal / by , in $(sub_[$k_;1])
57
       !set progstyle=!defof class_progstyle in wimshome/log/classes/$wims_superclass/$(split[1])/$(split[3])/.def
1429 bpr 58
       !set name_c=!defof class_description in wimshome/log/classes/$parent_c/.def
1641 bpr 59
       !if  optional iswordof $progstyle
60
         !set inscrit=!defof user_class in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.users/$wims_user
61
       !endif
5110 bpr 62
       !if $wims_superclass/$(sub_[$k_;1]) notitemof $alreadyseen and mandatory iswordof $progstyle or $(split[1])/$(split[2]) iswordof $inscrit or $wims_user=supervisor
63
       !set alreadyseen=!append item $wims_superclass/$(sub_[$k_;1]) to $alreadyseen
1641 bpr 64
        <li> &nbsp; $arr&nbsp;
65
        <span class="wims_classes_direct_course">
66
        !href module=adm/class/classes&type=auth$t_&class=$wims_superclass/$(sub_[$k_;1])&auth_user=$u_ $(sub_[$k_;3])
1434 bpr 67
       ($(CL_Name[4]))
1641 bpr 68
        </span>
3605 bpr 69
        </li>
1641 bpr 70
       !endif
1429 bpr 71
      !next k_
5110 bpr 72
       </ul><!end--2-->
73
       !if $c=$wims_class
74
        !goto end
1434 bpr 75
     !endif
5110 bpr 76
    !next
77
!endif
78
:end
1016 bpr 79
 
5110 bpr 80
!if $alreadyseen!=$empty
81
  !set subclass2=!listcomplement $alreadyseen in $subclass2
82
  !set subclasscnt2=!itemcnt $subclass2
83
!endif
4588 czzmrn 84
!if $class_mixed_external_auth!=2 and $subclasscnt2>0
33 reyssat 85
 !if $insc!=yes
86
  !href module=home&cmd=new&insc=yes $U_inscription2
87
 !else
5110 bpr 88
  $U_inscription1
33 reyssat 89
  !for c in $subclass2
90
   !set name=!defof class_description in wimshome/log/classes/$c/.def
5110 bpr 91
   !href module=adm/class/reguser&class=$c&auth_user=$u_ $name
33 reyssat 92
   &nbsp;
93
  !next c
94
  <p>
3960 bpr 95
  !href module=home&cmd=new $wims_name_back2
33 reyssat 96
 !endif
97
 <p>
98
!endif
99
 
5104 bpr 100
!if $supervisable=yes and ($wims_user=supervisor or $wims_class=$wims_superclass) and $class_type notwordof 3 4
101
   !set wims_ref_class=wims_button
102
   !href module=adm/class/regclass $wims_name_classcreate
5020 bpr 103
!endif