Subversion Repositories wimsdev

Rev

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