--- rat/client/parameter.html 2011/11/21 13:39:40 1.59.2.1 +++ 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.59.2.1 2011/11/21 13:39:40 raeburn Exp $ +// $Id: parameter.html,v 1.68 2015/09/13 21:48:37 raeburn Exp $ // // Copyright Michigan State University Board of Trustees // @@ -39,10 +39,12 @@ Parameter Input Window var ptype=''; var pvalue=''; +var pmodval=''; var preturn=''; var pcode=''; var pscat=''; var pmarker=''; +var pmodal=''; var pname=''; var defhour=0; @@ -300,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:'); @@ -630,7 +664,7 @@ function draw() { choicewrite('
'); + choicewrite(' /> Bubblesheet Exam
'); // choicewrite('
'); } + if (pscat=='lenient') { + tablestart('Lenient Grading (Partial Credit)'); + choicewrite('Value:'); + choicewrite('
'); + choicewrite('
'); + choicewrite('
'); + } + if (pscat=='discussvote') { + tablestart('Discussion Voting'); + choicewrite('Value:'); + choicewrite('
'); + choicewrite('
'); + choicewrite('
'); + } if (pscat=='ip') { tablestart('IP Number/Name'); choicewrite('Value:'); @@ -799,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); @@ -820,6 +887,7 @@ function init() { if (pair[0]=='call') { pcode=pair[1]; } if (pair[0]=='marker') { pmarker=pair[1]; } if (pair[0]=='name') { pname=pair[1]; } + if (pair[0]=='modal') { pmodal=pair[1]; } if (pair[0]=='defhour' && pair[1] >= 0 && pair[1] < 24 ) { defhour=pair[1]; } @@ -827,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') && @@ -866,7 +941,7 @@ function init() { selwrite(''); selwrite(''); selwrite('
'+pname+'
'); - selwrite(''); if (ptype=='tolerance') { sopt('default','Default'); @@ -930,6 +1005,8 @@ function init() { else if (pscat == 'problemstatus'){ sopt('problemstatus','Problem Status'); } 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'); } @@ -943,56 +1020,34 @@ function init() { } selwrite('
'); - + var targ='parent.opener'; + if (pmodal==1) { + targ='parent.parent'; + } selwrite('Save  '); selwrite('Delete  '); - selwrite('Cancel'); - selwrite(''); this.window.selector.document.close(); draw();