Rev 12523 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
7419 | schaersvoo | 1 | !! 10 types of input are possible with this page , single or in any combination |
5944 | schaersvoo | 2 | !! 1) mathview inputapplet via id="MathView" ; |
3 | !! 2) inputfields via id="myinput0" ... id="myselect100" |
||
4 | !! 3) selectboxes via id="myselect0" ... id="myselect100" |
||
5 | !! 4) mathml inputfields via id="mathml0" ... id="mathml100" |
||
7419 | schaersvoo | 6 | !! 5) canvas answer inputfields/textarea [ read_canvas();] |
7 | !! 6) canvas userdrawing |
||
8 | !! 7) canvas drag and drop |
||
9 | !! 8) canvas onclick |
||
10 | !! 9) FlyApplet drawing via ReadDrawing() : coordinates/points/lines x1:y1,x2:y2,x3:y3....x_n:y_n (wordmax (=20) is adjustable upperlimit ; wordmin (=1) is adjustable underlimit) from FlyApplet0...FlyApplet100 |
||
11 | !! 10) InvulGrid applet via ReadApplet(0,1,2,3) ; carefull applet produces large strings (html/latex) |
||
6079 | schaersvoo | 12 | |
5227 | schaersvoo | 13 | !if $my_arrows=$empty |
14 | !set my_arrows=2 |
||
15 | !endif |
||
6079 | schaersvoo | 16 | !if $convert_root=$empty |
17 | !set convert_root=0 |
||
18 | !endif |
||
6109 | schaersvoo | 19 | !if $use_ineq != 1 |
20 | !set use_ineq=0 |
||
21 | !endif |
||
12523 | schaersvoo | 22 | <script> |
5857 | schaersvoo | 23 | //<![CDATA[ |
5973 | schaersvoo | 24 | <!-- no validator --> |
8257 | schaersvoo | 25 | "use strict"; |
26 | <!-- will return all 'userdraw' or 'userinput' data from all canvas javascript includes --> |
||
9717 | schaersvoo | 27 | function read_canvas(){if( typeof popup !== 'undefined'){var fun = popup['read_canvas'+canvas_scripts[0]];if(typeof fun === 'function' ){ var result = fun();if( result && result.length != 0){return result;};}else{return null;};}else{var script_len = canvas_scripts.length;var draw_reply = "";var found_result = false;for(var p = 0 ; p < script_len ; p++){var fun = eval("read_canvas"+canvas_scripts[p]);if( typeof fun === 'function'){var result = fun();if( result && result.length != 0){if(script_len == 1 ){ return result;};found_result = true;draw_reply = draw_reply + "["+p+"]="+ result + "\n";};};};if( found_result ){return draw_reply;}else{return null;};};}; |
8257 | schaersvoo | 28 | <!-- will return all 'drag&drop' or 'onclick' data from all canvas javascript includes --> |
9331 | schaersvoo | 29 | function read_dragdrop(){if( typeof popup !== 'undefined'){var fun = popup['read_dragdrop'+canvas_scripts[0]];var result = fun();if( result && result.length != 0){return result;}else{return null;};}else{var script_len = canvas_scripts.length;var dragdrop_reply = "";var found_result = false;for(var p = 0 ; p < script_len ; p++){var fun = eval("read_dragdrop"+canvas_scripts[p]);if(typeof fun === 'function'){var result = fun();if( result && result.length != 0 ){if(script_len == 1 ){ return result;};found_result = true;dragdrop_reply = dragdrop_reply + "["+p+"]="+result +"\n";};};};if( found_result ){return dragdrop_reply;}else{return null;};};}; |
6041 | schaersvoo | 30 | !if $inputs <0 |
31 | !if $goback=1 |
||
6195 | schaersvoo | 32 | !set r=!nospace $(reply$n) |
8257 | schaersvoo | 33 | function refill(){var hi="$r";if(hi.length !=0 ){hi = hi.split(',');for( var i=0; i<hi.length; i++){try{document.getElementById("myinput"+i).value = hi[i];}catch(e){}};};} |
6041 | schaersvoo | 34 | !endif |
35 | !endif |
||
8257 | schaersvoo | 36 | <!-- do not use "' in description --> |
37 | var descr_list="$description";var descr_cnt = 30;var description = make_description(descr_list,descr_cnt);function dontknow(){myConfirm('$dontknow','?','$wims_ref_name','$session','$module','$counter','$nok_send_color');} |
||
38 | function sendanswer(){ |
||
39 | var input;var show="<ul>";var inputfieldnumber = 0;var reply = new Array();var tmp_show; |
||
7419 | schaersvoo | 40 | <!-- MathView java input applet --> |
41 | if(document.getElementById("MathView")){input=document.getElementById("MathView").getLinear();input = input+'';if( input.length == 0){setAlarm(r1+"\ 1");return;};if( input.length > 100){setAlarm(r2); return;};if(input.indexOf('error')!=-1){setAlarm(input);return;};if(input.indexOf(',') != -1){setAlarm(r4);return;};if(check_f(input) == 0){return;}if(check_o(input) == 0){return;};if(check_log_NaN(input) == 0){return;}if(check_sqrt_NaN(input) == 0){return;};input = science(input);if(input == "error"){return;};if(check_x(input) == 0){return;};show = input;if( show.indexOf('>') != 0 || show.indexOf('>') ){show=show.replace(/\>=/g,'≥');show=show.replace(/\<=/g,'≤');show=show.replace(/\>/g,'>');show=show.replace(/\</g,'<');}; |
||
8257 | schaersvoo | 42 | !if $convert_root=0 |
7419 | schaersvoo | 43 | input = arrows(input,$my_arrows,"","");if(input == "error"){return;};input = nthroot(input);if(input ==" error"){return;};if(input.indexOf("[") !=- 1){if(input.indexOf("sqrt[")!=-1){input=specialroot(input);if(input=="error"){return;};};if(input.indexOf("log[")!=-1){input=speciallog(input);if(input=="error"){return;};};if( input.indexOf("[") !=-1){setAlarm(r13);return;};}; |
8257 | schaersvoo | 44 | !endif |
7419 | schaersvoo | 45 | input = input.replace(/#/g,' ');reply[inputfieldnumber] = input;inputfieldnumber = 1; |
46 | }; |
||
47 | <!-- InvulGrid ruitjespapier applet --> |
||
48 | if(document.getElementById("InvulGrid0") ){var p = 0;var tmp_reply="";var tmp_htmlreply="";var tmp_latexreply="";var latexreply="";var invulgrid; |
||
49 | !if $decimals=1 |
||
50 | var decimals=1; |
||
51 | !else |
||
52 | var decimals=0; |
||
53 | !endif |
||
54 | while( document.getElementById('InvulGrid'+p )){invulgrid = document.getElementById('InvulGrid'+p);tmp_reply = invulgrid.ReadApplet('0');tmp_htmlreply = invulgrid.ReadApplet('2');tmp_latexreply = invulgrid.ReadApplet('3');if(tmp_reply.indexOf('error')!= -1){setAlarm(r26+"<br />(java applet no."+parseInt(p+1)+")");return;};if(tmp_reply.indexOf("?") != -1){dontknow();return;};if(decimals == 0){tmp_reply = tmp_reply.replace(/\./g,'');};reply[inputfieldnumber] = tmp_reply+"\n"+tmp_htmlreply+"\n"+tmp_latexreply;show = show + "<br />"+tmp_htmlreply;inputfieldnumber++;p++;if(p>10){setAlarm(r2);dontknow();};}; |
||
55 | }; |
||
56 | <!-- FlyApplet id="FlyApplet0" is not interfering with non-readable FlyApplet based illustrations (id="FlyApplet") --> |
||
57 | if(document.getElementById("FlyApplet0") ){var p=0;while( document.getElementById("FlyApplet"+p) ){try{input = document.getElementById('FlyApplet'+p).ReadDrawing();}catch(e){setAlarm(r1+" $counter");return;};if(input.indexOf("error")!=-1){setAlarm(r1+" $counter");return;};var tmp = input.split(',');if( tmp.length > $wordmax ){setAlarm(r6);return;};if( tmp.length < $wordmin ){setAlarm(r26);return;};for(var r = 0;r < tmp.length;r = r + 2){show = show + "<li>"+description[inputfieldnumber] + " : " + "( " + tmp[r] + " : " + tmp[r+1]+" )</li>";reply[inputfieldnumber] = tmp[r]+":"+tmp[r+1];inputfieldnumber++;};p++;if(p>10){setAlarm(r2);dontknow();};};}; |
||
58 | <!-- normal html input / textarea fields --> |
||
59 | if(document.getElementById("myinput0")){var p=0;while(document.getElementById("myinput"+p)){input = document.getElementById("myinput"+p).value;if(input.length == 0){setAlarm(r1+"\ "+parseInt(p+1));return;};input = nthroot(input);if(input == "error"){return;};if(input.indexOf(',') != -1){setAlarm(r4);return;} |
||
60 | !if $use_ineq!=1 |
||
61 | <!-- all arrows will be converted to "->" or only last answer will be stored --> |
||
62 | input = arrows(input,$my_arrows,"","");if(input == "error"){return;} |
||
63 | !endif |
||
64 | if(check_f(input) == 0){return;};if(check_o(input) == 0){return;};if(check_log_NaN(input) == 0){return;};if(check_sqrt_NaN(input)==0){return;};input = science(input);if(input == "error"){return;};if(check_x(input) == 0){return;};tmp_show = input;if( input.indexOf("[") !=- 1 ){if(input.indexOf("sqrt[")!=-1){input=specialroot(input);if(input=="error"){return;};};if(input.indexOf("log[")!=-1){input=speciallog(input);if(input=="error"){return;};};if(input.indexOf("[") != -1){setAlarm(r13);return;};};input=input.replace(/#/g,' ');reply[inputfieldnumber] = input;if( tmp_show.indexOf('<') != -1 || tmp_show.indexOf('>') != -1 ){if( input.indexOf('=>') != -1){setAlarm("<span style=\'color:red;size:300%\'>x => 2</span><br /><span style=\'color:green;size:300%\'>x >= 2 [x ≥ 2]</span>");return;};if( input.indexOf('=<') != -1){setAlarm("<span style=\'color:red;size:300%\'>x =< 2</span><br /><span style=\'color:green;size:300%\'>x <= 2 [x ≤ 2]</span>");return;};tmp_show=tmp_show.replace(/\>=/g,'≥');tmp_show=tmp_show.replace(/\<=/g,'≤');tmp_show=tmp_show.replace(/\>/g,'>');tmp_show=tmp_show.replace(/\</g,'<');};show = show + "<li>"+description[inputfieldnumber] + " : " + tmp_show + "</li>";inputfieldnumber++;p++;if(p>100){setAlarm(r2);dontknow();};}; |
||
65 | }; |
||
66 | <!-- select boxes inputs --> |
||
67 | if( document.getElementById("myselect0") ){var p = 0;var options;var option_value;var option_text;while(document.getElementById("myselect"+p)){options = document.getElementById("myselect"+p).options;try{ option_value = options[options.selectedIndex].value;option_text = options[options.selectedIndex].text;}catch(e){setAlarm(r1+parseInt(p+1));return;};show = show + "<li>" + option_text + "</li>";reply[inputfieldnumber] = option_value;inputfieldnumber++;p++;if(p>100){setAlarm(r2);dontknow();};};}; |
||
68 | <!-- MathML inputfield --> |
||
69 | if(document.getElementById("mathml0")){var p = 0;while(document.getElementById("mathml"+p)){input = document.getElementById('mathml'+p).value;if (input.length == 0){setAlarm(r1+" "+parseInt(p+1));return;};input = nthroot(input);if(input == "error"){return;};if(input.indexOf(',') != -1){setAlarm(r4);return;} |
||
70 | !if $use_ineq != 1 |
||
71 | input = arrows(input,$my_arrows,"","");if(input == "error"){return;}; |
||
72 | !endif |
||
73 | if(check_f(input) == 0){return;}if(check_o(input) == 0){return;};if(check_log_NaN(input) == 0){return;}if(check_sqrt_NaN(input) == 0){return;};input=science(input);if(input == "error"){return;};if(check_x(input) == 0){return;};tmp_show = input;if( input.indexOf("[") !=- 1 ){;if(input.indexOf("sqrt[") != -1){input = specialroot(input);if(input == "error"){return;};};if(input.indexOf("log[") != -1){input = speciallog(input);if(input == "error"){return;};};if(input.indexOf("[") != -1){setAlarm(r13);return;};};input = input.replace(/#/g,' ');if(p>99){break;};reply[inputfieldnumber] = input;if( tmp_show.indexOf('<') != -1 || tmp_show.indexOf('>') != -1 ){if( input.indexOf('=>') != -1){setAlarm("<span style=\'color:red;size:300%\'>x => 2</span><br /><span style=\'color:green;size:300%\'>x >= 2 [x ≥ 2]</span>");return;};if( input.indexOf('=<') != -1){setAlarm("<span style=\'color:red;size:300%\'>x =< 2</span><br /><span style=\'color:green;size:300%\'>x <= 2 [x ≤ 2]</span>");return;};tmp_show=tmp_show.replace(/\>=/g,'≥');tmp_show=tmp_show.replace(/\<=/g,'≤');tmp_show=tmp_show.replace(/\>/g,'>');tmp_show=tmp_show.replace(/\</g,'<');};show = show + "<li>"+description[inputfieldnumber] + " : " + tmp_show + "</li>";inputfieldnumber++;p++;if(p>100){setAlarm(r2);dontknow();};}; |
||
74 | }; |
||
8257 | schaersvoo | 75 | if( typeof canvas_scripts !== 'undefined' ){ |
76 | <!-- CanvasDraw : try read_canvas() from canvasdraw ; read_mathml() is already covered --> |
||
77 | var canvas_reply = read_canvas(); |
||
78 | if(canvas_reply != null ){ |
||
79 | show = show + "<li>" + description[inputfieldnumber] + " : " + canvas_reply + "</li>"; |
||
80 | reply[inputfieldnumber] = canvas_reply; |
||
81 | inputfieldnumber++; |
||
82 | } |
||
83 | <!-- CanvasDraw : try read_dragdrop() from canvasdraw ; read_mathml() is already covered --> |
||
84 | var dragdrop_reply = read_dragdrop(); |
||
85 | if(dragdrop_reply != null ){ |
||
86 | show = show + "<li>" + description[inputfieldnumber] + " : " + dragdrop_reply + "</li>"; |
||
87 | reply[inputfieldnumber] = dragdrop_reply; |
||
88 | inputfieldnumber++; |
||
89 | } |
||
90 | } |
||
7419 | schaersvoo | 91 | <!-- finally ... --> |
11801 | schaersvoo | 92 | if(typeof reply[0] === 'undefined' ){setAlarm(r1+" $counter");return;}; |
93 | if( "$wordmin" == "noshow" ){ show = "$send";}else{ show = show + "</ol>";}; |
||
7419 | schaersvoo | 94 | myConfirm(show,reply,'$wims_ref_name','$session','$module','$counter','$ok_send_color'); |
95 | } |
||
7878 | schaersvoo | 96 | !if $wims_user=supervisor |
7419 | schaersvoo | 97 | <!-- only visible for supervisor : to fill inputfields called myinput_n not default on this page, but stored in some variable --> |
7878 | schaersvoo | 98 | !set a_items=!itemcnt $(answer$n) |
99 | !if $a_items != $[floor($inputs)] |
||
100 | !set use_lines=1 |
||
101 | !else |
||
102 | !set use_lines=0 |
||
103 | !endif |
||
104 | !if $inputs<0 |
||
105 | !set ans=!lines2items $(answer$n) |
||
106 | !set s = !itemcnt $ans |
||
11354 | schaersvoo | 107 | function putanswer(){var input_type=['myinput','mathml','canvas_input','myselect'];for( var i=0; i < input_type.length ;i++){ if(document.getElementById( input_type[i]+0 )){var ans = new Array();ans = make_description("$ans",$s);var p = 0;var r = 0;while( document.getElementById( input_type[i]+p) ){if( ! document.getElementById(input_type[i]+p).getAttribute("readonly")){document.getElementById(input_type[i]+p).value = ans[r];r++;};p++;};};};} |
7878 | schaersvoo | 108 | !endif |
7419 | schaersvoo | 109 | !endif |
5857 | schaersvoo | 110 | //]]> |
338 | schaersvoo | 111 | </script> |
5984 | schaersvoo | 112 | <table id="exercise" class="exercise" ><!-- begin table id=exercise --> |
5889 | schaersvoo | 113 | <tr> |
5944 | schaersvoo | 114 | <td class="exercise_t"> |
5889 | schaersvoo | 115 | !if $(question$n) != $empty |
116 | $(question$n) |
||
6041 | schaersvoo | 117 | <br /> |
5889 | schaersvoo | 118 | !endif |
6195 | schaersvoo | 119 | !if $embed=1 and $mathview!=3 |
6253 | schaersvoo | 120 | !if $(formula$n) != $empty |
121 | <table class="exercise"> |
||
122 | <tr> |
||
123 | <td class="exercise_c"> |
||
6507 | schaersvoo | 124 | !insmath $(formula$n) |
6253 | schaersvoo | 125 | </td> |
126 | <td class="exercise_c"> |
||
127 | !if $inputs=1 |
||
128 | !if $wims_user=supervisor |
||
129 | $(description[1]) $m_rightarrow <textarea id="myinput0" class="schaersvoorde_textarea" cols="$cols" rows="$rows">$(answer$n)</textarea> $ex1 |
||
130 | !else |
||
131 | $(description[1]) $m_rightarrow <textarea id="myinput0" class="schaersvoorde_textarea" cols="$cols" rows="$rows">$(reply$n)</textarea> $ex1 |
||
132 | !endif |
||
133 | !else |
||
15435 | schaersvoo | 134 | <ul class="myvlist"> |
6253 | schaersvoo | 135 | !for p=1 to $inputs |
136 | <li> |
||
137 | !if $wims_user=supervisor |
||
138 | !if $use_lines=1 |
||
139 | !set deelantwoord=!line $p of $(answer$n) |
||
140 | !else |
||
141 | !set deelantwoord=!item $p of $(answer$n) |
||
142 | !endif |
||
143 | !else |
||
144 | !set deelantwoord=!item $p of $(reply$n) |
||
145 | !endif |
||
146 | $(description[$p]) $m_rightarrow <input type="text" id="myinput$[$p-1]" class="schaersvoorde_input" size="$cols" value="$deelantwoord" /> $(ex$p) |
||
147 | </li> |
||
148 | !next p |
||
149 | </ul> |
||
5931 | schaersvoo | 150 | !endif |
6253 | schaersvoo | 151 | </td> |
152 | </tr> |
||
153 | </table> |
||
154 | !else |
||
15435 | schaersvoo | 155 | <ul class="myvlist"><!-- this "span" line-height / font-size is related to schaersvoorde.css : "schaersvoorde_input" class font-size --> |
7878 | schaersvoo | 156 | !if $wims_user=supervisor |
157 | !for p=1 to $inputs |
||
158 | !if $use_lines=1 |
||
159 | !set deelantwoord=!line $p of $(answer$n) |
||
160 | !else |
||
161 | !set deelantwoord=!item $p of $(answer$n) |
||
162 | !endif |
||
163 | <li><span style="font-size:14pt;text-align:left;line-height:26px;">$(description[$p]) $m_rightarrow </span><input type="text" id="myinput$[$p-1]" value="$deelantwoord" size="$cols" class="schaersvoorde_input" /></li> |
||
164 | !next p |
||
165 | !else |
||
166 | !for p=1 to $inputs |
||
167 | <li><span style="font-size:14pt;text-align:left;line-height:26px;">$(description[$p]) $m_rightarrow </span><input type="text" id="myinput$[$p-1]" value="" size="$cols" class="schaersvoorde_input" /></li> |
||
168 | !next p |
||
169 | !endif |
||
6253 | schaersvoo | 170 | </ul> |
171 | !endif |
||
5944 | schaersvoo | 172 | !else |
5966 | schaersvoo | 173 | !if $(formula$n) != $empty |
6507 | schaersvoo | 174 | !if $display=1234 |
6041 | schaersvoo | 175 | !insmath $$$$ $(formula$n) $$$$ |
176 | !else |
||
177 | !insmath $(formula$n) |
||
178 | !endif |
||
5966 | schaersvoo | 179 | !endif |
5889 | schaersvoo | 180 | !endif |
181 | !if $exotext != $empty |
||
6365 | schaersvoo | 182 | <br /> |
5889 | schaersvoo | 183 | $exotext |
184 | !endif |
||
185 | </td> |
||
5944 | schaersvoo | 186 | !if $image=1 |
5966 | schaersvoo | 187 | !if $make_tr=1 |
5889 | schaersvoo | 188 | </tr> |
189 | <tr> |
||
5944 | schaersvoo | 190 | !endif |
5973 | schaersvoo | 191 | <td class="exercise_t"> |
5944 | schaersvoo | 192 | !if $draw=1 |
5966 | schaersvoo | 193 | !set insdraw_size=$xsize,$ysize |
6109 | schaersvoo | 194 | !set ins_attr=id="myimage" |
5966 | schaersvoo | 195 | !! voor answer.phtml gebruiken we de opgeslagen variabele "insdraw_settings" |
5944 | schaersvoo | 196 | !insdraw $(image$n) |
6079 | schaersvoo | 197 | !else |
198 | !if $plot=1 |
||
199 | !set insplot_set=$(image_settings$n) |
||
6109 | schaersvoo | 200 | !set ins_attr=id="myimage" |
6079 | schaersvoo | 201 | !insplot $(image$n) |
202 | !endif |
||
5944 | schaersvoo | 203 | !endif |
5889 | schaersvoo | 204 | </td> |
5944 | schaersvoo | 205 | !else |
206 | !if $applet=1 |
||
5966 | schaersvoo | 207 | !if $make_tr=1 |
5944 | schaersvoo | 208 | </tr> |
209 | <tr> |
||
210 | !endif |
||
8257 | schaersvoo | 211 | <th class="exercise_t" id="object$n"> |
5944 | schaersvoo | 212 | $(object$n) |
8257 | schaersvoo | 213 | </th> |
338 | schaersvoo | 214 | !endif |
5944 | schaersvoo | 215 | !endif |
7456 | schaersvoo | 216 | |
7464 | schaersvoo | 217 | !if $mathview=3 |
5889 | schaersvoo | 218 | </tr> |
219 | <tr> |
||
5944 | schaersvoo | 220 | <td class="exercise_c"> |
221 | <object classid="java:MathView.class" id="MathView" width="580" height="280" type="application/x-java-applet;jpi-version=1.4" > |
||
222 | <param name="java_codebase" value="$appletdir" /> |
||
223 | <param name="java_archive" value="MathView.jar" /> |
||
224 | <param name="java_code" value="MathView" /> |
||
225 | <param name="mayscript" value="true" /> |
||
12523 | schaersvoo | 226 | <script /> |
5944 | schaersvoo | 227 | //<![CDATA[ |
6079 | schaersvoo | 228 | if(document.body.style.background){var obj="\<param name=\"bgcolor\" value=\""+document.body.style.background+"\" />"}else{var obj="\<param name=\"bgcolor\" value=\"#ffffff\" />"} document.write(obj.toString()); |
5944 | schaersvoo | 229 | //]]> |
230 | </script> |
||
231 | <param name="largefont" value="$largefont"> |
||
232 | !if $wims_user=supervisor |
||
233 | <param name="oldreply" value=" |
||
234 | !nospace $(answer$n) |
||
235 | "/> |
||
236 | !else |
||
237 | <param name="oldreply" value=" |
||
238 | !nospace $(reply$n) |
||
239 | "/> |
||
338 | schaersvoo | 240 | !endif |
5944 | schaersvoo | 241 | <param name="smallfont" value="$smallfont" /> |
242 | <param name="helptext" value="$applettext" /> |
||
243 | <param name="wimsvars" value="$varlist" /> |
||
244 | <param name="special_fraction" value="$special_fraction" /> |
||
245 | !! declare varlist=x,y,z,s or varlist=x y z s |
||
246 | !if $mathviewpanel=$empty |
||
247 | <param name="my_panel" value="$module_title:and:or:sqrt():+:-:*:/"> |
||
248 | !else |
||
249 | <param name="my_panel" value="$mathviewpanel" /> |
||
250 | !endif |
||
5979 | schaersvoo | 251 | <a onmouseover="return escape('<img src=\'$gifdir/java.jpg\' alt=\'Get JAVA\' />');" href="http://www.java.com/$lang/download/manual.jsp?locale=$lang" > |
5973 | schaersvoo | 252 | $nojava |
253 | </a> |
||
5944 | schaersvoo | 254 | </object> |
5889 | schaersvoo | 255 | </td> |
5944 | schaersvoo | 256 | !else |
5973 | schaersvoo | 257 | !if $embed != 1 |
6079 | schaersvoo | 258 | !if $make_tr=1 |
259 | </tr> |
||
260 | <tr> |
||
261 | !endif |
||
5973 | schaersvoo | 262 | !if $inputs=1 |
263 | <td class="exercise_t" id="use_inputs"> |
||
264 | !if $wims_user=supervisor |
||
5979 | schaersvoo | 265 | $(description[1]) <textarea id="myinput0" class="schaersvoorde_textarea" cols="$cols" rows="$rows">$(answer$n)</textarea> $ex1 |
5973 | schaersvoo | 266 | !else |
5979 | schaersvoo | 267 | $(description[1]) <textarea id="myinput0" class="schaersvoorde_textarea" cols="$cols" rows="$rows">$(reply$n)</textarea> $ex1 |
5973 | schaersvoo | 268 | !endif |
269 | </td> |
||
270 | !else |
||
5995 | schaersvoo | 271 | !if $inputs > 1 |
5973 | schaersvoo | 272 | <td class="exercise_t" id="use_inputs"> |
6109 | schaersvoo | 273 | <table class="zebra_table_h2"> |
5973 | schaersvoo | 274 | !for p=1 to $inputs |
275 | !if $wims_user=supervisor |
||
276 | !if $use_lines=1 |
||
277 | !set deelantwoord=!line $p of $(answer$n) |
||
278 | !else |
||
279 | !set deelantwoord=!item $p of $(answer$n) |
||
280 | !endif |
||
281 | !else |
||
282 | !set deelantwoord=!item $p of $(reply$n) |
||
283 | !endif |
||
6109 | schaersvoo | 284 | <tr><td>$(description[$p])</td><td>$m_rightarrow</td><td><input type="text" id="myinput$[$p-1]" class="schaersvoorde_input" size="$cols" value="$deelantwoord" /></td><td> $(ex$p)</td></tr> |
5973 | schaersvoo | 285 | !next p |
6109 | schaersvoo | 286 | </table> |
5973 | schaersvoo | 287 | </td> |
5889 | schaersvoo | 288 | !endif |
289 | !endif |
||
290 | !endif |
||
338 | schaersvoo | 291 | !endif |
5889 | schaersvoo | 292 | </tr> |
5984 | schaersvoo | 293 | </table><!-- end table id=exercise --> |
5944 | schaersvoo | 294 | <div id="send_buttons" class="embedded_central"> |
295 | !if $inputs != 0 |
||
6041 | schaersvoo | 296 | <input type="button" id="schaersvoorde_ok_button" onclick="javascript:sendanswer();" value="$send" /> |
5889 | schaersvoo | 297 | !endif |
6041 | schaersvoo | 298 | <input type="button" id="schaersvoorde_nok_button" onclick="javascript:dontknow();" value="$dontknow" /> |
5984 | schaersvoo | 299 | |
6195 | schaersvoo | 300 | |
6041 | schaersvoo | 301 | !if $inputs < 0 |
6155 | schaersvoo | 302 | <!-- we are using other inputfields not present in this default page...but in a variable (like exotext) called "myinput0...myinput_n" And we don't want to use the myjavascript template page... --> |
6195 | schaersvoo | 303 | !if $wims_user=supervisor |
6301 | schaersvoo | 304 | <input type="button" id="schaersvoorde_extra_button" onclick="javascript:putanswer();" value="$wims_firstname $wims_lastname" /> |
6195 | schaersvoo | 305 | !endif |
6041 | schaersvoo | 306 | !if $goback=1 |
6079 | schaersvoo | 307 | <!-- after the inputelements are in the DOM-tree: try to fill-in the previous answers --> |
12523 | schaersvoo | 308 | <script> |
6041 | schaersvoo | 309 | //<![CDATA[ |
310 | <!-- no validator --> |
||
311 | try{document.onload=refill();}catch(e){} |
||
312 | //]]> |
||
313 | </script> |
||
314 | !endif |
||
315 | !endif |
||
316 | |||
6195 | schaersvoo | 317 | </div> |
338 | schaersvoo | 318 | !exit |