version 1.83, 2020/06/03 12:58:32
|
version 1.84, 2020/10/29 23:24:13
|
Line 402 function validateInterval() {
|
Line 402 function validateInterval() {
|
if (sform.donebutton[i].value == '_done_proctor') { |
if (sform.donebutton[i].value == '_done_proctor') { |
if ((sform.donebutton_proctorkey.value == '') || |
if ((sform.donebutton_proctorkey.value == '') || |
(sform.donebutton_proctorkey.value == null)) { |
(sform.donebutton_proctorkey.value == null)) { |
alert('Please provide a key for a proctor to enter when a student uses the "Done" button.'); |
alert('Please enter a key for a proctor to enter when a student uses the "Done" button.'); |
return; |
return; |
} |
} |
} |
} |
Line 417 function validateDeepLink() {
|
Line 417 function validateDeepLink() {
|
var sform=choices.document.forms.sch; |
var sform=choices.document.forms.sch; |
svalue = sform.deeplinklisted.options[sform.deeplinklisted.selectedIndex].value+','; |
svalue = sform.deeplinklisted.options[sform.deeplinklisted.selectedIndex].value+','; |
svalue += sform.deeplinkacc.options[sform.deeplinkacc.selectedIndex].value+','; |
svalue += sform.deeplinkacc.options[sform.deeplinkacc.selectedIndex].value+','; |
|
var keyRegExp = /^[a-zA-Z\d_.!@#$%^&*()+=-]+$/; |
|
var numRegExp = /^\d+$/; |
if (sform.deeplinktypes.length) { |
if (sform.deeplinktypes.length) { |
for (var i=0; i<sform.deeplinktypes.length; i++) { |
for (var i=0; i<sform.deeplinktypes.length; i++) { |
if (sform.deeplinktypes[i].checked) { |
if (sform.deeplinktypes[i].checked) { |
Line 424 function validateDeepLink() {
|
Line 426 function validateDeepLink() {
|
if (sform.deeplinktypes[i].value == 'key') { |
if (sform.deeplinktypes[i].value == 'key') { |
var posskey = sform.deeplinkkey.value; |
var posskey = sform.deeplinkkey.value; |
posskey = posskey.replace(/^\s+|\s+$/g,''); |
posskey = posskey.replace(/^\s+|\s+$/g,''); |
var keyRegExp = /^\w+$/; |
|
if (keyRegExp.test(posskey)) { |
if (keyRegExp.test(posskey)) { |
svalue += ':'+posskey; |
svalue += ':'+posskey; |
|
} else { |
|
alert('Please enter a value for the key containing one or more of: a-zA-Z0-9_.!@#$%^&*()+=-\n'+ |
|
'or choose a different supported link type.'); |
|
return; |
} |
} |
} else if (sform.deeplinktypes[i].value == 'lti') { |
} else if (sform.deeplinktypes[i].value == 'lti') { |
var posslti = sform.linkposslti.options[sform.linkposslti.selectedIndex].value; |
var posslti = sform.linkposslti.options[sform.linkposslti.selectedIndex].value; |
if (posslti != '' && posslti != null) { |
if ((numRegExp.test(posslti)) && (posslti > 0)) { |
svalue += ':'+posslti; |
svalue += ':'+posslti; |
|
} else { |
|
alert('Please select an LTI launcher, or choose a different supported link type.'); |
|
return; |
|
} |
|
} |
|
break; |
|
} |
|
} |
|
} |
|
svalue += ','; |
|
if (sform.deeplinkmenus.length) { |
|
for (var i=0; i<sform.deeplinkmenus.length; i++) { |
|
if (sform.deeplinkmenus[i].checked) { |
|
if (sform.deeplinkmenus[i].value == 'std') { |
|
svalue += '0'; |
|
} else if (sform.deeplinkmenus[i].value == 'collnum') { |
|
var posscoll = sform.linkpossmenu.options[sform.linkpossmenu.selectedIndex].value; |
|
if ((numRegExp.test(posscoll)) && (posscoll > 0)) { |
|
svalue += posscoll; |
|
} else { |
|
alert("Please select either a numbered collection or check 'Standard (all menus)'."); |
|
return; |
} |
} |
} |
} |
break; |
break; |
Line 441 function validateDeepLink() {
|
Line 468 function validateDeepLink() {
|
assemble(); |
assemble(); |
} |
} |
|
|
function toggleDeepLink() { |
function toggleDeepLink(caller) { |
var sform=choices.document.forms.sch; |
var sform=choices.document.forms.sch; |
if (sform.deeplinktypes.length) { |
if ((caller == 'types') && (sform.deeplinktypes.length)) { |
var frame = window.frames["choices"]; |
var frame = window.frames["choices"]; |
for (var i=0; i<sform.deeplinktypes.length; i++) { |
for (var i=0; i<sform.deeplinktypes.length; i++) { |
if (sform.deeplinktypes[i].checked) { |
if (sform.deeplinktypes[i].checked) { |
Line 460 function toggleDeepLink() {
|
Line 487 function toggleDeepLink() {
|
} |
} |
if (frame.document.getElementById('deeplinkltidiv')) { |
if (frame.document.getElementById('deeplinkltidiv')) { |
if (sform.deeplinktypes[i].value == 'lti') { |
if (sform.deeplinktypes[i].value == 'lti') { |
frame.document.getElementById('deeplinkltidiv').style.display='inline-block'; |
frame.document.getElementById('deeplinkltidiv').style.display='block'; |
} else { |
} else { |
frame.document.getElementById('deeplinkltidiv').style.display='none'; |
frame.document.getElementById('deeplinkltidiv').style.display='none'; |
} |
} |
Line 470 function toggleDeepLink() {
|
Line 497 function toggleDeepLink() {
|
} |
} |
} |
} |
} |
} |
|
if ((caller == 'menus') && (sform.deeplinkmenus.length)) { |
|
var frame = window.frames["choices"]; |
|
for (var i=0; i<sform.deeplinkmenus.length; i++) { |
|
if (sform.deeplinkmenus[i].checked) { |
|
if (frame.document.getElementById('deeplinkmenusdiv')) { |
|
if (sform.deeplinkmenus[i].value == 'collnum') { |
|
frame.document.getElementById('deeplinkmenusdiv').style.display='inline-block'; |
|
} else { |
|
frame.document.getElementById('deeplinkmenusdiv').style.display='none'; |
|
} |
|
} |
|
break; |
|
} |
|
} |
|
} |
} |
} |
|
|
function calldeeplink() { |
function calldeeplink(caller) { |
return 'onclick="parent.toggleDeepLink()"'; |
return 'onclick="parent.toggleDeepLink(\''+caller+'\')"'; |
} |
} |
|
|
function integereval() { |
function integereval() { |
Line 1127 function draw() {
|
Line 1169 function draw() {
|
var linktypeparts = new Array(); |
var linktypeparts = new Array(); |
var ltikeyRegExp = /^(lti|key):(\w+)$/; |
var ltikeyRegExp = /^(lti|key):(\w+)$/; |
var dlinkkeysty = 'hidden'; |
var dlinkkeysty = 'hidden'; |
var dlinkltidivsty = 'none'; |
|
var dlinkkeyval = ''; |
var dlinkkeyval = ''; |
|
var dlinkltidivsty = 'none'; |
|
var dlinkmenusdivsty = 'none'; |
if ((svalue != '') && (svalue != null)) { |
if ((svalue != '') && (svalue != null)) { |
deeplinkvals = svalue.split(','); |
deeplinkvals = svalue.split(','); |
if (ltikeyRegExp.test(deeplinkvals[2])) { |
if (ltikeyRegExp.test(deeplinkvals[2])) { |
Line 1138 function draw() {
|
Line 1181 function draw() {
|
dlinkkeysty = 'text'; |
dlinkkeysty = 'text'; |
dlinkkeyval = linktypeparts[1]; |
dlinkkeyval = linktypeparts[1]; |
} else if (linktypeparts[0] == 'lti') { |
} else if (linktypeparts[0] == 'lti') { |
dlinkltidivsty = 'inline-block'; |
dlinkltidivsty = 'block'; |
} |
} |
} |
} |
|
if (deeplinkvals[3] >= 1) { |
|
dlinkmenusdivsty = 'inline-block'; |
|
} |
} else { |
} else { |
deeplinkvals = ['full','res','any']; |
deeplinkvals = ['full','res','any','0']; |
} |
} |
var deeplinklisting = new Array(); |
var deeplinklisting = new Array(); |
deeplinklisting = ['full','absent','grades','details','datestatus']; |
deeplinklisting = ['full','absent','grades','details','datestatus']; |
Line 1155 function draw() {
|
Line 1201 function draw() {
|
var deeplinkurls = new Array(); |
var deeplinkurls = new Array(); |
deeplinkurls = ['any','only','key','lti']; |
deeplinkurls = ['any','only','key','lti']; |
tablestart('Deep-linked items'); |
tablestart('Deep-linked items'); |
choicewrite('<tr><td>In Contents or Gradebook?</td><td>'); |
choicewrite('<tr><td>In Contents + Gradebook?</td><td>'); |
choicewrite('<select name="deeplinklisted">'); |
choicewrite('<select name="deeplinklisted">'); |
for (var i=0; i<deeplinklisting.length; i++) { |
for (var i=0; i<deeplinklisting.length; i++) { |
choicewrite('<option value="'+deeplinklisting[i]+'"'); |
choicewrite('<option value="'+deeplinklisting[i]+'"'); |
Line 1178 function draw() {
|
Line 1224 function draw() {
|
choicewrite('<tr><td>Supported Link Types</td><td>'); |
choicewrite('<tr><td>Supported Link Types</td><td>'); |
choicewrite('<span style="white-space: nowrap;"><label>'); |
choicewrite('<span style="white-space: nowrap;"><label>'); |
choicewrite('<input name="deeplinktypes" value="any"'+ |
choicewrite('<input name="deeplinktypes" value="any"'+ |
' type="radio" '+calldeeplink()); |
' type="radio" '+calldeeplink('types')); |
if (deeplinkvals[2]=='any') { choicewrite(' checked="checked"'); } |
if (deeplinkvals[2]=='any') { choicewrite(' checked="checked"'); } |
choicewrite(' /> regular + deep</label></span><br />'); |
choicewrite(' /> regular + deep</label></span><br />'); |
choicewrite('<span style="white-space: nowrap;"><label>'); |
choicewrite('<span style="white-space: nowrap;"><label>'); |
choicewrite('<input name="deeplinktypes" value="only"'+ |
choicewrite('<input name="deeplinktypes" value="only"'+ |
' type="radio" '+calldeeplink()); |
' type="radio" '+calldeeplink('types')); |
if (deeplinkvals[2]=='only') { choicewrite(' checked="checked"'); } |
if (deeplinkvals[2]=='only') { choicewrite(' checked="checked"'); } |
choicewrite(' /> deep only</label></span><br />'); |
choicewrite(' /> deep only</label></span><br />'); |
choicewrite('<span style="white-space: nowrap;"><label>'); |
choicewrite('<span style="white-space: nowrap;"><label>'); |
choicewrite('<input name="deeplinktypes" value="key"'+ |
choicewrite('<input name="deeplinktypes" value="key"'+ |
' type="radio" '+calldeeplink()); |
' type="radio" '+calldeeplink('types')); |
if (deeplinkvals[2]=='key') { choicewrite(' checked="checked"'); } |
if (deeplinkvals[2]=='key') { choicewrite(' checked="checked"'); } |
choicewrite(' /> deep with key</label>'); |
choicewrite(' /> deep with key</label>'); |
choicewrite('<input type="'+dlinkkeysty+'" name="deeplinkkey" id="deeplinkkey" value="'+dlinkkeyval+'" size="6" />'); |
choicewrite('<input type="'+dlinkkeysty+'" name="deeplinkkey" id="deeplinkkey" value="'+dlinkkeyval+'" size="10" />'); |
choicewrite('</span><br />'); |
choicewrite('</span><br />'); |
|
|
|
var possmenus = new Array(); |
if ((pextra != '') && (pextra != null)) { |
if ((pextra != '') && (pextra != null)) { |
var ltiRegExp = /^lti_/; |
var ltiRegExp = /^lti_/; |
if (ltiRegExp.test(pextra)) { |
var menusRegExp = /^menus_/; |
pextra = pextra.replace(ltiRegExp,''); |
var extras = pextra.split('&'); |
var posslti = pextra.split(','); |
for (var i=0; i<extras.length; i++) { |
if (posslti.length >= 1) { |
if (ltiRegExp.test(extras[i])) { |
var ltinums = new Array(); |
extras[i] = extras[i].replace(ltiRegExp,''); |
var ltititles = new Array(); |
var posslti = extras[i].split(','); |
for (var i=0; i<posslti.length; i++) { |
if (posslti.length >= 1) { |
var entries = posslti[i].split(':'); |
var ltinums = new Array(); |
ltinums[i] = entries[0]; |
var ltititles = new Array(); |
ltititles[i] = decodeURI(entries[1]); |
for (var j=0; j<posslti.length; j++) { |
} |
var entries = posslti[j].split(':'); |
if (ltinums.length) { |
ltinums[j] = entries[0]; |
choicewrite('<span style="white-space: nowrap;"><label>'); |
ltititles[j] = decodeURIComponent(entries[1]); |
choicewrite('<input name="deeplinktypes" value="lti"'+ |
|
' type="radio" '+calldeeplink()); |
|
if (deeplinkvals[2]=='lti') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> deep with LTI launch</label>'); |
|
choicewrite('<div id="deeplinkltidiv" style="display:'+dlinkltidivsty+'">'); |
|
choicewrite('<select name="linkposslti">'); |
|
var sel=''; |
|
if (deeplinkvals[2]!='lti') { |
|
sel = ' selected="selected"'; |
|
} |
} |
if (ltinums.length > 1) { |
if (ltinums.length) { |
choicewrite('<option value=""'+sel+'>Please select</option>'); |
choicewrite('<span style="white-space: nowrap;"><label>'); |
} |
choicewrite('<input name="deeplinktypes" value="lti"'+ |
for (var i=0; i<ltinums.length; i++) { |
' type="radio" '+calldeeplink('types')); |
sel = ''; |
if (deeplinkvals[2]=='lti') { choicewrite(' checked="checked"'); } |
if (deeplinkvals[2]=='lti') { |
choicewrite(' /> deep with LTI launch</label>'); |
if (linktypeparts.length) { |
choicewrite('<div id="deeplinkltidiv" style="display:'+dlinkltidivsty+'">'); |
if (ltinums[i] == linktypeparts[1]) { |
choicewrite('<select name="linkposslti">'); |
sel = ' selected="selected"'; |
var sel=''; |
|
if (deeplinkvals[2]!='lti') { |
|
sel = ' selected="selected"'; |
|
} |
|
if (ltinums.length > 1) { |
|
choicewrite('<option value=""'+sel+'>Select</option>'); |
|
} |
|
for (var j=0; j<ltinums.length; j++) { |
|
sel = ''; |
|
if (deeplinkvals[2]=='lti') { |
|
if (linktypeparts.length) { |
|
if (ltinums[j] == linktypeparts[1]) { |
|
sel = ' selected="selected"'; |
|
} |
} |
} |
} |
} |
|
choicewrite('<option value="'+ltinums[j]+'"'+sel+'>'+ltititles[j]+'</option>'); |
} |
} |
choicewrite('<option value="'+ltinums[i]+'"'+sel+'>'+ltititles[i]+'</option>'); |
choicewrite('</select></div></span><br />'); |
} |
} |
choicewrite('</select></div></span><br />'); |
|
} |
} |
|
} else if (menusRegExp.test(extras[i])) { |
|
extras[i] = extras[i].replace(menusRegExp,''); |
|
possmenus = extras[i].split(','); |
} |
} |
} |
} |
} |
} |
|
choicewrite('<tr><td>Menu Items Displayed</td><td>'); |
|
choicewrite('<span style="white-space: nowrap;"><label>'); |
|
choicewrite('<input name="deeplinkmenus" value="std"'+ |
|
' type="radio" '+calldeeplink('menus')); |
|
if (deeplinkvals[3] == 0) { |
|
choicewrite(' checked="checked"'); |
|
} |
|
choicewrite(' /> Standard (all menus)</label></span><br />'); |
|
if (possmenus.length >= 1) { |
|
choicewrite('<span style="white-space: nowrap;"><label>'); |
|
choicewrite('<input name="deeplinkmenus" value="collnum"'+ |
|
' type="radio" '+calldeeplink('menus')); |
|
if (deeplinkvals[3] > 0) { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> Numbered collection</label>'); |
|
choicewrite('<div id="deeplinkmenusdiv" style="display:'+dlinkmenusdivsty+'">'); |
|
choicewrite('<select name="linkpossmenu">'); |
|
var sel=''; |
|
if (deeplinkvals[3] == 0) { |
|
sel = ' selected="selected"'; |
|
} |
|
if (possmenus.length > 1) { |
|
choicewrite('<option value=""'+sel+'>Select</option>'); |
|
} |
|
for (var i=0; i<possmenus.length; i++) { |
|
sel = ''; |
|
if (deeplinkvals[3] == possmenus[i]) { |
|
sel = ' selected="selected"'; |
|
} |
|
choicewrite('<option value="'+possmenus[i]+'"'+sel+'>'+possmenus[i]+'</option>'); |
|
} |
|
choicewrite('</select></div></span><br />'); |
|
} |
choicewrite('</td></tr></table>'); |
choicewrite('</td></tr></table>'); |
} |
} |
} |
} |
Line 1628 function init() {
|
Line 1715 function init() {
|
|
|
selwrite('</body></html>'); |
selwrite('</body></html>'); |
this.window.selector.document.close(); |
this.window.selector.document.close(); |
|
if (pscat == 'deeplink') { |
|
document.getElementById("LCparampopup").rows="60,*"; |
|
} |
draw(); |
draw(); |
|
|
} |
} |
Line 1636 function init() {
|
Line 1726 function init() {
|
</script> |
</script> |
</head> |
</head> |
|
|
<frameset rows="125,*" onload="init();"> |
<frameset id="LCparampopup" rows="125,*" onload="init();"> |
<frame name="selector" src="empty.html" /> |
<frame name="selector" src="empty.html" /> |
<frame name="choices" src="empty.html" /> |
<frame name="choices" src="empty.html" /> |
</frameset> |
</frameset> |