Subversion Repositories wimsdev

Rev

Rev 5127 | Rev 5891 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

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