--- rat/client/parameter.html 2001/03/21 15:42:15 1.7 +++ rat/client/parameter.html 2001/08/08 16:41:28 1.13 @@ -3,7 +3,9 @@ The LearningOnline Network with CAPA 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 Gerd Kortemeyer +03/21/01,03/24,06/26 Gerd Kortemeyer +07/24/01 Scott Harrison +08/08 Gerd Kortemeyer --> LON-CAPA @@ -247,6 +249,13 @@ function integereval() { if ((pscat=='pos') && (svalue==0)) { svalue=''; } + if (pscat.indexOf('inrange')!=-1) { + var rangeparts=new Array; + rangeparts=split('_',pscat); + rangeparts=split(',',rangeparts[1]); + if (svaluerangeparts[1]) { svalue=rangeparts[1]; } + } draw(); } @@ -277,13 +286,6 @@ function intervaldis() { +cmins+' mins '+csecs+' secs'); } - - -function afterproc() { - choicewrite('Error after rounding: ' - +''); -} - function draw() { choicestart(); choicewrite('
'); if (ptype=='tolerance') { // 0: pscat -// 1: after processing if (pscat=='default') { tablestart('Use default value or algorithm of resource'); } - if (pscat=='exact') { - tablestart('Accept only exact value, zero tolerance'); - afterproc(); - } if (pscat=='relative_sym') { // 2: percentage // 3: open tablestart('Percentage error, symmetric around value'); valline('Percentage',2,3); - afterproc(); + if ((svalue!='') && (typeof(svalue)!="undefined")) { + choices.document.forms.sch.val2.value=parseInt(svalue); + if (svalue.indexOf('+')!=-1) { + choices.document.forms.sch.val3.checked=true; + } + } } if (pscat=='relative') { // 2: left @@ -322,18 +324,47 @@ function draw() { tablestart('Percentage error, asymmetric around value'); valline('Upper percentage',2,3); valline('Lower percentage',4,5); - afterproc(); + var range=new Array; + if ((svalue!='') && (typeof(svalue)!="undefined")) { + range=svalue.split(','); + if (typeof(range[1])=='undefined') { range[1]=range[0]; } + choices.document.forms.sch.val2.value=parseInt(range[0]); + if (range[0].indexOf('+')!=-1) { + choices.document.forms.sch.val3.checked=true; + } + choices.document.forms.sch.val4.value=parseInt(range[1]); + if (range[1].indexOf('+')!=-1) { + choices.document.forms.sch.val5.checked=true; + } + } } if (pscat=='absolute_sym') { tablestart('Absolute error, symmetric around value'); valline('Value',2,3); - afterproc(); + if ((svalue!='') && (typeof(svalue)!="undefined")) { + choices.document.forms.sch.val2.value=parseInt(svalue); + if (svalue.indexOf('+')!=-1) { + choices.document.forms.sch.val3.checked=true; + } + } } if (pscat=='absolute') { tablestart('Absolute error, asymmetric around value'); valline('Upper value',2,3); valline('Lower value',4,5); - afterproc(); + var range=new Array; + if ((svalue!='') && (typeof(svalue)!="undefined")) { + range=svalue.split(','); + if (typeof(range[1])=='undefined') { range[1]=range[0]; } + choices.document.forms.sch.val2.value=parseInt(range[0]); + if (range[0].indexOf('+')!=-1) { + choices.document.forms.sch.val3.checked=true; + } + choices.document.forms.sch.val4.value=parseInt(range[1]); + if (range[1].indexOf('+')!=-1) { + choices.document.forms.sch.val5.checked=true; + } + } } if (pscat=='sigdigits') { tablestart('Agreement on significant digits'); @@ -391,6 +422,14 @@ choicewrite(''); - selwrite('

'+pname+'

'); + selwrite(''+pname+'
'); selwrite('