Rev 3934 | Rev 5205 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3934 | Rev 5199 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | tmp=!replace internal & by $t in $iniparm |
6 | tmp=!replace internal & by $t in $iniparm |
7 | tmp2=!getopt scoredelay in $tmp |
7 | tmp2=!getopt scoredelay in $tmp |
8 | tmp3=!replace internal + by , in $tmp2 |
8 | tmp3=!replace internal + by , in $tmp2 |
9 | iniparm=!replace internal scoredelay=$tmp2 by scoredelay=$tmp3 in $iniparm |
9 | iniparm=!replace internal scoredelay=$tmp2 by scoredelay=$tmp3 in $iniparm |
10 | 10 | ||
11 | max_exo=64 |
- | |
12 | title_limit=50 |
- | |
13 | desc_limit=255 |
- | |
14 | sheettot=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
11 | sheettot=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
15 | wims_helper=chapter=3 |
12 | wims_helper=chapter=3 |
16 | wims_prefix=none |
13 | wims_prefix=none |
17 | 14 | ||
18 | !if $scoring=yes |
- | |
19 | !default require=10 |
- | |
20 | !default weight=1 |
- | |
21 | !else |
- | |
22 | require=0 |
- | |
23 | weight=0 |
- | |
24 | !endif |
- | |
25 | - | ||
26 | sup=$wims_user |
- | |
27 | class=$wims_class |
15 | class=$wims_class |
28 | !if |
16 | !if $wims_user!=supervisor |
29 | error=not_supervisor |
17 | error=not_supervisor |
30 | !exit |
18 | !exit |
31 | !endif |
19 | !endif |
32 | 20 | ||
33 |
|
21 | !bound job within exo,help default exo |
34 | sheets= |
- | |
35 |
|
22 | !changeto $job.proc |
36 | sh=!record $i of wimshome/log/classes/$wims_class/sheets/.sheets |
- | |
37 | !distribute lines $sh into a_,t_,title |
- | |
38 | !if $a_<1 |
- | |
39 | sheets=!append line $i,$title to $sheets |
- | |
40 | !endif |
- | |
41 | !next i |
- | |
42 | sheetcnt=!linecnt $sheets |
- | |
43 | !ifval $sheetcnt=0 |
- | |
44 | error=no_sheet |
- | |
45 | !exit |
- | |
46 | !endif |
- | |
47 | title=!module title $dir |
- | |
48 | desc=!module description $dir |
- | |
49 | !exit |
- | |
50 | !endif |
- | |
51 | 23 | ||
52 | !if $cmd=reply |
- | |
53 | !if ../adm/ isin ../$dir or $dir=home or \ |
- | |
54 | (../devel/ isin ../$dir and $wims_devel_modules notwordof open) |
- | |
55 | error=insert_fail |
- | |
56 | !exit |
- | |
57 | !endif |
- | |
58 | !if $picksheet=$empty |
- | |
59 | error=no_pick |
- | |
60 | !exit |
- | |
61 | !endif |
- | |
62 | picksheet=$[floor($picksheet)] |
- | |
63 | !if $picksheet=NaN or $picksheet<1 or $picksheet>min(64,$sheettot) |
- | |
64 | error=bad_sheet |
- | |
65 | !exit |
- | |
66 | !endif |
- | |
67 | sh=!record $picksheet of wimshome/log/classes/$wims_class/sheets/.sheets |
- | |
68 | a=!line 1 of $sh |
- | |
69 | !if $a>0 |
- | |
70 | error=bad_sheet |
- | |
71 | !exit |
- | |
72 | !endif |
- | |
73 | exocnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$picksheet |
- | |
74 | !if $exocnt>=$max_exo |
- | |
75 | error=too_many_exos |
- | |
76 | !exit |
- | |
77 | !endif |
- | |
78 | idesc=!singlespace $new_desc |
- | |
79 | idesc=!char 1 to $desc_limit of $idesc |
- | |
80 | ititle=!singlespace $title |
- | |
81 | ititle=!char 1 to $title_limit of $ititle |
- | |
82 | !if $scoring=yes |
- | |
83 | require=$[$require] |
- | |
84 | weight=$[$weight] |
- | |
85 | !if NaN isin $require |
- | |
86 | require=0 |
- | |
87 | !endif |
- | |
88 | !if NaN isin $weight |
- | |
89 | weight=0 |
- | |
90 | !endif |
- | |
91 | !bound require between 0,1000 default 0 |
- | |
92 | !bound weight between 0,10 default 0 |
- | |
93 | !endif |
- | |
94 | !for i=1 to $exocnt |
- | |
95 | e=!record $i of wimshome/log/classes/$wims_class/sheets/.sheet$picksheet |
- | |
96 | !distribute lines $e into wdi,win |
- | |
97 | !if $dir=$wdi and $iniparm=$win |
- | |
98 | test=$picksheet |
- | |
99 | error=already_exist |
- | |
100 | !exit |
- | |
101 | !endif |
- | |
102 | !next i |
- | |
103 | !appendfile wimshome/log/classes/$wims_class/sheets/.sheet$picksheet :$dir\ |
- | |
104 | $iniparm\ |
- | |
105 | $require\ |
- | |
106 | $weight\ |
- | |
107 | $ititle\ |
- | |
108 | $idesc |
- | |
109 | - | ||
110 | exocnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$picksheet |
- | |
111 | wims_module_log=class $class: add No$exocnt to worksheet $picksheet |
- | |
112 | !endif |
- | |
113 | 24 |