version 1.64.2.5.2.2, 2022/05/27 17:58:03
|
version 1.64.2.5.2.4, 2023/12/29 21:09:58
|
Line 396 function validateInterval() {
|
Line 396 function validateInterval() {
|
for (var i=0; i<sform.donebutton.length; i++) { |
for (var i=0; i<sform.donebutton.length; i++) { |
if (sform.donebutton[i].checked) { |
if (sform.donebutton[i].checked) { |
if (sform.donebutton[i].value == '_done_proctor') { |
if (sform.donebutton[i].value == '_done_proctor') { |
if ((sform.donebutton_proctorkey.value == '') || |
var keyval = sform.donebutton_proctorkey.value; |
(sform.donebutton_proctorkey.value == null)) { |
if ((keyval == '') || (typeof(keyval) == 'undefined')) { |
alert('Please provide a key for a proctor to enter when a student uses the "Done" button.'); |
alert('Please provide a key for a proctor to enter when a student uses the "Done" button.'); |
return; |
return; |
} |
} |
Line 417 function validateDeepLink() {
|
Line 417 function validateDeepLink() {
|
svalue += sform.deeplinkacc.options[sform.deeplinkacc.selectedIndex].value+','; |
svalue += sform.deeplinkacc.options[sform.deeplinkacc.selectedIndex].value+','; |
var keyRegExp = /^[a-zA-Z\d_.!@#$%^&*()+=-]+$/; |
var keyRegExp = /^[a-zA-Z\d_.!@#$%^&*()+=-]+$/; |
var numRegExp = /^\d+$/; |
var numRegExp = /^\d+$/; |
|
var exitTextRegExp = /^[^'":;,]+$/; |
if (sform.deeplinkprotect.length) { |
if (sform.deeplinkprotect.length) { |
for (var i=0; i<sform.deeplinkprotect.length; i++) { |
for (var i=0; i<sform.deeplinkprotect.length; i++) { |
if (sform.deeplinkprotect[i].checked) { |
if (sform.deeplinkprotect[i].checked) { |
Line 473 function validateDeepLink() {
|
Line 474 function validateDeepLink() {
|
} |
} |
svalue += ','; |
svalue += ','; |
svalue += sform.deeplinktarget.options[sform.deeplinktarget.selectedIndex].value; |
svalue += sform.deeplinktarget.options[sform.deeplinktarget.selectedIndex].value; |
|
svalue += ','; |
|
if (sform.deeplinkexit.length) { |
|
for (var i=0; i<sform.deeplinkexit.length; i++) { |
|
if (sform.deeplinkexit[i].checked) { |
|
if (sform.deeplinkexit[i].value == 'no') { |
|
svalue += sform.deeplinkexit[i].value; |
|
} else { |
|
var exittext = sform.deeplinkexittext.value; |
|
exittext = exittext.replace(/^\s+|\s+$/g,''); |
|
if ((exittext.length) && (exitTextRegExp.test(exittext))) { |
|
svalue += sform.deeplinkexit[i].value; |
|
if (exittext !== 'Exit Tool') { |
|
svalue += ':'+exittext; |
|
} |
|
} else { |
|
alert('Please enter the button text. Disallowed characters are ;,":\'\n'+ |
|
'or check "not in use" option for "Exit Tool Link"'); |
|
return; |
|
} |
|
} |
|
break; |
|
} |
|
} |
|
} |
assemble(); |
assemble(); |
} |
} |
|
|
Line 522 function toggleDeepLink(caller) {
|
Line 547 function toggleDeepLink(caller) {
|
} |
} |
} |
} |
} |
} |
|
if ((caller == 'exit') && (sform.deeplinkexit.length)) { |
|
var frame = window.frames["choices"]; |
|
for (var i=0; i<sform.deeplinkexit.length; i++) { |
|
if (sform.deeplinkexit[i].checked) { |
|
if (frame.document.getElementById('deeplinkexitdiv')) { |
|
if (sform.deeplinkexit[i].value == 'no') { |
|
frame.document.getElementById('deeplinkexitdiv').style.display='none'; |
|
sform.deeplinkexittext.value = ''; |
|
} else { |
|
frame.document.getElementById('deeplinkexitdiv').style.display='inline-block'; |
|
if (sform.deeplinkexittext.value == '') { |
|
sform.deeplinkexittext.value = 'Exit Tool'; |
|
} |
|
frame.document.getElementById('deeplinkexitdiv').scrollIntoView(); |
|
} |
|
} |
|
break; |
|
} |
|
} |
|
} |
} |
} |
|
|
function calldeeplink(caller) { |
function calldeeplink(caller) { |
Line 1019 function draw() {
|
Line 1064 function draw() {
|
if (svalue=='no') { choicewrite(' checked="checked"'); } |
if (svalue=='no') { choicewrite(' checked="checked"'); } |
choicewrite(' /> No</label><br />'); |
choicewrite(' /> No</label><br />'); |
} |
} |
|
if (pscat=='tex') { |
|
tablestart('TeX file display'); |
|
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
|
choicewrite('<label><input name="stringval" value="tth"'+ |
|
' type="radio" '+callradiostringeval('tth')); |
|
if (svalue=='tth') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> tth (TeX to HTML)</label><br />'); |
|
choicewrite('<label><input name="stringval" value="mathjax"'+ |
|
' type="radio" '+callradiostringeval('mathjax')); |
|
if (svalue=='mathjax') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> MathJax</label><br />'); |
|
} |
if (pscat=='ip') { |
if (pscat=='ip') { |
var currallow = new Array; |
var currallow = new Array; |
var currdeny = new Array; |
var currdeny = new Array; |
if ((svalue != '') && (svalue != null)) { |
if ((svalue != '') && (typeof(svalue) != 'undefined')) { |
var patternComma = /,/; |
var patternComma = /,/; |
var patternAllow = /^([\[\]a-zA-Z\.\d\*\-]+)$/; |
var patternAllow = /^([\[\]a-zA-Z\.\d\*\-]+)$/; |
var patternDeny = /^\!([\[\]a-zA-Z\.\d\*\-]+)$/; |
var patternDeny = /^\!([\[\]a-zA-Z\.\d\*\-]+)$/; |
Line 1109 function draw() {
|
Line 1166 function draw() {
|
if (pscat=='deeplink') { |
if (pscat=='deeplink') { |
var deeplinkvals = new Array(); |
var deeplinkvals = new Array(); |
var linkprotectparts = new Array(); |
var linkprotectparts = new Array(); |
var ltikeyRegExp = /^(ltic|ltid|key):(\w+)$/; |
var ltikeyRegExp = /^(ltic:\d+|ltid:\d+|key:[a-zA-Z\d_.!@#$%^&*()+=-]+)$/; |
|
var linkexitparts = new Array(); |
|
var dlinkexitRegExp = /^(yes|url|no)(|:[^:,;'"]+)$/; |
var dlinkkeysty = 'hidden'; |
var dlinkkeysty = 'hidden'; |
var dlinkkeyval = ''; |
var dlinkkeyval = ''; |
var dlinklticdivsty = 'none'; |
var dlinklticdivsty = 'none'; |
var dlinkltiddivsty = 'none'; |
var dlinkltiddivsty = 'none'; |
var dlinkmenusdivsty = 'none'; |
var dlinkmenusdivsty = 'none'; |
if ((svalue != '') && (svalue != null)) { |
var dlinkexitdivsty = 'none'; |
|
var dlinkexittextval = ''; |
|
if ((svalue != '') && (typeof(svalue) != 'undefined')) { |
deeplinkvals = svalue.split(','); |
deeplinkvals = svalue.split(','); |
if (ltikeyRegExp.test(deeplinkvals[4])) { |
if (ltikeyRegExp.test(deeplinkvals[4])) { |
linkprotectparts = deeplinkvals[4].split(':'); |
linkprotectparts = deeplinkvals[4].split(':'); |
Line 1132 function draw() {
|
Line 1193 function draw() {
|
if (deeplinkvals[5] >= 1) { |
if (deeplinkvals[5] >= 1) { |
dlinkmenusdivsty = 'inline-block'; |
dlinkmenusdivsty = 'inline-block'; |
} |
} |
|
if (dlinkexitRegExp.test(deeplinkvals[7])) { |
|
linkexitparts = deeplinkvals[7].split(':'); |
|
deeplinkvals[7] = linkexitparts[0]; |
|
if (deeplinkvals[7] != 'no') { |
|
dlinkexitdivsty = 'inline-block'; |
|
if (!linkexitparts[1]) { |
|
dlinkexittextval = 'Exit Tool'; |
|
} else { |
|
dlinkexittextval = linkexitparts[1]; |
|
} |
|
} |
|
} |
} else { |
} else { |
deeplinkvals = ['off','unhide','full','res','','0']; |
deeplinkvals = ['off','unhide','full','res','','0','_self','no']; |
} |
} |
var deeplinkstate = new Array(); |
var deeplinkstate = new Array(); |
deeplinkstate = ['only','off','both']; |
deeplinkstate = ['only','off','both']; |
Line 1157 function draw() {
|
Line 1230 function draw() {
|
deeplinktarget = ['_self','_top']; |
deeplinktarget = ['_self','_top']; |
var deeplinktargettxt = new Array(); |
var deeplinktargettxt = new Array(); |
deeplinktargettxt = ['Embedded','Not embedded']; |
deeplinktargettxt = ['Embedded','Not embedded']; |
|
var deeplinkexit = ['yes','url','no']; |
tablestart('Deep-linked items'); |
tablestart('Deep-linked items'); |
choicewrite('<tr><td>Access status?</td><td>'); |
choicewrite('<tr><td>Access status?</td><td>'); |
choicewrite('<select name="deeplinkstate">'); |
choicewrite('<select name="deeplinkstate">'); |
Line 1212 function draw() {
|
Line 1286 function draw() {
|
choicewrite('</span><br />'); |
choicewrite('</span><br />'); |
|
|
var possmenus = new Array(); |
var possmenus = new Array(); |
if ((pextra != '') && (pextra != null)) { |
if ((pextra != '') && (typeof(pextra) != 'undefined')) { |
var lticRegExp = /^ltic_/; |
var lticRegExp = /^ltic_/; |
var ltidRegExp = /^ltid_/; |
var ltidRegExp = /^ltid_/; |
var menusRegExp = /^menus_/; |
var menusRegExp = /^menus_/; |
Line 1348 function draw() {
|
Line 1422 function draw() {
|
choicewrite('>'+deeplinktargettxt[i]+'</option>'); |
choicewrite('>'+deeplinktargettxt[i]+'</option>'); |
} |
} |
choicewrite('</select>'); |
choicewrite('</select>'); |
|
choicewrite('</td></tr>'); |
|
choicewrite('<tr><td>Exit Button?</td><td>'); |
|
choicewrite('<span style="white-space: nowrap;"><label>'); |
|
choicewrite('<input name="deeplinkexit" value="no"'+ |
|
' type="radio" '+calldeeplink('exit')); |
|
if (deeplinkvals[7]=='no') { choicewrite(' checked="checked"'); } |
|
choicewrite(' />not in use</label></span><br />'); |
|
choicewrite('<span style="white-space: nowrap;"><label>'); |
|
choicewrite('<input name="deeplinkexit" value="yes"'+ |
|
' type="radio" '+calldeeplink('exit')); |
|
if (deeplinkvals[7]=='yes') { choicewrite(' checked="checked"'); } |
|
choicewrite(' />in use, no redirect</label></span> '); |
|
choicewrite('<span style="white-space: nowrap;"><label>'); |
|
choicewrite('<input name="deeplinkexit" value="url"'+ |
|
' type="radio" '+calldeeplink('exit')); |
|
if (deeplinkvals[7]=='url') { choicewrite(' checked="checked"'); } |
|
choicewrite(' />in use, redirect to URL</label></span><br />'); |
|
choicewrite('<div id="deeplinkexitdiv" style="display:'+dlinkexitdivsty+'">'); |
|
choicewrite('<br /><span style="white-space: nowrap;">Button text: '); |
|
choicewrite('<input type="text" name="deeplinkexittext" id="deeplinkexittext" value="'+dlinkexittextval+'" size="10" />'); |
|
choicewrite('</span></div>'); |
choicewrite('</td></tr></table>'); |
choicewrite('</td></tr></table>'); |
} |
} |
} |
} |
Line 1623 function init() {
|
Line 1718 function init() {
|
else if (pscat == 'fileext') { sopt('fileext','File Extension'); } |
else if (pscat == 'fileext') { sopt('fileext','File Extension'); } |
else if (pscat == 'useslots') { sopt('useslots','Slots control access'); } |
else if (pscat == 'useslots') { sopt('useslots','Slots control access'); } |
else if (pscat == 'deeplink') { sopt('deeplink','Deep-linked items'); } |
else if (pscat == 'deeplink') { sopt('deeplink','Deep-linked items'); } |
|
else if (pscat == 'tex') { sopt('texdisplay','TeX File Display'); } |
else { pscat = 'any'; } |
else { pscat = 'any'; } |
if (pscat != 'deeplink') { sopt('any','String Value'); } |
if (pscat != 'deeplink') { sopt('any','String Value'); } |
} |
} |