version 1.22, 2003/04/19 15:34:06
|
version 1.31, 2005/06/14 02:33:18
|
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 304 function stringeval() {
|
Line 305 function stringeval() {
|
draw(); |
draw(); |
} |
} |
|
|
|
function radiostringeval(newval) { |
|
svalue=newval; |
|
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 323 function pickcolor(picked) {
|
Line 335 function pickcolor(picked) {
|
|
|
function colorfield(ir,ig,ib) { |
function colorfield(ir,ig,ib) { |
var col=new Array; |
var col=new Array; |
col=["00","11","22","33","44","55","66","77","88","99","AA","BB","CC","DD","EE","FF"]; |
col=["00","11","22","44","66","88","AA","CC","DD","EE","FF"]; |
var color='#'+col[ir]+col[ig]+col[ib]; |
var color='#'+col[ir]+col[ig]+col[ib]; |
var selection=" "; |
var selection="<font color='"+color+"'>X</font>"; |
if (color==svalue) { selection="X"; } |
if (color==svalue) { selection="<font color='#"+col[10-ir]+col[10-ig]+col[10-ib]+"'>X</font>"; } |
choicewrite('<td bgcolor="'+color+'"><a href="javascript:parent.pickcolor('+"'"+ |
choicewrite('<td bgcolor="'+color+'"><a href="javascript:parent.pickcolor('+"'"+ |
color+"'"+')">'+selection+'</a></td>'); |
color+"'"+')">'+selection+'</a></td>'); |
|
|
Line 420 function draw() {
|
Line 432 function draw() {
|
choicewrite('</table>'); |
choicewrite('</table>'); |
} else { |
} else { |
if (pscat=='start') { |
if (pscat=='start') { |
tablestart('Starting or opening date and time'); |
tablestart('Date and time'); |
} |
} |
if (pscat=='end') { |
if (pscat=='end') { |
tablestart('Ending or closing date and time'); |
tablestart('Date and time'); |
} |
} |
if (pscat=='interval') { |
if (pscat=='interval') { |
tablestart('Time interval'); |
tablestart('Time interval'); |
Line 520 function draw() {
|
Line 532 function draw() {
|
tablestart('Default value or none'); |
tablestart('Default value or none'); |
choicewrite('</table>'); |
choicewrite('</table>'); |
} else { |
} else { |
if (pscat=='any') { |
if ((pscat=='any') || (pscat=='') || (typeof(pscat)=='undefined')) { |
tablestart('Text'); |
tablestart('Text'); |
} |
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+ |
'" type="text" onChange="parent.stringeval()">'); |
'" name=stringval onChange="parent.stringeval()">'); |
} |
|
if (pscat=='yesno') { |
|
tablestart('Yes/No'); |
|
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
|
choicewrite('<input name="stringval" value="yes"'+ |
|
' type="radio" '+callradiostringeval('yes')); |
|
if (svalue=='yes') { choicewrite(' checked'); } |
|
choicewrite('> Yes<br />'); |
|
choicewrite('<input name="stringval" value="no"'+ |
|
' type="radio" '+callradiostringeval('no')); |
|
if (svalue=='no') { choicewrite(' checked'); } |
|
choicewrite('> No<br />'); |
|
} |
|
if (pscat=='examtype') { |
|
tablestart('Exam Type'); |
|
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
|
choicewrite('<input name="stringval" value="online"'+ |
|
' type="radio" '+callradiostringeval('online')); |
|
if (svalue=='online') { choicewrite(' checked'); } |
|
choicewrite('> Online<br />'); |
|
choicewrite('<input name="stringval" value="checkout"'+ |
|
' type="radio" '+callradiostringeval('checkout')); |
|
if (svalue=='checkout') { choicewrite(' checked'); } |
|
choicewrite('> Check out<br />'); |
|
} |
|
if (pscat=='questiontype') { |
|
tablestart('Question Type'); |
|
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
|
choicewrite('<input name="stringval" value="problem"'+ |
|
' type="radio" '+callradiostringeval('problem')); |
|
if (svalue=='problem') { choicewrite(' checked'); } |
|
choicewrite('> Standard Problem<br />'); |
|
choicewrite('<input name="stringval" value="quiz"'+ |
|
' type="radio" '+callradiostringeval('quiz')); |
|
if (svalue=='quiz') { choicewrite(' checked'); } |
|
choicewrite('> Quiz<br />'); |
|
choicewrite('<input name="stringval" value="exam"'+ |
|
' type="radio" '+callradiostringeval('exam')); |
|
if (svalue=='exam') { choicewrite(' checked'); } |
|
choicewrite('> Exam<br />'); |
|
choicewrite('<input name="stringval" value="assess"'+ |
|
' type="radio" '+callradiostringeval('assess')); |
|
if (svalue=='assess') { choicewrite(' checked'); } |
|
choicewrite('> Assessment<br />'); |
|
choicewrite('<input name="stringval" value="survey"'+ |
|
' type="radio" '+callradiostringeval('survey')); |
|
if (svalue=='survey') { choicewrite(' checked'); } |
|
choicewrite('> Survey<br />'); |
|
choicewrite('<input name="stringval" value="form"'+ |
|
' type="radio" '+callradiostringeval('form')); |
|
if (svalue=='form') { choicewrite(' checked'); } |
|
choicewrite('> Input Form<br />'); |
|
choicewrite('<input name="stringval" value="library"'+ |
|
' type="radio" '+callradiostringeval('library')); |
|
if (svalue=='library') { choicewrite(' checked'); } |
|
choicewrite('> Library<br />'); |
|
} |
|
if (pscat=='ip') { |
|
tablestart('IP Number/Name'); |
|
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
|
choicewrite('<input name="stringval" size="20" value="'+svalue+ |
|
'" onChange="parent.stringeval()">'); |
|
} |
|
if (pscat=='fileext') { |
|
tablestart('Allowed File Extensions'); |
|
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>'); |
|
choicewrite('<input name="radstringval" value="txt"'+ |
|
' type="radio" '+callradiostringeval('txt')); |
|
if (svalue=='txt') { choicewrite(' checked'); } |
|
choicewrite('> Plain Text<br />'); |
|
choicewrite('<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<br />'); |
|
choicewrite('<input name="radstringval" value="doc,xls,ppt"'+ |
|
' type="radio" '+callradiostringeval('doc,xls,ppt')); |
|
if (svalue=='doc,xls,ppt') { choicewrite(' checked'); } |
|
choicewrite('> Office Document<br />'); |
|
choicewrite('<input name="stringval" size="20" value="'+svalue+ |
|
'" onChange="parent.stringeval()">'); |
|
} |
choicewrite('</td></table>'); |
choicewrite('</td></table>'); |
} |
} |
} |
} |
Line 534 function draw() {
|
Line 626 function draw() {
|
tablestart('Choose a Color'); |
tablestart('Choose a Color'); |
choicewrite('<table>'); |
choicewrite('<table>'); |
if (svalue) { |
if (svalue) { |
choicewrite('<tr><td colspan="10">Current choice:</td><td bgcolor="'+ |
choicewrite('<tr><td colspan="9">Current choice:</td><td bgcolor="'+ |
svalue+'" colspan="6"> </td></tr>'); |
svalue+'" colspan="2"> </td></tr>'); |
} |
} |
for (var ir=1; ir<=15; ir++) { |
for (var ir=0; ir<=10; ir++) { |
for (var ig=1; ig<=15; ig++) { |
for (var ig=0; ig<=10; ig++) { |
choicewrite('<tr>'); |
choicewrite('<tr>'); |
for (var ib=1; ib<=15; ib++) { |
for (var ib=0; ib<=10; ib++) { |
colorfield(ir,ig,ib); |
colorfield(ir,ig,ib); |
} |
} |
choicewrite('</tr>'); |
choicewrite('</tr>'); |
Line 638 function init() {
|
Line 730 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') { defhour=pair[1]; } |
|
if (pair[0]=='defmin') { defmin=pair[1]; } |
|
if (pair[0]=='defsec') { defsec=pair[1]; } |
} |
} |
|
|
svalue=pvalue; |
svalue=pvalue; |
Line 682 function init() {
|
Line 777 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 717 function init() {
|
Line 816 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') { |