Rev 16579 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16579 | guerimand | 1 | # GetModule use statistic |
2 | # Permet d'obtenir les infos d'utilisation concernant les modules pédagogiques sur une durée spécifiée par "option" (quatre choix : |
||
3 | - day un jour |
||
4 | - week une semaine |
||
5 | - month un mois |
||
6 | - year un an |
||
7 | |||
8 | |||
9 | !if $ident_type=$empty and $format != $empty |
||
10 | ident_type=$format |
||
11 | !endif |
||
12 | |||
13 | badchars=!text select ?*#~!@ in $option |
||
14 | !if .. isin $option or $badchars!=$empty |
||
15 | error=illegal file name |
||
16 | !exit |
||
17 | !endif |
||
18 | |||
19 | !bound option within day,week,month,year default year |
||
20 | |||
21 | test=!fileexists wimshome/log/account/00access.act |
||
22 | !if $test!=yes |
||
23 | error=nostat |
||
24 | !exit |
||
25 | !endif |
||
26 | |||
27 | end=!char 1 to 8 of $wims_now |
||
28 | |||
29 | !sh cd $wims_home/log/account/;\ |
||
30 | end=$end;\ |
||
31 | start=`date -d "1 $option ago" '+%Y%m%d'`;\ |
||
32 | ll=`ls [EHLUct]* | grep -v 'classes@' | sed 's/\...$$//g' | sort | uniq`;\ |
||
33 | export ll start end;\ |
||
17076 | guerimand | 34 | $wims_home/bin/modstat | awk '$$1>0{print $$0}' >$wims_home/sessions/$wims_session/modstat.mod |
16579 | guerimand | 35 | |
36 | fname=sessions/$wims_session/modstat.mod |
||
37 |