Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16479 | guerimand | 1 | |
2 | !if $wims_class=$empty |
||
3 | error=noclass |
||
4 | !exit |
||
5 | !endif |
||
6 | |||
7 | !if $wims_user!=supervisor |
||
8 | error=notsupervisor |
||
9 | !exit |
||
10 | !else |
||
11 | !! ---- build list of user/teacher of the class with mail defined |
||
12 | !sh rm -f $wims_home/sessions/$wims_session/.userlist_mail $wims_home/sessions/$wims_session/.userlist_nomail $wims_home/sessions/$wims_session/.userteacher_nomail $wims_home/sessions/$wims_session/.teacherlist_mail; |
||
13 | !read adm/class/userdef ,$wims_class, |
||
14 | !distribute item 0,0,0,0 into nb_user,nb_teacher,nbw_user,nbw_teacher |
||
15 | !! ----- not same process because of different format for file .userlist and .teacherlist |
||
16 | !! ----- check of userlist |
||
17 | type=user |
||
18 | nbt_$type=!recordcnt wimshome/log/classes/$wims_class/.$(type)list |
||
19 | !reset list_log_$type |
||
20 | !for k=1 to $(nbt_$type) |
||
21 | data=!record $k of wimshome/log/classes/$wims_class/.$(type)list |
||
22 | login=!item 3 of $data |
||
23 | data=!defof user_firstname,user_lastname,user_email in $userfolder/$login |
||
24 | !distribute item $data into f,l,m |
||
25 | !if $m!=$empty |
||
26 | !appendfile wimshome/sessions/$wims_session/.$(type)list_mail :$l,$f,$login,$m |
||
27 | !increase nb_$type |
||
28 | !else |
||
29 | !appendfile wimshome/sessions/$wims_session/.$(type)list_nomail :$l,$f,$login |
||
30 | !increase nbw_$type |
||
31 | !endif |
||
32 | !next k |
||
33 | !! ---- check of teacherlist |
||
34 | type=teacher |
||
35 | globaldata=!record 0 of wimshome/log/classes/$wims_class/.$(type)list |
||
36 | nbt_$type=!linecnt $globaldata |
||
37 | !reset list_log_$type |
||
38 | !for k=1 to $(nbt_$type) |
||
39 | data=!line $k of $globaldata |
||
40 | login=!item 3 of $data |
||
41 | data=!defof user_firstname,user_lastname,user_email in $userfolder/$login |
||
42 | !distribute item $data into f,l,m |
||
43 | !if $m!=$empty |
||
44 | !appendfile wimshome/sessions/$wims_session/.$(type)list_mail :$l,$f,$login,$m |
||
45 | !increase nb_$type |
||
46 | !else |
||
47 | !appendfile wimshome/sessions/$wims_session/.$(type)list_nomail :$l,$f,$login |
||
48 | !increase nbw_$type |
||
49 | !endif |
||
50 | !next k |
||
51 | !endif |
||
52 | |||
53 | !read adm/class/classlang names.phtml |
||
54 | |||
55 | !if $wims_realuser!= and $wims_realuser!=supervisor |
||
56 | add=$wims_superclass/.users/$wims_realuser |
||
57 | !else |
||
58 | add=$wims_class/supervisor |
||
59 | !endif |
||
60 | |||
61 | tmp=!defof user_email,user_firstname,user_lastname in wimshome/log/classes/$add |
||
62 | supervisorname=$(tmp[2]) $(tmp[3]) |
||
63 | supervisormail=$(tmp[1]) |
||
64 | |||
65 | !if $supervisormail=$empty |
||
66 | error=nosupervisoremail |
||
67 | !endif |