Rev 14097 | Rev 15687 | 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 |
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" |
6235 | 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 |
||
54 | <input type="$input_type" name="reply$i" id="reply$i" value="$val" /> |
||
55 | !endif |
||
56 | !endif |
||
57 | </td> |
||
13627 | bpr | 58 | </tr> |
23 | reyssat | 59 | !else |
13627 | bpr | 60 | !set ta=!append item $i to $ta |
23 | reyssat | 61 | !endif |
62 | !next i |
||
14102 | obado | 63 | $table_end |
23 | reyssat | 64 | |
65 | !if $ta!=$empty |
||
13627 | bpr | 66 | !for i in $ta |
67 | <div class="field" id="textarea$i" style="text-align:center; padding:10px;"> |
||
14102 | obado | 68 | <label for="reply$i">$(title$i)</label> |
69 | !set val=!reinput $(val$i) |
||
8646 | bpr | 70 | |
14102 | obado | 71 | !if $(name$i) iswordof $model_asis |
72 | !! Check if param value is set as "asis()", so it will not be printed to users |
||
73 | !set debut=!char 1..4 of $val |
||
74 | !if $debut issametext asis |
||
75 | !set val=!char 6..-2 of $val |
||
76 | !endif |
||
8515 | obado | 77 | !endif |
14102 | obado | 78 | !!! leave the space in value, if not, it does not clean the textarea |
79 | <a class="wims_button smaller" href="#textarea$i" |
||
80 | !if $(name$i) iswordof $model_iEdit |
||
13740 | obado | 81 | onclick="event.preventDefault();document.getElementById('reply$i').value=' ';tinymce.get('reply$i').setContent(' ');" |
14102 | obado | 82 | !else |
13617 | obado | 83 | onclick="event.preventDefault();document.getElementById('reply$i').value=' '" |
14102 | obado | 84 | !endif |
85 | >$name_clean</a> |
||
86 | !if $(help$i)!=$empty |
||
87 | !set wims_ref_class=wims_button_help |
||
88 | !href target=wims_mhelp cmd=help&module=$module&special_parm=model,$i $wims_name_help |
||
13617 | obado | 89 | !endif |
14102 | obado | 90 | <br /> |
91 | <textarea name="reply$i" id="reply$i" cols="120" rows="10" class="wims_model_textarea |
||
92 | !if $(type$i) iswordof matrix |
||
11570 | bpr | 93 | nowrap |
14102 | obado | 94 | !endif |
95 | !if $(name$i) iswordof $model_iEdit |
||
13617 | obado | 96 | iEdit |
14102 | obado | 97 | !endif |
98 | ">$val</textarea> |
||
13627 | bpr | 99 | </div> |
100 | !next i |
||
23 | reyssat | 101 | !endif |
14102 | obado | 102 | |
5813 | bpr | 103 | <div class="wimscenter"> |
14097 | obado | 104 | <input type="submit" value="$wims_name_send" /> |
11572 | bpr | 105 | $ $ |
9753 | bpr | 106 | !set wims_ref_class=wims_button wims_secondary_button |
8515 | obado | 107 | !href cmd=reply&level=1 $wims_name_giveup |
5813 | bpr | 108 | </div> |
23 | reyssat | 109 | |
5927 | bpr | 110 | !formend |