Rev 15057 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !bound format within zip,tgz,tar.gz default zip |
2 | |||
13318 | obado | 3 | !set max_upload_size=500 |
4 | |||
23 | reyssat | 5 | sel=!listintersect $selection and $reclist |
6 | !default sel=$reclist |
||
12502 | guerimand | 7 | !! deleted : don't need to uncheck score and forum by default |
8 | !! select=!listcomplement score,forum in $sel |
||
15057 | obado | 9 | |
10 | !! -- generate list of data (with dependancy) really in the backup (not just the selected) |
||
23 | reyssat | 11 | selw=!items2words $sel |
15057 | obado | 12 | !if $check_dependency!=no |
13 | dictionary=$module_dir/arch/recdep |
||
14 | dep=!exec translator $selw |
||
15 | !endif |
||
12502 | guerimand | 16 | select=$selw $dep |
17 | select=!words2items $select |
||
18 | select=!listuniq $select |
||
16013 | guerimand | 19 | |
12502 | guerimand | 20 | !! -- |
23 | reyssat | 21 | dictionary=$module_dir/arch/recdir |
22 | dirs=!exec translator $selw $dep |
||
23 | dirs=!words2items $dirs |
||
24 | dirs=!listuniq $dirs |
||
25 | dirs=!items2words $dirs |
||
16013 | guerimand | 26 | !if def isitemof $select |
27 | dirs=!append word .def to $dirs |
||
28 | !endif |
||
23 | reyssat | 29 | |
16013 | guerimand | 30 | |
2477 | bpr | 31 | dictionary=$module_dir/lang/recnames.$moduclass_lang |
23 | reyssat | 32 | tot=!replace , by , $ in $reclist |
33 | tot=!exec translator $tot |
||
34 | fname=!translate internal / to ~ in $wims_class |
||
3974 | guerimand | 35 | !if $class_typename=course |
12413 | bpr | 36 | tmpnum_class=!char 1 to -5 of $wims_class |
3974 | guerimand | 37 | !else |
12413 | bpr | 38 | tmpnum_class=$wims_class |
3974 | guerimand | 39 | !endif |
13318 | obado | 40 | |
23 | reyssat | 41 | fsize=!mexec arch/pack.sh |
13318 | obado | 42 | |
43 | !! file size creation is limited by wims.c (var rlimit_fsize) |
||
44 | !! ulimit -f return the system limit to file size creation |
||
45 | !set max_arch_size=!sh ulimit -f |
||
46 | !! ulimit is defined in blocks (1 block = 512B) |
||
47 | !! So, N blocks = N*512/1024 = N/2 Ko |
||
48 | !! nb: there seems to be a bug in MacOS X causing !exec commands reseting ulimit to "unlimited" |
||
49 | !! On Linux systems, it's working as expected. |
||
50 | !if $max_arch_size!=unlimited |
||
51 | max_arch_size=$[ceil($max_arch_size/2)] |
||
52 | !endif |
||
53 | |||
54 | !if $wims_exec_error!=$empty |
||
55 | !if File too large isin $wims_exec_error or Filesize limit exceeded isin $wims_exec_error |
||
56 | error=file_too_large |
||
57 | !endif |
||
58 | !else |
||
59 | wims_class_log=Backup created by $wims_realuser |
||
60 | !endif |
||
61 | |||
23 | reyssat | 62 | !if $fsize!=$empty |
12413 | bpr | 63 | fsize=$[ceil($fsize/1024)] |
64 | !setdef !set class_backup=$today in wimshome/log/classes/$wims_class/.def |
||
23 | reyssat | 65 | !endif |