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