--- rat/client/parameter.html 2011/12/08 21:37:51 1.63 +++ rat/client/parameter.html 2015/09/13 21:48:37 1.68 @@ -5,7 +5,7 @@ The LearningOnline Network with CAPA Parameter Input Window // -// $Id: parameter.html,v 1.63 2011/12/08 21:37:51 www Exp $ +// $Id: parameter.html,v 1.68 2015/09/13 21:48:37 raeburn Exp $ // // Copyright Michigan State University Board of Trustees // @@ -39,6 +39,7 @@ Parameter Input Window var ptype=''; var pvalue=''; +var pmodval=''; var preturn=''; var pcode=''; var pscat=''; @@ -301,7 +302,25 @@ function intcalc() { sform.hours.options[sform.hours.selectedIndex].value*1)*60+ sform.minutes.options[sform.minutes.selectedIndex].value*1)*60+ sform.seconds.options[sform.seconds.selectedIndex].value*1; - draw(); + if ((ptype=='date') && (pscat=='interval')) { + var newpmodval = ''; + if (sform.donebutton.length) { + for (var i=0; i'); - } else { + choicewrite('secs'); + choicewrite('
'); + tablestart('Provide a "Done" button to students?'); + choicewrite('Value:'); + choicewrite('
'); + choicewrite('
'); + choicewrite(''); + } else { choicewrite('' +cdate.toString()+ 'Date:'); @@ -631,7 +664,7 @@ function draw() { choicewrite('
'); + choicewrite(' /> Bubblesheet Exam
'); // choicewrite('
'); } + if (pscat=='discussvote') { + tablestart('Discussion Voting'); + choicewrite('Value:'); + choicewrite('
'); + choicewrite('
'); + choicewrite('
'); + } if (pscat=='ip') { tablestart('IP Number/Name'); choicewrite('Value:'); @@ -816,6 +865,7 @@ function assemble() { function init() { var i; var subs=new Array(); + var doneRegExp = /_done/; var namevalue=this.window.location.search.split('&'); namevalue[0]=namevalue[0].substr(1,namevalue[0].length-1); @@ -845,6 +895,13 @@ function init() { if (pair[0]=='defsec' && pair[1] >= 0 && pair[1] < 60) { defsec=pair[1]; } } + if (ptype=='date' && pscat == 'interval') { + if (doneRegExp.test(pvalue)) { + var pnumval = pvalue.replace(doneRegExp,''); + pmodval = pvalue.match(doneRegExp); + pvalue = pnumval; + } + } svalue=pvalue; if (((ptype=='float') || (ptype=='string') || (ptype=='int')) && (pscat=='default') && @@ -884,7 +941,7 @@ function init() { selwrite(''); selwrite(''); selwrite('
'+pname+'
'); - selwrite(''); if (ptype=='tolerance') { sopt('default','Default'); @@ -949,6 +1006,7 @@ function init() { else if (pscat == 'examtype') { sopt('examtype','Exam Type'); } else if (pscat == 'questiontype') { sopt('questiontype','Question Type'); } else if (pscat == 'lenient') { sopt('lenient','Lenient Grading (Partial Credit)'); } + else if (pscat == 'discussvote') { sopt('discussvote','Discussion Voting'); } else if (pscat == 'ip') { sopt('ip','IP Number/Name'); } else if (pscat == 'fileext') { sopt('fileext','File Extension'); } else if (pscat == 'useslots') { sopt('useslots','Slots control access'); }