version 1.64.2.5.2.1, 2022/01/04 04:59:04
|
version 1.64.2.5.2.3, 2022/07/08 16:38:03
|
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 471 function validateDeepLink() {
|
Line 472 function validateDeepLink() {
|
} |
} |
} |
} |
} |
} |
|
svalue += ','; |
|
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 520 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 1020 function draw() {
|
Line 1067 function draw() {
|
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 1107 function draw() {
|
Line 1154 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 1130 function draw() {
|
Line 1181 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 1151 function draw() {
|
Line 1214 function draw() {
|
deeplinkscopetxt = ['resource only','enclosing map/folder','recursive map/folder']; |
deeplinkscopetxt = ['resource only','enclosing map/folder','recursive map/folder']; |
var deeplinkprotect = new Array(); |
var deeplinkprotect = new Array(); |
deeplinkprotect = ['none','key','ltic','ltid']; |
deeplinkprotect = ['none','key','ltic','ltid']; |
|
var deeplinktarget = new Array(); |
|
deeplinktarget = ['_self','_top']; |
|
var deeplinktargettxt = new Array(); |
|
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 1206 function draw() {
|
Line 1274 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 1331 function draw() {
|
Line 1399 function draw() {
|
} |
} |
choicewrite('</select></div></span><br />'); |
choicewrite('</select></div></span><br />'); |
} |
} |
|
choicewrite('</td></tr>'); |
|
choicewrite('<tr><td>Embedded?</td><td>'); |
|
choicewrite('<select name="deeplinktarget">'); |
|
for (var i=0; i<deeplinktarget.length; i++) { |
|
choicewrite('<option value="'+deeplinktarget[i]+'"'); |
|
if (deeplinkvals[6] == deeplinktarget[i]) { |
|
choicewrite(' selected="selected"'); |
|
} |
|
choicewrite('>'+deeplinktargettxt[i]+'</option>'); |
|
} |
|
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>'); |
} |
} |
} |
} |