Rev 4996 | Rev 5030 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4996 | czzmrn | 1 | ##create teacherlist and .teacherlist_external at all levels |
4692 | bpr | 2 | ## le paramètre est la classe |
3 | |||
4 | uclass=$wims_read_parm |
||
5 | superclass=!defof class_superclass in wimshome/log/classes/$uclass/.def |
||
20 | reyssat | 6 | !default superclass=$wims_superclass |
4692 | bpr | 7 | !default uclass=$wims_superclass |
5028 | bpr | 8 | !!! je ne comprends pas : l'indexation ne se fait pas sinon lorsqu'un enseignant s'inscrit |
9 | !default superclass=$uclass |
||
10 | !default wims_superclass=$class |
||
11 | !!! |
||
20 | reyssat | 12 | !if $superclass=$empty |
13 | !exit |
||
14 | !endif |
||
15 | !if $wims_superclass!=$empty and $superclass!=$wims_superclass and $wims_ismanager<2 |
||
16 | !exit |
||
17 | !endif |
||
18 | |||
19 | basedir=wimshome/log/classes/$superclass |
||
20 | basedir2=$wims_home/log/classes/$superclass |
||
4692 | bpr | 21 | basedirr=wimshome/log/classes/$uclass |
22 | basedirr2=$wims_home/log/classes/$uclass |
||
20 | reyssat | 23 | tlist=!sh cd $basedir2/.users\ |
24 | grep -l user_supervisable=yes * |
||
25 | tlist=!words2items $tlist |
||
26 | |||
4692 | bpr | 27 | !writefile $basedirr/.teacherlist.1 |
4996 | czzmrn | 28 | !writefile $basedirr/.teacherlist_external.1 |
20 | reyssat | 29 | !for t in $tlist |
4692 | bpr | 30 | US_=!defof user_supervise in $basedir/.users/$t |
31 | !if $superclass=$uclass or $uclass isitemof $US_ |
||
32 | U_=!defof user_lastname,user_firstname in $basedir/.users/$t |
||
33 | !appendfile $basedirr/.teacherlist.1 $U_,$t |
||
34 | !endif |
||
4996 | czzmrn | 35 | EXT_=!defof user_external_auth in $basedir/.users/$t |
36 | !if $EXT_!=$empty |
||
37 | !appendfile $basedirr/.teacherlist_external.1 $EXT_,$t |
||
38 | !endif |
||
20 | reyssat | 39 | !next t |
40 | |||
4692 | bpr | 41 | !sh sort -f $basedirr2/.teacherlist.1 | grep . >$basedirr2/.teacherlist\ |
42 | rm -f $basedirr2/.teacherlist.1 >/dev/null |
||
20 | reyssat | 43 | |
4996 | czzmrn | 44 | !sh sort -f $basedirr2/.teacherlist_external.1 | grep . >$basedirr2/.teacherlist_external\ |
45 | rm -f $basedirr2/.teacherlist_external.1 >/dev/null |
||
46 |