Rev 6042 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6044 | bpr | 1 | !!copy from public_html/modules/adm/class/classes/direct.phtml |
2 | !! is-it really useful to copy it ? |
||
6042 | obado | 3 | <!-- begin of $wims_theme/direct.phtml --> |
4 | |||
5677 | obado | 5 | !read adm/class/initclass $wims_class |
6 | |||
7 | !if $directcnt>0 |
||
8 | !for i_=1 to $directcnt |
||
9 | !set cl=!word 1 of $(directlist[$i_]) |
||
10 | !if /0/ notin $(cl)/ |
||
11 | !set type_=!defof class_typename in wimshome/log/classes/$cl/.def |
||
12 | !set direct$type_=!append item $(directlist[$i_]) to $(direct$type_) |
||
13 | !else |
||
14 | !set directtest=!append item $(directlist[$i_]) to $directtest |
||
15 | !endif |
||
16 | !next |
||
17 | |||
18 | $name_direct: |
||
19 | <table class="wims_classes_direct"> |
||
20 | !for typ in portal,group,level,class,course,program,test |
||
21 | !set nstyle=wims_classes_direct_$typ |
||
22 | !set ntype_=$typ |
||
23 | !set ntype_ = !replace internal program by $(CL_Name[3]) in $ntype_ |
||
24 | !set ntype_ = !replace internal level by $(CL_Name[1]) in $ntype_ |
||
25 | !set ntype_ = !replace internal class by $(CL_Name[2]) in $ntype_ |
||
26 | !set ntype_ = !replace internal course by $(CL_Name[4]) in $ntype_ |
||
27 | !set ntype_ = !replace internal portal by $(CL_Name[6]) in $ntype_ |
||
28 | !set ntype_ = !replace internal group by $(CL_Name[6]) in $ntype_ |
||
29 | !set ntype_ = !replace internal test by $(CL_Name[7]) in $ntype_ |
||
30 | !for cl in $(direct$typ) |
||
31 | !distribute words $cl into c_,u_ |
||
32 | !set n_=!defof class_institution, class_description in\ |
||
33 | wimshome/log/classes/$c_/.def |
||
34 | !if $u_=supervisor |
||
35 | !set t_=supervisor |
||
36 | !if $c_ notwordof $wims_supervise and $wims_realuser!=$wims_user |
||
37 | !goto out |
||
38 | !endif |
||
39 | !else |
||
40 | !set t_=$type |
||
41 | !endif |
||
42 | <tr class="$nstyle"><td class="wims_classes_direct_type">$ntype_</td> |
||
43 | <td class="wims_classes_direct_name"> |
||
44 | !set u__=$u_ |
||
45 | !if $auth_method isitemof $auth_method_list |
||
46 | !if $u_ != supervisor |
||
47 | !readproc adm/class/userdef classes,$c_,$u_ |
||
48 | !set u__=!defof user_external_auth in $userdef |
||
49 | !endif |
||
50 | !endif |
||
51 | !href cmd=reply&type=auth$t_&class=$c_&auth_user=$u__ $n_ |
||
6044 | bpr | 52 | </td><td><span class="tt">$u__</span></td> |
5677 | obado | 53 | </tr> |
54 | :out |
||
55 | !reset c_ u_ t_ |
||
56 | !next cl |
||
57 | !next typ |
||
58 | </table> |
||
6044 | bpr | 59 | <hr/> |
5677 | obado | 60 | !if $wims_user=supervisor |
61 | $name_text3 |
||
62 | !endif |
||
63 | !else |
||
64 | !if $wims_user=supervisor |
||
65 | $name_text2 |
||
66 | !else |
||
67 | $name_noaccount |
||
68 | !endif |
||
69 | !endif |
||
70 |