Rev 13740 | Rev 14102 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
13446 | obado | 1 | !! Model2 is used when editing an exercice in "adaptative mode" |
2 | |||
2391 | bpr | 3 | !set name_title=$wims_name_title |
6235 | bpr | 4 | !set name_author=$wims_name_Author (<span class="tt">$wims_name_firstname, $wims_name_lastname</span>) |
2391 | bpr | 5 | !set name_email=$wims_name_email |
5724 | bpr | 6 | !set name_credits=$wims_name_credits |
5824 | bpr | 7 | !set name_css=CSS |
23 | reyssat | 8 | |
5724 | bpr | 9 | !form reply name="replyform" id="replyform" |
6235 | bpr | 10 | <input type="hidden" name="level" value="3" /> |
13446 | obado | 11 | <div class="model_desc">$desc</div> |
6140 | bpr | 12 | !reset table_center |
23 | reyssat | 13 | $table_header |
4812 | bpr | 14 | <caption>$model_title |
13617 | obado | 15 | !set wims_ref_class=wims_button_help |
16 | !href target=wims_mhelp cmd=help&special_parm=model,1 $wims_name_help |
||
23 | reyssat | 17 | </caption> |
18 | |||
13629 | bpr | 19 | !set ta= |
23 | reyssat | 20 | !for i in $sps,$parms |
13627 | bpr | 21 | !reset reply$i |
22 | !if $(type$i)!=matrix and $(name$i) notwordof $model_textarea |
||
23 | !set val=!replace internal " by " in $(val$i) |
||
24 | !if $i isitemof $sps |
||
25 | !set title$i=$(name_$(name$i)) |
||
26 | !endif |
||
27 | !if $(type$i) iswordof integer int real and $i notitemof $sps and \ |
||
28 | $(name$i) notwordof $model_random $model_computed |
||
13692 | obado | 29 | !set input_type=number |
13627 | bpr | 30 | !else |
13692 | obado | 31 | !set input_type=text |
13627 | bpr | 32 | !endif |
33 | $table_tr |
||
34 | <td> |
||
35 | <label for="reply$i">$(title$i)</label> |
||
8515 | obado | 36 | !if $(help$i)!=$empty or $(name$i) iswordof $model_helped |
37 | !set wims_ref_class=wims_button_help |
||
38 | !href target=wims_mhelp cmd=help&module=$module&special_parm=model,$i $wims_name_help |
||
39 | !endif |
||
13692 | obado | 40 | </td><td class="field halfwidth"> |
13627 | bpr | 41 | !if $(menu$i)!=$empty |
42 | !set t_=!itemcnt $(menu$i) |
||
43 | !set t_=!makelist x for x=1 to $t_ |
||
44 | !set reply$i=$val |
||
45 | !formselect reply$i list $t_ prompt $(menu$i) |
||
46 | !else |
||
47 | !set l_=!charcnt $val |
||
48 | !if $l_ > 50 |
||
49 | !set val=!reinput $val |
||
13692 | obado | 50 | <textarea name="reply$i" id="reply$i" rows="3">$val</textarea> |
13627 | bpr | 51 | !else |
13692 | obado | 52 | <input type="$input_type" name="reply$i" id="reply$i" value="$val" /> |
13627 | bpr | 53 | !endif |
54 | !endif |
||
55 | </td> |
||
56 | </tr> |
||
23 | reyssat | 57 | !else |
13627 | bpr | 58 | !set ta=!append item $i to $ta |
23 | reyssat | 59 | !endif |
60 | !next i |
||
61 | |||
4043 | bpr | 62 | $table_end |
23 | reyssat | 63 | !if $ta!=$empty |
13627 | bpr | 64 | !for i in $ta |
65 | <div class="field" id="textarea$i" style="text-align:center; padding:10px;"> |
||
66 | <label for="reply$i">$(title$i)</label> |
||
8515 | obado | 67 | !set val=!reinput $(val$i) |
8646 | bpr | 68 | |
8515 | obado | 69 | !if $(name$i) iswordof $model_asis |
70 | !! Check if param value is set as "asis()", so it will not be printed to users |
||
71 | !set debut=!char 1..4 of $val |
||
72 | !if $debut issametext asis |
||
73 | !set val=!char 6..-2 of $val |
||
74 | !endif |
||
75 | !endif |
||
13627 | bpr | 76 | !!! leave the space in value, if not, it does not clean the textarea |
13617 | obado | 77 | <a class="wims_button smaller" href="#textarea$i" |
78 | !if $(name$i) iswordof $model_iEdit |
||
13740 | obado | 79 | onclick="event.preventDefault();document.getElementById('reply$i').value=' ';tinymce.get('reply$i').setContent(' ');" |
13617 | obado | 80 | !else |
81 | onclick="event.preventDefault();document.getElementById('reply$i').value=' '" |
||
82 | !endif |
||
83 | >$name_clean</a> |
||
8515 | obado | 84 | !if $(help$i)!=$empty |
85 | !set wims_ref_class=wims_button_help |
||
86 | !href target=wims_mhelp cmd=help&module=$module&special_parm=model,$i $wims_name_help |
||
87 | !endif |
||
88 | <br /> |
||
8646 | bpr | 89 | <textarea name="reply$i" id="reply$i" cols="120" rows="10" class="wims_model_textarea |
13627 | bpr | 90 | !if $(type$i) iswordof matrix |
11570 | bpr | 91 | nowrap |
13627 | bpr | 92 | !endif |
93 | !if $(name$i) iswordof $model_iEdit |
||
13617 | obado | 94 | iEdit |
13627 | bpr | 95 | !endif |
8646 | bpr | 96 | ">$val</textarea> |
13627 | bpr | 97 | </div> |
98 | !next i |
||
23 | reyssat | 99 | !endif |
5813 | bpr | 100 | <div class="wimscenter"> |
14097 | obado | 101 | <input type="submit" value="$wims_name_send" /> |
11572 | bpr | 102 | $ $ |
9753 | bpr | 103 | !set wims_ref_class=wims_button wims_secondary_button |
8515 | obado | 104 | !href cmd=reply&level=1 $wims_name_giveup |
5813 | bpr | 105 | </div> |
23 | reyssat | 106 | |
5927 | bpr | 107 | !formend |