Subversion Repositories wimsdev

Rev

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