Rev 16513 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16513 | Rev 16647 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | !if $exolog=$empty |
6 | !if $exolog=$empty |
7 | error=exolog-noexo |
7 | error=exolog-noexo |
8 | job=student |
8 | job=student |
9 | !changeto var.proc |
9 | !changeto var.proc |
10 | !endif |
10 | !endif |
- | 11 | !! --------- checking work is valid exolog and freework |
|
- | 12 | test=!defof w_wims_fwexo,w_wims_fwnumber in wimshome/sessions/$wims_session/var |
|
- | 13 | !distribute item $test into fwexo,fwnumber |
|
- | 14 | !if $fwexo!=$exolog or $fwnumber!=$freework |
|
- | 15 | error=exolog-badparameter |
|
- | 16 | job=student |
|
- | 17 | !changeto var.proc |
|
11 | 18 | !endif |
|
12 | 19 | ||
13 | !! ------ no register if exercise already exists |
20 | !! ------ no register if exercise already exists |
14 | test=!fileexists wimshome/log/classes/$wims_class/freeworksdata/$freework/work/$(wims_user)-wimsexo/$exolog |
21 | test=!fileexists wimshome/log/classes/$wims_class/freeworksdata/$freework/work/$(wims_user)-wimsexo/$exolog |
15 | !if $test=yes |
22 | !if $test=yes |
16 | error=exolog-exoexists |
23 | error=exolog-exoexists |
17 | job=student |
24 | job=student |
18 | !changeto var.proc |
25 | !changeto var.proc |
19 | !endif |
26 | !endif |
20 | 27 | ||
21 | !! --- |
28 | !! ------ testing if score is enough for exo to be registered |
22 | data=!record $exolog of wimshome/log/classes/$wims_class/freeworks/.Wfreework$freework |
- | |
23 | !distribute line $data into modu,para,bla,bla |
- | |
24 | para=wims_freework=$freework,$exolog&$para |
- | |
25 | exec=!defof w_module\ |
- | |
26 | w_module_init_parm\ |
- | |
27 | w_module_score in wimshome/$wims_sesdir/exolog |
29 | score=!defof w_module_score in wimshome/$wims_sesdir/exolog |
28 | !distribute line $exec into modu2,para2,score |
- | |
29 | !if $score<$wims_fwminscore |
30 | !if $score<$wims_fwminscore |
30 | error=exolog-badscore |
31 | error=exolog-badscore |
31 | job=student |
32 | job=student |
32 | !changeto var.proc |
33 | !changeto var.proc |
33 | !endif |
34 | !endif |
34 | !if $modu2 notsametext $modu or $para2 notsametext $para |
- | |
35 | error=exolog-badparameter |
- | |
36 | job=student |
- | |
37 | !changeto var.proc |
- | |
38 | !endif |
35 | |
39 | 36 | ||
40 | !sh mkdir -p $cdir/freeworksdata/$freework/work/$(wims_user)-wimsexo;\ |
37 | !sh mkdir -p $cdir/freeworksdata/$freework/work/$(wims_user)-wimsexo;\ |
41 | mv $sdir/exolog $cdir/freeworksdata/$freework/work/$(wims_user)-wimsexo/$exolog; |
38 | mv $sdir/exolog $cdir/freeworksdata/$freework/work/$(wims_user)-wimsexo/$exolog; |
42 | !! replace the name of images by rename by the true name when saving |
39 | !! replace the name of images by rename by the true name when saving |
43 | rename_list =!record 0 of wimshome/$wims_sesdir/.rename |
40 | rename_list =!record 0 of wimshome/$wims_sesdir/.rename |