--- rat/client/parameter.html 2002/10/25 13:47:37 1.19 +++ rat/client/parameter.html 2003/11/25 22:19:22 1.27 @@ -3,7 +3,7 @@ The LearningOnline Network with CAPA Parameter Input Window // -// $Id: parameter.html,v 1.19 2002/10/25 13:47:37 www Exp $ +// $Id: parameter.html,v 1.27 2003/11/25 22:19:22 www Exp $ // // Copyright Michigan State University Board of Trustees // @@ -29,7 +29,6 @@ Parameter Input Window // 06/16/00,06/17,11/17,11/18,11/23,11/27,11/28,12/15,12/16, 03/21/01,03/24,06/26 Gerd Kortemeyer -07/24/01 Scott Harrison 08/08 Gerd Kortemeyer --> @@ -305,6 +304,11 @@ function stringeval() { draw(); } +function radiostringeval(newval) { + svalue=newval; + draw(); +} + function intervaldis() { csecs=svalue; cdays=Math.floor(csecs/86400); @@ -316,7 +320,23 @@ function intervaldis() { choicewrite(cdays+' days '+chours+' hours ' +cmins+' mins '+csecs+' secs'); } - + +function pickcolor(picked) { + svalue=picked; + draw(); +} + +function colorfield(ir,ig,ib) { + var col=new Array; + col=["00","11","22","44","66","88","AA","CC","DD","EE","FF"]; + var color='#'+col[ir]+col[ig]+col[ib]; + var selection="X"; + if (color==svalue) { selection="X"; } + choicewrite(''+selection+''); + +} + function draw() { choicestart(); choicewrite('
'); } else { if (pscat=='start') { - tablestart('Starting or opening date and time'); + tablestart('Date and time'); } if (pscat=='end') { - tablestart('Ending or closing date and time'); + tablestart('Date and time'); } if (pscat=='interval') { tablestart('Time interval'); @@ -505,15 +525,114 @@ function draw() { tablestart('Default value or none'); choicewrite(''); } else { - if (pscat=='any') { + if ((pscat=='any') || (pscat=='') || (typeof(pscat)=='undefined')) { tablestart('Text'); - } - choicewrite('Value:'); - choicewrite(''); + choicewrite('Value:'); + choicewrite(''); + } + if (pscat=='yesno') { + tablestart('Yes/No'); + choicewrite('Value:'); + choicewrite(' Yes
'); + choicewrite(' No
'); + } + if (pscat=='examtype') { + tablestart('Exam Type'); + choicewrite('Value:'); + choicewrite(' Online
'); + choicewrite(' Check out
'); + } + if (pscat=='questiontype') { + tablestart('Question Type'); + choicewrite('Value:'); + choicewrite(' Standard Problem
'); + choicewrite(' Quiz
'); + choicewrite(' Exam
'); + choicewrite(' Assessment
'); + choicewrite(' Survey
'); + choicewrite(' Input Form
'); + choicewrite(' Library
'); + } + if (pscat=='ip') { + tablestart('IP Number/Name'); + choicewrite('Value:'); + choicewrite(''); + } + if (pscat=='fileext') { + tablestart('Allowed File Extensions'); + choicewrite('Value:'); + choicewrite(' Plain Text
'); + choicewrite(' Picture File
'); + choicewrite(' Office Document
'); + choicewrite(''); + } choicewrite(''); } } + + if (ptype=='color') { + tablestart('Choose a Color'); + choicewrite(''); + if (svalue) { + choicewrite(''); + } + for (var ir=0; ir<=10; ir++) { + for (var ig=0; ig<=10; ig++) { + choicewrite(''); + for (var ib=0; ib<=10; ib++) { + colorfield(ir,ig,ib); + } + choicewrite(''); + } + } + choicewrite('
Current choice: 
'); + } choicewrite('
'); choiceend(); @@ -686,6 +805,11 @@ function init() { sopt('string','String Value'); } + if (ptype=='color') { + sopt('default','Use Default Color'); + sopt('custom','Use Custom Color'); + } + selwrite(''); selwrite('