Rev 14334 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9361 | guerimand | 1 | !! change participant registration in subclasses of groupement |
2 | !! this job is actually limited to groupement type when user=supervisor (at the groupement level) |
||
3 | |||
10462 | guerimand | 4 | !readproc adm/vfilter/listvarfilter.proc |
9361 | guerimand | 5 | usercnt=!recordcnt wimshome/log/classes/$wims_class/.userlist |
6 | |||
7 | !! generate list of subclasses |
||
8 | nbsubclasses=!recordcnt wimshome/log/classes/$wims_class/.subclasses |
||
9 | !reset ltsubclasses,ltnamesubclasses,ltsupsubclasses |
||
10 | !if $nbsubclasses>0 |
||
12466 | bpr | 11 | !for k=1 to $nbsubclasses |
14334 | bpr | 12 | tmp=!record $k of wimshome/log/classes/$wims_class/.subclasses |
13 | !distribute item $tmp into num,b,b,title,b,b,b,b,sup,b |
||
14 | ltsubclasses=!append item $num to $ltsubclasses |
||
15 | ltnamesubclasses=!append item $title to $ltnamesubclasses |
||
16 | ltsupsubclasses=!append item $sup to $ltsupsubclasses |
||
12466 | bpr | 17 | !next k |
9361 | guerimand | 18 | !endif |
19 | |||
20 | !if $action=$name_reguser or $action=$name_unreguser |
||
12466 | bpr | 21 | listlogin=$empty |
22 | !for k=1 to $usercnt |
||
14334 | bpr | 23 | tmp=!record $k of wimshome/log/classes/$wims_class/.userlist |
12466 | bpr | 24 | !if $varfilter_!=$empty |
25 | !read adm/vfilter/testfilter $(tmp[3])\ |
||
10464 | guerimand | 26 | $varfilter_ |
9361 | guerimand | 27 | !endif |
12466 | bpr | 28 | !if $(var_filter_test)=1 or $varfilter_=$empty |
14334 | bpr | 29 | listlogin=!append item $(tmp[3]) to $listlogin |
12466 | bpr | 30 | !endif |
31 | !next k |
||
32 | !if __ALL__ isin $listuser |
||
14334 | bpr | 33 | listuser=$listlogin |
12466 | bpr | 34 | !else |
14334 | bpr | 35 | listuser=!listintersect $listlogin and $listuser |
12466 | bpr | 36 | !endif |
37 | listsclassch=!listintersect $listsclassch and $ltsubclasses |
||
38 | !if $listsclassch!=$empty and $listuser!=$empty |
||
14334 | bpr | 39 | !if $action=$name_reguser |
40 | !for login in $listuser |
||
41 | tmp=!defof user_participate in wimshome/log/classes/$wims_class/.users/$login |
||
42 | tmp=!listunion $tmp and $listsclassch |
||
43 | !setdef !set user_participate=$tmp in wimshome/log/classes/$wims_class/.users/$login |
||
44 | !next login |
||
45 | !else |
||
46 | !for login in $listuser |
||
47 | tmp=!defof user_participate in wimshome/log/classes/$wims_class/.users/$login |
||
48 | tmp=!listcomplement $listsclassch in $tmp |
||
49 | !setdef !set user_participate=$tmp in wimshome/log/classes/$wims_class/.users/$login |
||
50 | !next login |
||
9361 | guerimand | 51 | !endif |
16197 | guerimand | 52 | !read adm/class/mkuserlist |
53 | !for cl in $listsclassch |
||
54 | !read adm/class/mkuserlist $cl |
||
55 | !next cl |
||
9361 | guerimand | 56 | !reset action,listuser,listuserchoice,listsclassch |
12466 | bpr | 57 | !endif |
9361 | guerimand | 58 | !endif |