version 1.45, 2007/06/13 01:01:33
|
version 1.47, 2007/10/17 00:27:19
|
Line 32 Parameter Input Window
|
Line 32 Parameter Input Window
|
<title>LON-CAPA</title> |
<title>LON-CAPA</title> |
</head> |
</head> |
|
|
<script> |
<script type="text/javascript"> |
|
|
var ptype=''; |
var ptype=''; |
var pvalue=''; |
var pvalue=''; |
Line 92 function valline(text,id1,id2) {
|
Line 92 function valline(text,id1,id2) {
|
id2+'></td></tr>'); |
id2+'></td></tr>'); |
} |
} |
|
|
|
function escapeHTML(text) { |
|
text = text.replace(/&/g, '&'); |
|
text = text.replace(/"/g, '"'); |
|
text = text.replace(/</g, '<'); |
|
text = text.replace(/>/g, '>'); |
|
return text; |
|
} |
|
|
function datecalc() { |
function datecalc() { |
var sform=choices.document.forms.sch; |
var sform=choices.document.forms.sch; |
|
|
Line 500 function draw() {
|
Line 508 function draw() {
|
tablestart('Integer'); |
tablestart('Integer'); |
} |
} |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<input name=intval size=10 value="'+svalue+ |
choicewrite('<input name=intval size=10 value="'+escapeHTML(svalue)+ |
'" name=intval onChange="parent.integereval()">'); |
'" name=intval onChange="parent.integereval()">'); |
choicewrite('</td></table>'); |
choicewrite('</td></table>'); |
} |
} |
Line 522 function draw() {
|
Line 530 function draw() {
|
tablestart('Floating point number'); |
tablestart('Floating point number'); |
} |
} |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<input name=floatval size=10 value="'+svalue+ |
choicewrite('<input name=floatval size=10 value="'+escapeHTML(svalue)+ |
'" name=floatval onChange="parent.floateval()">'); |
'" name=floatval onChange="parent.floateval()">'); |
choicewrite('</td></table>'); |
choicewrite('</td></table>'); |
} |
} |
Line 533 function draw() {
|
Line 541 function draw() {
|
(typeof(pscat)=='undefined')) { |
(typeof(pscat)=='undefined')) { |
tablestart('Text'); |
tablestart('Text'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<input name="stringval" size="20" value="'+svalue+ |
choicewrite('<input name="stringval" size="20" value="'+escapeHTML(svalue)+ |
'" type="text" onChange="parent.stringeval()">'); |
'" type="text" onChange="parent.stringeval()">'); |
} |
} |
if (pscat=='yesno') { |
if (pscat=='yesno') { |
Line 548 function draw() {
|
Line 556 function draw() {
|
if (svalue=='no') { choicewrite(' checked'); } |
if (svalue=='no') { choicewrite(' checked'); } |
choicewrite('> No</label><br />'); |
choicewrite('> No</label><br />'); |
} |
} |
|
if (pscat=='problemstatus') { |
|
tablestart('Problem Status'); |
|
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
|
choicewrite('<label><input name="stringval" value="yes"'+ |
|
' type="radio" '+callradiostringeval('yes')); |
|
if (svalue=='yes') { choicewrite(' checked'); } |
|
choicewrite('> Yes</label><br />'); |
|
choicewrite('<label><input name="stringval" value="no"'+ |
|
' type="radio" '+callradiostringeval('no')); |
|
if (svalue=='no') { choicewrite(' checked'); } |
|
choicewrite('> No, don\'t show correct/incorrect feedback.</label><br />'); |
|
choicewrite('<label><input name="stringval" value="no_feedback_ever"'+ |
|
' type="radio" '+callradiostringeval('no_feedback_ever')); |
|
if (svalue=='no_feedback_ever') { choicewrite(' checked'); } |
|
choicewrite('> No, show no feedback at all.</label><br />'); |
|
} |
if (pscat=='examtype') { |
if (pscat=='examtype') { |
tablestart('Exam Type'); |
tablestart('Exam Type'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
Line 599 function draw() {
|
Line 623 function draw() {
|
if (pscat=='ip') { |
if (pscat=='ip') { |
tablestart('IP Number/Name'); |
tablestart('IP Number/Name'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<input name="stringval" size="20" value="'+svalue+ |
choicewrite('<input name="stringval" size="20" value="'+escapeHTML(svalue)+ |
'" onChange="parent.stringeval()">'); |
'" onChange="parent.stringeval()">'); |
} |
} |
if (pscat=='fileext') { |
if (pscat=='fileext') { |
Line 617 function draw() {
|
Line 641 function draw() {
|
' type="radio" '+callradiostringeval('doc,xls,ppt')); |
' type="radio" '+callradiostringeval('doc,xls,ppt')); |
if (svalue=='doc,xls,ppt') { choicewrite(' checked'); } |
if (svalue=='doc,xls,ppt') { choicewrite(' checked'); } |
choicewrite('> Office Document</label><br />'); |
choicewrite('> Office Document</label><br />'); |
choicewrite('<input name="stringval" size="20" value="'+svalue+ |
choicewrite('<input name="stringval" size="20" value="'+escapeHTML(svalue)+ |
'" onChange="parent.stringeval()">'); |
'" onChange="parent.stringeval()">'); |
} |
} |
if (pscat=='useslots') { |
if (pscat=='useslots') { |
Line 648 function draw() {
|
Line 672 function draw() {
|
choicewrite('<table>'); |
choicewrite('<table>'); |
if (svalue) { |
if (svalue) { |
choicewrite('<tr><td colspan="9">Current choice:</td><td bgcolor="'+ |
choicewrite('<tr><td colspan="9">Current choice:</td><td bgcolor="'+ |
svalue+'" colspan="2"> </td></tr>'); |
escapeHTML(svalue)+'" colspan="2"> </td></tr>'); |
} |
} |
for (var ir=0; ir<=10; ir++) { |
for (var ir=0; ir<=10; ir++) { |
for (var ig=0; ig<=10; ig++) { |
for (var ig=0; ig<=10; ig++) { |
Line 840 function init() {
|
Line 864 function init() {
|
if (ptype=='string') { |
if (ptype=='string') { |
//sopt('default','Default'); |
//sopt('default','Default'); |
if (pscat == 'yesno') { sopt('yesno','Yes/No'); } |
if (pscat == 'yesno') { sopt('yesno','Yes/No'); } |
|
else if (pscat == 'problemstatus'){ sopt('problemstatus','Problem Status'); } |
else if (pscat == 'examtype') { sopt('examtype','Exam Type'); } |
else if (pscat == 'examtype') { sopt('examtype','Exam Type'); } |
else if (pscat == 'questiontype') { sopt('questiontype','Question Type'); } |
else if (pscat == 'questiontype') { sopt('questiontype','Question Type'); } |
else if (pscat == 'ip') { sopt('ip','IP Number/Name'); } |
else if (pscat == 'ip') { sopt('ip','IP Number/Name'); } |