version 1.25, 2003/07/10 08:34:43
|
version 1.36, 2006/03/02 18:02:16
|
Line 27 Parameter Input Window
|
Line 27 Parameter Input Window
|
// |
// |
// http://www.lon-capa.org/ |
// http://www.lon-capa.org/ |
// |
// |
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 |
|
08/08 Gerd Kortemeyer |
|
--> |
--> |
<head> |
<head> |
<title>LON-CAPA</title> |
<title>LON-CAPA</title> |
Line 45 var pscat='';
|
Line 42 var pscat='';
|
var pmarker=''; |
var pmarker=''; |
var pname=''; |
var pname=''; |
|
|
|
var defhour=0; |
|
var defmin=0; |
|
var defsec=0; |
|
|
var svalue; |
var svalue; |
var stype; |
var stype; |
var smarker; |
var smarker; |
Line 175 function year() {
|
Line 176 function year() {
|
var thisyear=cdate.getFullYear(); |
var thisyear=cdate.getFullYear(); |
var nowdate=new Date(); |
var nowdate=new Date(); |
var nowyear=nowdate.getFullYear(); |
var nowyear=nowdate.getFullYear(); |
|
if ( !thisyear ) { thisyear=nowyear; } |
var loweryear=thisyear-2; |
var loweryear=thisyear-2; |
var upperyear=thisyear+5; |
var upperyear=thisyear+5; |
if (thisyear>nowyear) { loweryear=nowyear-2; } |
if (thisyear>nowyear) { loweryear=nowyear-2; } |
Line 309 function radiostringeval(newval) {
|
Line 311 function radiostringeval(newval) {
|
draw(); |
draw(); |
} |
} |
|
|
|
function callradiostringeval(newval) { |
|
return 'onChange="parent.radiostringeval(\'' |
|
+newval+'\')" onClick="parent.radiostringeval(\'' |
|
+newval+'\')"'; |
|
} |
|
|
function intervaldis() { |
function intervaldis() { |
csecs=svalue; |
csecs=svalue; |
cdays=Math.floor(csecs/86400); |
cdays=Math.floor(csecs/86400); |
Line 534 function draw() {
|
Line 542 function draw() {
|
if (pscat=='yesno') { |
if (pscat=='yesno') { |
tablestart('Yes/No'); |
tablestart('Yes/No'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<input name="stringval" value="yes"'+ |
choicewrite('<label><input name="stringval" value="yes"'+ |
' type="radio" onChange="parent.radiostringeval(\'yes\')"'); |
' type="radio" '+callradiostringeval('yes')); |
if (svalue=='yes') { choicewrite(' checked'); } |
if (svalue=='yes') { choicewrite(' checked'); } |
choicewrite('> Yes<br />'); |
choicewrite('> Yes</label><br />'); |
choicewrite('<input name="stringval" value="no"'+ |
choicewrite('<label><input name="stringval" value="no"'+ |
' type="radio" onChange="parent.radiostringeval(\'no\')"'); |
' type="radio" '+callradiostringeval('no')); |
if (svalue=='no') { choicewrite(' checked'); } |
if (svalue=='no') { choicewrite(' checked'); } |
choicewrite('> No<br />'); |
choicewrite('> No</label><br />'); |
} |
} |
if (pscat=='examtype') { |
if (pscat=='examtype') { |
tablestart('Exam Type'); |
tablestart('Exam Type'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<input name="stringval" value="online"'+ |
choicewrite('<label><input name="stringval" value="online"'+ |
' type="radio" onChange="parent.radiostringeval(\'online\')"'); |
' type="radio" '+callradiostringeval('online')); |
if (svalue=='online') { choicewrite(' checked'); } |
if (svalue=='online') { choicewrite(' checked'); } |
choicewrite('> Online<br />'); |
choicewrite('> Online</label><br />'); |
choicewrite('<input name="stringval" value="checkout"'+ |
choicewrite('<label><input name="stringval" value="checkout"'+ |
' type="radio" onChange="parent.radiostringeval(\'checkout\')"'); |
' type="radio" '+callradiostringeval('checkout')); |
if (svalue=='checkout') { choicewrite(' checked'); } |
if (svalue=='checkout') { choicewrite(' checked'); } |
choicewrite('> Check out<br />'); |
choicewrite('> Check out</label><br />'); |
} |
} |
if (pscat=='questiontype') { |
if (pscat=='questiontype') { |
tablestart('Question Type'); |
tablestart('Question Type'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<input name="stringval" value="problem"'+ |
choicewrite('<label><input name="stringval" value="problem"'+ |
' type="radio" onChange="parent.radiostringeval(\'problem\')"'); |
' type="radio" '+callradiostringeval('problem')); |
if (svalue=='problem') { choicewrite(' checked'); } |
if (svalue=='problem') { choicewrite(' checked'); } |
choicewrite('> Standard Problem<br />'); |
choicewrite('> Standard Problem</label><br />'); |
choicewrite('<input name="stringval" value="quiz"'+ |
// choicewrite('<label><input name="stringval" value="quiz"'+ |
' type="radio" onChange="parent.radiostringeval(\'quiz\')"'); |
// ' type="radio" '+callradiostringeval('quiz')); |
if (svalue=='quiz') { choicewrite(' checked'); } |
// if (svalue=='quiz') { choicewrite(' checked'); } |
choicewrite('> Quiz<br />'); |
// choicewrite('> Quiz</label><br />'); |
choicewrite('<input name="stringval" value="exam"'+ |
choicewrite('<label><input name="stringval" value="practice"'+ |
' type="radio" onChange="parent.radiostringeval(\'exam\')"'); |
' type="radio" '+callradiostringeval('practice')); |
|
if (svalue=='practice') { choicewrite(' checked'); } |
|
choicewrite('> Practice</label><br />'); |
|
choicewrite('<label><input name="stringval" value="exam"'+ |
|
' type="radio" '+callradiostringeval('exam')); |
if (svalue=='exam') { choicewrite(' checked'); } |
if (svalue=='exam') { choicewrite(' checked'); } |
choicewrite('> Exam<br />'); |
choicewrite('> Exam</label><br />'); |
choicewrite('<input name="stringval" value="assess"'+ |
// choicewrite('<label><input name="stringval" value="assess"'+ |
' type="radio" onChange="parent.radiostringeval(\'assess\')"'); |
// ' type="radio" '+callradiostringeval('assess')); |
if (svalue=='assess') { choicewrite(' checked'); } |
// if (svalue=='assess') { choicewrite(' checked'); } |
choicewrite('> Assessment<br />'); |
// choicewrite('> Assessment</label><br />'); |
choicewrite('<input name="stringval" value="survey"'+ |
choicewrite('<label><input name="stringval" value="survey"'+ |
' type="radio" onChange="parent.radiostringeval(\'survey\')"'); |
' type="radio" '+callradiostringeval('survey')); |
if (svalue=='survey') { choicewrite(' checked'); } |
if (svalue=='survey') { choicewrite(' checked'); } |
choicewrite('> Survey<br />'); |
choicewrite('> Survey</label><br />'); |
choicewrite('<input name="stringval" value="form"'+ |
// choicewrite('<label><input name="stringval" value="form"'+ |
' type="radio" onChange="parent.radiostringeval(\'form\')"'); |
// ' type="radio" '+callradiostringeval('form')); |
if (svalue=='form') { choicewrite(' checked'); } |
// if (svalue=='form') { choicewrite(' checked'); } |
choicewrite('> Input Form<br />'); |
// choicewrite('> Input Form</label><br />'); |
choicewrite('<input name="stringval" value="library"'+ |
choicewrite('<label><input name="stringval" value="library"'+ |
' type="radio" onChange="parent.radiostringeval(\'library\')"'); |
' type="radio" '+callradiostringeval('library')); |
if (svalue=='library') { choicewrite(' checked'); } |
if (svalue=='library') { choicewrite(' checked'); } |
choicewrite('> Library<br />'); |
choicewrite('> Library</label><br />'); |
} |
} |
if (pscat=='ip') { |
if (pscat=='ip') { |
tablestart('IP Number/Name'); |
tablestart('IP Number/Name'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
choicewrite('<input name=stringval size=20 value="'+svalue+ |
choicewrite('<input name="stringval" size="20" value="'+svalue+ |
'" onChange="parent.stringeval()">'); |
'" onChange="parent.stringeval()">'); |
} |
} |
|
if (pscat=='fileext') { |
|
tablestart('Allowed File Extensions'); |
|
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
|
choicewrite('<label><input name="radstringval" value="txt"'+ |
|
' type="radio" '+callradiostringeval('txt')); |
|
if (svalue=='txt') { choicewrite(' checked'); } |
|
choicewrite('> Plain Text</label><br />'); |
|
choicewrite('<label><input name="radstringval" value="png,jpg,jpeg,gif"'+ |
|
' type="radio" '+callradiostringeval('png,jpg,jpeg,gif')); |
|
if (svalue=='png,jpg,jpeg,gif') { choicewrite(' checked'); } |
|
choicewrite('> Picture File</label><br />'); |
|
choicewrite('<label><input name="radstringval" value="doc,xls,ppt"'+ |
|
' type="radio" '+callradiostringeval('doc,xls,ppt')); |
|
if (svalue=='doc,xls,ppt') { choicewrite(' checked'); } |
|
choicewrite('> Office Document</label><br />'); |
|
choicewrite('<input name="stringval" size="20" value="'+svalue+ |
|
'" onChange="parent.stringeval()">'); |
|
} |
choicewrite('</td></table>'); |
choicewrite('</td></table>'); |
} |
} |
} |
} |
Line 705 function init() {
|
Line 735 function init() {
|
if (pair[0]=='call') { pcode=pair[1]; } |
if (pair[0]=='call') { pcode=pair[1]; } |
if (pair[0]=='marker') { pmarker=pair[1]; } |
if (pair[0]=='marker') { pmarker=pair[1]; } |
if (pair[0]=='name') { pname=pair[1]; } |
if (pair[0]=='name') { pname=pair[1]; } |
|
if (pair[0]=='defhour' && pair[1] >= 0 && pair[1] < 24 ) { |
|
defhour=pair[1]; |
|
} |
|
if (pair[0]=='defmin' && pair[1] >= 0 && pair[1] < 60) { defmin=pair[1]; } |
|
if (pair[0]=='defsec' && pair[1] >= 0 && pair[1] < 60) { defsec=pair[1]; } |
} |
} |
|
|
svalue=pvalue; |
svalue=pvalue; |
Line 749 function init() {
|
Line 784 function init() {
|
|
|
if ((pvalue!='') && (typeof(pvalue)!="undefined")) { |
if ((pvalue!='') && (typeof(pvalue)!="undefined")) { |
cdate.setTime(pvalue*1000); |
cdate.setTime(pvalue*1000); |
|
} else { |
|
cdate.setSeconds(defsec); |
|
cdate.setMinutes(defmin); |
|
cdate.setHours(defhour); |
} |
} |
|
|
months[0]='January'; |
months[0]='January'; |
Line 784 function init() {
|
Line 823 function init() {
|
|
|
if (ptype=='string') { |
if (ptype=='string') { |
sopt('default','Default'); |
sopt('default','Default'); |
sopt('string','String Value'); |
sopt('any','String Value'); |
} |
} |
|
|
if (ptype=='color') { |
if (ptype=='color') { |