Subversion Repositories wimsdev

Rev

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

  1. !default CL_Name=$CL_Names
  2. !if $supervisable=yes or ($wims_user=supervisor and $wims_realuser=supervisor)
  3.  !read subclasses_user.phtml
  4.  !if ($wims_user=supervisor or $wims_class=$wims_superclass)
  5. !!FIXME desactivate the possibility for teachers to register without the administrator in a portal
  6.    !if $class_type notwordof 2 4
  7.     !href module=adm/class/classes&type=supervisor&superclass=$wims_class $U_supervise
  8.    !else
  9.      !if $wims_user!=supervisor or $wims_realuser!=supervisor
  10.        $name_gotosupervise
  11.      !endif
  12.    !endif
  13.  !endif
  14. !endif
  15.  
  16. !if $(subclasscnt1)>0 and $insc!=yes
  17. <p>
  18.   !if $supervisable!=yes
  19.    $U_gotoclass
  20.   !else
  21.    $(U_gotoclass1)
  22.   !endif
  23. </p>
  24. !endif
  25.  
  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
  31.  
  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.  
  47.      !set t_=participant
  48.      !set type_class=!defof class_type in wimshome/log/classes/$class/.def
  49.      !if $c notitemof $alreadyseen
  50.       <li>  <span class="wims_classes_direct_$type_name">
  51.       !if $c!=$wims_class
  52.       !href module=adm/class/classes&type=authparticipant&class=$c&auth_user=$u_ $name
  53.       !else
  54.         $name
  55.       !endif
  56.       ($(CL_Name[2]))</span>
  57.      !set alreadyseen=!append item $c to $alreadyseen
  58.      !set sub_=!record 0 of wimshome/log/classes/$c/courses
  59.      !set sub_cnt=!linecnt $sub_
  60.      !if $sub_cnt>0
  61.        <ul><!--2-->
  62.       !for k_ =1 to $sub_cnt
  63.        !set parent_c=!defof class_parent in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.def
  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
  66.        !set name_c=!defof class_description in wimshome/log/classes/$parent_c/.def
  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
  70.        !if $wims_superclass/$(sub_[$k_;1]) notitemof $alreadyseen and mandatory iswordof $progstyle or $(split[1])/$(split[2]) iswordof $inscrit or $wims_user=supervisor
  71.         !set alreadyseen=!append item $wims_superclass/$(sub_[$k_;1]) to $alreadyseen
  72.         <li>
  73.         <span class="wims_classes_direct_course">
  74.         !href module=adm/class/classes&type=auth$t_&class=$wims_superclass/$(sub_[$k_;1])&auth_user=$u_ $(sub_[$k_;3])
  75.        ($(CL_Name[4]))
  76.         </span>
  77.         </li>
  78.        !endif
  79.        </li>
  80.       !next k_
  81.        </ul><!end--2-->
  82.       !endif sub_cnt>0
  83.         !if $c=$wims_class
  84.          !goto end
  85.         !endif
  86.       !endif $c notitemof $alreadyseen
  87. !next
  88.  
  89. :end
  90. </ul>
  91. !if $alreadyseen!=$empty
  92.   !set subclass2=!listcomplement $alreadyseen in $subclass2
  93.   !set subclasscnt2=!itemcnt $subclass2
  94. !endif
  95. !if $class_mixed_external_auth!=2 and $subclasscnt2>0
  96.  !if $insc!=yes
  97.   !href module=home&cmd=new&insc=yes $U_inscription2
  98.  !else
  99. <div>
  100.   $U_inscription1
  101.  <ul>
  102.   !for c in $subclass2
  103.    !set name=!defof class_description in wimshome/log/classes/$c/.def
  104.    !set type=!defof class_typename in wimshome/log/classes/$c/.def
  105.    <li> <span class="wims_classes_direct_$type">
  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
  109.    </span></li>
  110.   !next c
  111.  </ul>
  112. </div>
  113.   !set wims_ref_class=wims_button
  114.   !href module=home&cmd=new $wims_name_back2
  115.  !endif
  116. !endif
  117. !if $supervisable=yes and ($wims_user=supervisor or $wims_class=$wims_superclass) and $class_type notwordof 3 4
  118. <p>
  119.    !set wims_ref_class=wims_button
  120.    !href module=adm/class/regclass $wims_name_classcreate
  121.    !set wims_ref_class=wims_button
  122.    !href module=adm/class/regclass&job=cloneexemple $wims_name_cloneclass
  123.  
  124. </p>
  125. !endif
  126.