Rev 13567 | Rev 16466 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5205 | guerimand | 1 | !! add help to a series of exercise of a sheet |
2 | !! |
||
3 | |||
4 | !default step=0 |
||
5 | !default picksheet=1 |
||
6 | !bound note between 0 and 10 default 10 |
||
14646 | bpr | 7 | !bound note2 between 0 and $[max($note-1,0)] default 0 |
5205 | guerimand | 8 | |
9 | sheets= |
||
10 | !for i=1 to $sheettot |
||
12489 | bpr | 11 | sh=!record $i of wimshome/log/classes/$wims_class/sheets/.sheets |
12 | !distribute lines $sh into a_,t_,title |
||
13 | nb=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$i |
||
14 | sheets=!append line $i,$nb,$title to $sheets |
||
5205 | guerimand | 15 | !next i |
16 | sheetcnt=!linecnt $sheets |
||
5215 | guerimand | 17 | lnumsheet=!column 1 of $sheets |
5205 | guerimand | 18 | |
19 | !if $step=0 |
||
12489 | bpr | 20 | !ifval $sheetcnt=0 |
21 | error=no_sheet |
||
22 | !exit |
||
23 | !endif |
||
24 | !bound picksheet within $lnumsheet default $(lnumsheet[1]) |
||
5205 | guerimand | 25 | !exit |
26 | !endif |
||
27 | |||
28 | !if $step=1 |
||
12489 | bpr | 29 | !bound picksheet within $lnumsheet default 0 |
13567 | bpr | 30 | !set nbexo=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$picksheet |
31 | !bound exo between 1 and $nbexo default 0 |
||
12489 | bpr | 32 | !ifval $exo*$picksheet=0 |
33 | error=bad_exo |
||
34 | !exit |
||
35 | !endif |
||
36 | update_field=9 |
||
37 | t=cmd=new |
||
38 | !if $t notin $iniparm |
||
14646 | bpr | 39 | update_content=module=$dir&$iniparm&cmd=new,$note,$note2 |
12489 | bpr | 40 | !else |
14646 | bpr | 41 | update_content=module=$dir&$iniparm,$note,$note2 |
12489 | bpr | 42 | !endif |
14646 | bpr | 43 | !if $feedinsert=1 |
44 | old_content=!record $exo of wimshome/log/classes/$wims_class/sheets/.sheet$picksheet |
||
45 | old_content=!line 9 of $old_content |
||
46 | !if $old_content!=$empty |
||
47 | update_content=$old_content;$update_content |
||
48 | !endif |
||
49 | !endif |
||
12489 | bpr | 50 | sheet=$picksheet |
51 | !read adm/class/update.exo |
||
12595 | bpr | 52 | !if $dir!=adm/tool/glossary |
53 | title=!module title $dir |
||
54 | desc=!module description $dir |
||
55 | !else |
||
56 | !set gl=!getopt gl in $iniparm |
||
57 | title=!record $gl of wimshome/log/classes/$wims_class/tool/.glossaryindex |
||
58 | title=!line 2 of $title |
||
59 | !endif |
||
5205 | guerimand | 60 | !endif |