Subversion Repositories wimsdev

Rev

Rev 10626 | Rev 10651 | 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
10640 bpr 2
!if $supervisable=yes or ($wims_user=supervisor and $wims_realuser=supervisor)
4800 bpr 3
 !read subclasses_user.phtml
5127 bpr 4
 !if ($wims_user=supervisor or $wims_class=$wims_superclass)
10640 bpr 5
!!FIXME desactivate the possibility for teachers to register without the administrator in a portal
10626 bpr 6
   !if $class_type notwordof 2 4
5127 bpr 7
    !href module=adm/class/classes&type=supervisor&superclass=$wims_class $U_supervise
8
   !else
10640 bpr 9
     !if $wims_user!=supervisor or $wims_realuser!=supervisor
10
       $name_gotosupervise
11
     !endif
5127 bpr 12
   !endif
5104 bpr 13
 !endif
4799 guerimand 14
!endif
5894 bpr 15
 
16
!if $(subclasscnt1)>0 and $insc!=yes
5110 bpr 17
<p>
33 reyssat 18
  !if $supervisable!=yes
19
   $U_gotoclass
20
  !else
5110 bpr 21
   $(U_gotoclass1)
33 reyssat 22
  !endif
5894 bpr 23
</p>
5110 bpr 24
!endif
5894 bpr 25
 
5110 bpr 26
!if $auth_method isitemof $auth_method_list and $wims_user!=supervisor
27
      !set u_=$wims_external_auth
28
!else
29
      !set u_=$wims_user
30
!endif
7679 bpr 31
 
5110 bpr 32
!if $subclass1=$empty
33
  !goto end
34
!endif
35
  <ul class="wims_subclasses"><!--wims_subclasses-->
36
!reset alreadyseen
37
!if $wims_class!=$wims_superclass
38
   !set subclass1=$wims_class,$subclass1
39
!endif
40
 
41
!for c in $subclass1
42
     !set name=!defof class_description in wimshome/log/classes/$c/.def
43
     !set type=!defof class_type in wimshome/log/classes/$c/.def
44
     !set type_name=!defof class_typename in wimshome/log/classes/$c/.def
45
     !read adm/class/initclass $c,auth
46
 
5123 bpr 47
     !set t_=participant
48
     !set type_class=!defof class_type in wimshome/log/classes/$class/.def
5110 bpr 49
     !if $c notitemof $alreadyseen
5941 obado 50
      <li>  <span class="wims_classes_direct_$type_name">
5110 bpr 51
      !if $c!=$wims_class
52
      !href module=adm/class/classes&type=authparticipant&class=$c&auth_user=$u_ $name
53
      !else
54
        $name
1434 bpr 55
      !endif
5110 bpr 56
      ($(CL_Name[2]))</span>
57
     !set alreadyseen=!append item $c to $alreadyseen
1434 bpr 58
     !set sub_=!record 0 of wimshome/log/classes/$c/courses
59
     !set sub_cnt=!linecnt $sub_
7679 bpr 60
     !if $sub_cnt>0
5110 bpr 61
       <ul><!--2-->
1429 bpr 62
      !for k_ =1 to $sub_cnt
63
       !set parent_c=!defof class_parent in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.def
1641 bpr 64
       !set split=!replace internal / by , in $(sub_[$k_;1])
65
       !set progstyle=!defof class_progstyle in wimshome/log/classes/$wims_superclass/$(split[1])/$(split[3])/.def
1429 bpr 66
       !set name_c=!defof class_description in wimshome/log/classes/$parent_c/.def
1641 bpr 67
       !if  optional iswordof $progstyle
68
         !set inscrit=!defof user_class in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.users/$wims_user
69
       !endif
5110 bpr 70
       !if $wims_superclass/$(sub_[$k_;1]) notitemof $alreadyseen and mandatory iswordof $progstyle or $(split[1])/$(split[2]) iswordof $inscrit or $wims_user=supervisor
5123 bpr 71
        !set alreadyseen=!append item $wims_superclass/$(sub_[$k_;1]) to $alreadyseen
5941 obado 72
        <li>
1641 bpr 73
        <span class="wims_classes_direct_course">
7679 bpr 74
        !href module=adm/class/classes&type=auth$t_&class=$wims_superclass/$(sub_[$k_;1])&auth_user=$u_ $(sub_[$k_;3])
1434 bpr 75
       ($(CL_Name[4]))
1641 bpr 76
        </span>
3605 bpr 77
        </li>
1641 bpr 78
       !endif
5843 bpr 79
       </li>
1429 bpr 80
      !next k_
5110 bpr 81
       </ul><!end--2-->
7679 bpr 82
      !endif sub_cnt>0
5123 bpr 83
        !if $c=$wims_class
84
         !goto end
85
        !endif
86
      !endif $c notitemof $alreadyseen
87
!next
88
 
5110 bpr 89
:end
5111 bpr 90
</ul>
5110 bpr 91
!if $alreadyseen!=$empty
92
  !set subclass2=!listcomplement $alreadyseen in $subclass2
93
  !set subclasscnt2=!itemcnt $subclass2
94
!endif
4588 czzmrn 95
!if $class_mixed_external_auth!=2 and $subclasscnt2>0
33 reyssat 96
 !if $insc!=yes
97
  !href module=home&cmd=new&insc=yes $U_inscription2
98
 !else
5891 obado 99
<div>
5110 bpr 100
  $U_inscription1
5891 obado 101
 <ul>
33 reyssat 102
  !for c in $subclass2
103
   !set name=!defof class_description in wimshome/log/classes/$c/.def
5111 bpr 104
   !set type=!defof class_typename in wimshome/log/classes/$c/.def
5891 obado 105
   <li> <span class="wims_classes_direct_$type">
7124 czzmrn 106
!! wrong variable?
107
!!   !href module=adm/class/reguser&class=$c&auth_user=$u_ $name
108
   !href module=adm/class/reguser&class=$c&user_auth=$u_ $name
5111 bpr 109
   </span></li>
33 reyssat 110
  !next c
5891 obado 111
 </ul>
112
</div>
5111 bpr 113
  !set wims_ref_class=wims_button
3960 bpr 114
  !href module=home&cmd=new $wims_name_back2
33 reyssat 115
 !endif
116
!endif
5843 bpr 117
!if $supervisable=yes and ($wims_user=supervisor or $wims_class=$wims_superclass) and $class_type notwordof 3 4
5111 bpr 118
<p>
5104 bpr 119
   !set wims_ref_class=wims_button
120
   !href module=adm/class/regclass $wims_name_classcreate
9454 guerimand 121
   !set wims_ref_class=wims_button
122
   !href module=adm/class/regclass&job=cloneexemple $wims_name_cloneclass
123
 
5843 bpr 124
</p>
5020 bpr 125
!endif