Rev 16111 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
12320 | guerimand | 1 | !! process the data for userlist |
2 | |||
3 | !set typen=!defof class_typename in wimshome/log/classes/$wims_class/.def |
||
4 | !if $usercnt=0 |
||
12415 | bpr | 5 | !exit |
12320 | guerimand | 6 | !endif |
18583 | bpr | 7 | fileuserlist=wimshome/sessions/$wims_session/userlist_usermanage |
8 | Fileuserlist=$wims_home/sessions/$wims_session/userlist_usermanage |
||
12320 | guerimand | 9 | !readproc adm/class/mkcomment name |
10 | namecomment=$scriptout |
||
11 | |||
12 | !if $cmd!=resume |
||
12415 | bpr | 13 | !sh rm -f $Fileuserlist |
14 | !! build ligne for each participant |
||
15 | !for i=1 to $usercnt |
||
12320 | guerimand | 16 | !reset ldata |
17 | !set uu=!record $i of wimshome/log/classes/$wims_class/.userlist |
||
18 | !distribute items $uu into bl,bl,uu |
||
19 | !reset user_exists,user_email,user_regnum,user_external_auth,user_vars,user_comments$namecomment,user_comments |
||
20 | !readproc adm/class/userdef classes,$wims_class,$uu |
||
21 | !readdef $userdef |
||
22 | !readproc adm/vfilter/uservarfilter.proc $userdef |
||
23 | ldata=$name_studentloc |
||
24 | ldata=$ldata,$uu |
||
25 | !for k in email,regnum,external_auth |
||
12415 | bpr | 26 | ldata=$ldata,$(user_$(k)) |
12320 | guerimand | 27 | !next k |
16044 | guerimand | 28 | lt=!defof user_lastconnect in wimshome/log/classes/$wims_class/.users/$uu |
29 | !if $lt!=$empty |
||
30 | !read date.phtml $lt,noprint |
||
16111 | guerimand | 31 | ldata=$ldata,$slib_out,$lt |
16044 | guerimand | 32 | !else |
16111 | guerimand | 33 | ldata=$ldata,, |
16044 | guerimand | 34 | !endif |
12320 | guerimand | 35 | !if $nbtechvar>0 |
12415 | bpr | 36 | val=!column 2 of $user_vars |
37 | ldata=$ldata,$val |
||
12466 | bpr | 38 | !! seems not to be useful : user_vars has exactly nbtechvar lines |
39 | !! tmp=!linecnt $user_vars |
||
40 | !! !for v = 1 to $[$nbtechvar-$tmp] |
||
41 | !! ldata=$ldata, |
||
42 | !! !next v |
||
12320 | guerimand | 43 | !endif |
44 | !readproc adm/class/mkcomment val |
||
45 | tmp=!replace internal , by , in $scriptout |
||
46 | ldata=$ldata,$tmp |
||
47 | !appendfile $fileuserlist :$ldata |
||
12415 | bpr | 48 | !next i |
12320 | guerimand | 49 | !endif |
50 | |||
51 | tmp=!record 1 of $fileuserlist |
||
52 | lastri=!itemcnt $tmp |
||
53 | |||
54 | !if $tri!=$empty |
||
12415 | bpr | 55 | type=!char 1 of $tri |
56 | !if $type=U |
||
57 | type=$empty |
||
58 | !else |
||
59 | type=r |
||
60 | !endif |
||
61 | num=!char 2 to -1 of $tri |
||
62 | !bound num between 1 and $lastri default $empty |
||
63 | !if $num!=$empty |
||
64 | !sh cat $Fileuserlist | sort -t, -k$num$type,$num > $(Fileuserlist)2;\ |
||
12320 | guerimand | 65 | mv $(Fileuserlist)2 $Fileuserlist |
12415 | bpr | 66 | !endif |
67 | !reset tri |
||
12320 | guerimand | 68 | !endif |