Rev 16307 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16087 | guerimand | 1 | sdir=$wims_home/$wims_sesdir |
2 | cdir=$wims_home/log/classes/$wims_class |
||
3 | |||
16307 | guerimand | 4 | nbexo=!recordcnt wimshome/log/classes/$wims_class/freeworks/.Wfreework$freework |
16087 | guerimand | 5 | !bound exolog between 1 and $nbexo default $empty |
6 | !if $exolog=$empty |
||
7 | error=exolog-noexo |
||
8 | job=student |
||
9 | !changeto var.proc |
||
10 | !endif |
||
11 | |||
16307 | guerimand | 12 | |
16087 | guerimand | 13 | !! ------ no register if exercise already exists |
16307 | guerimand | 14 | test=!fileexists wimshome/log/classes/$wims_class/freeworksdata/$freework/work/$(wims_user)-wimsexo/$exolog |
16087 | guerimand | 15 | !if $test=yes |
16 | error=exolog-exoexists |
||
17 | job=student |
||
18 | !changeto var.proc |
||
19 | !endif |
||
20 | |||
21 | !! ------- check of good exercise parameters (peut-être un truc dans le c pour le faire à voir) |
||
16307 | guerimand | 22 | data=!record $exolog of wimshome/log/classes/$wims_class/freeworks/.Wfreework$freework |
16087 | guerimand | 23 | !distribute line $data into modu,para,bla,bla |
24 | para=wims_freework=$freework,$exolog&$para |
||
25 | exec=!defof w_module\ |
||
16513 | guerimand | 26 | w_module_init_parm\ |
27 | w_module_score in wimshome/$wims_sesdir/exolog |
||
28 | !distribute line $exec into modu2,para2,score |
||
29 | !if $score<$wims_fwminscore |
||
30 | error=exolog-badscore |
||
31 | job=student |
||
32 | !changeto var.proc |
||
33 | !endif |
||
16087 | guerimand | 34 | !if $modu2 notsametext $modu or $para2 notsametext $para |
35 | error=exolog-badparameter |
||
36 | job=student |
||
37 | !changeto var.proc |
||
38 | !endif |
||
39 | |||
16307 | guerimand | 40 | !sh mkdir -p $cdir/freeworksdata/$freework/work/$(wims_user)-wimsexo;\ |
41 | mv $sdir/exolog $cdir/freeworksdata/$freework/work/$(wims_user)-wimsexo/$exolog; |
||
16087 | guerimand | 42 | !! replace the name of images by rename by the true name when saving |
43 | rename_list =!record 0 of wimshome/$wims_sesdir/.rename |
||
44 | rename_list_cnt=!linecnt $rename_list |
||
45 | !for l=1 to $rename_list_cnt |
||
46 | rename_l=!line $l of $rename_list |
||
47 | rename_l=!replace internal : by , in $rename_l |
||
48 | rename_l=!replace internal ? by \? in $rename_l |
||
16307 | guerimand | 49 | !sh perl -np -i -e 's:$(rename_l[2]):$(rename_l[1]):g' $cdir/freeworksdata/$freework/work/$(wims_user)-wimsexo/$exolog |
16087 | guerimand | 50 | !next l |
51 | wims_fwlistexo=!listcomplement $exolog in $wims_fwlistexo |
||
52 | !setdef wims_fwlistexo=$wims_fwlistexo in wimshome/sessions/$wims_session/var.stat |
||
53 | job=student |
||
54 | !changeto var.proc |