--- rat/client/parameter.html 2015/11/21 00:16:09 1.69 +++ rat/client/parameter.html 2016/03/15 14:25:41 1.70 @@ -5,7 +5,7 @@ The LearningOnline Network with CAPA Parameter Input Window // -// $Id: parameter.html,v 1.69 2015/11/21 00:16:09 musolffc Exp $ +// $Id: parameter.html,v 1.70 2016/03/15 14:25:41 raeburn Exp $ // // Copyright Michigan State University Board of Trustees // @@ -40,6 +40,7 @@ Parameter Input Window var ptype=''; var pvalue=''; var pmodval=''; +var pextraval=''; var preturn=''; var pcode=''; var pscat=''; @@ -312,25 +313,74 @@ function intcalc() { sform.seconds.options[sform.seconds.selectedIndex].value*1; if ((ptype=='date') && (pscat=='interval')) { var newpmodval = ''; + var newpextraval = ''; if (sform.donebutton.length) { for (var i=0; i'+intervaldis()+'', @@ -514,14 +568,23 @@ function draw() { ].join("\n")); tablestart('Provide a "Done" button to students?'); choicewrite('Value:'); + choicewrite('
'); choicewrite('
'); - choicewrite(''); + choicewrite(' '); choicewrite(''); } else { choicewrite('' @@ -875,6 +938,8 @@ function init() { var i; var subs=new Array(); var doneRegExp = /_done/; + var doneproctorRegExp = /_done_proctor/; + var proctorkeyRegExp = /^(\d+)_(.+)$/; var namevalue=this.window.location.search.split('&'); namevalue[0]=namevalue[0].substr(1,namevalue[0].length-1); @@ -905,10 +970,24 @@ function init() { } if (ptype=='date' && pscat == 'interval') { - if (doneRegExp.test(pvalue)) { - var pnumval = pvalue.replace(doneRegExp,''); - pmodval = pvalue.match(doneRegExp); - pvalue = pnumval; + if (doneproctorRegExp.test(pvalue)) { + pmodval = pvalue.match(doneproctorRegExp); + var intervalwithkey = pvalue.replace(doneproctorRegExp,''); + if (proctorkeyRegExp.test(intervalwithkey)) { + var currvals = intervalwithkey.match(proctorkeyRegExp); + if (currvals.length == 3) { + pvalue = currvals[1]; + pextraval = currvals[2]; + } else { + pmodval = ''; + } + } + } else { + if (doneRegExp.test(pvalue)) { + var pnumval = pvalue.replace(doneRegExp,''); + pmodval = pvalue.match(doneRegExp); + pvalue = pnumval; + } } } svalue=pvalue; @@ -1032,8 +1111,12 @@ function init() { var targ='parent.opener'; if (pmodal==1) { targ='parent.parent'; - } - selwrite('