--- rat/client/parameter.html 2020/06/03 12:58:32 1.83 +++ rat/client/parameter.html 2020/10/29 23:24:13 1.84 @@ -5,7 +5,7 @@ The LearningOnline Network with CAPA Parameter Input Window // -// $Id: parameter.html,v 1.83 2020/06/03 12:58:32 raeburn Exp $ +// $Id: parameter.html,v 1.84 2020/10/29 23:24:13 raeburn Exp $ // // Copyright Michigan State University Board of Trustees // @@ -402,7 +402,7 @@ function validateInterval() { if (sform.donebutton[i].value == '_done_proctor') { if ((sform.donebutton_proctorkey.value == '') || (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; } } @@ -417,6 +417,8 @@ function validateDeepLink() { var sform=choices.document.forms.sch; svalue = sform.deeplinklisted.options[sform.deeplinklisted.selectedIndex].value+','; svalue += sform.deeplinkacc.options[sform.deeplinkacc.selectedIndex].value+','; + var keyRegExp = /^[a-zA-Z\d_.!@#$%^&*()+=-]+$/; + var numRegExp = /^\d+$/; if (sform.deeplinktypes.length) { for (var i=0; i 0)) { 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 0)) { + svalue += posscoll; + } else { + alert("Please select either a numbered collection or check 'Standard (all menus)'."); + return; } } break; @@ -441,9 +468,9 @@ function validateDeepLink() { assemble(); } -function toggleDeepLink() { +function toggleDeepLink(caller) { var sform=choices.document.forms.sch; - if (sform.deeplinktypes.length) { + if ((caller == 'types') && (sform.deeplinktypes.length)) { var frame = window.frames["choices"]; for (var i=0; i= 1) { + dlinkmenusdivsty = 'inline-block'; + } } else { - deeplinkvals = ['full','res','any']; + deeplinkvals = ['full','res','any','0']; } var deeplinklisting = new Array(); deeplinklisting = ['full','absent','grades','details','datestatus']; @@ -1155,7 +1201,7 @@ function draw() { var deeplinkurls = new Array(); deeplinkurls = ['any','only','key','lti']; tablestart('Deep-linked items'); - choicewrite('In Contents or Gradebook?'); + choicewrite('In Contents + Gradebook?'); choicewrite(''); for (var i=0; iSupported Link Types'); choicewrite(''); choicewrite(' regular + deep'); choicewrite(''); choicewrite(' deep only'); choicewrite(''); choicewrite(' deep with key'); - choicewrite(''); + choicewrite(''); choicewrite(''); + + var possmenus = new Array(); if ((pextra != '') && (pextra != null)) { var ltiRegExp = /^lti_/; - if (ltiRegExp.test(pextra)) { - pextra = pextra.replace(ltiRegExp,''); - var posslti = pextra.split(','); - if (posslti.length >= 1) { - var ltinums = new Array(); - var ltititles = new Array(); - for (var i=0; i'); - choicewrite(' deep with LTI launch'); - choicewrite(''); - choicewrite(''); - var sel=''; - if (deeplinkvals[2]!='lti') { - sel = ' selected="selected"'; + var menusRegExp = /^menus_/; + var extras = pextra.split('&'); + for (var i=0; i= 1) { + var ltinums = new Array(); + var ltititles = new Array(); + for (var j=0; j 1) { - choicewrite('Please select'); - } - for (var i=0; i'); + choicewrite(' deep with LTI launch'); + choicewrite(''); + choicewrite(''); + var sel=''; + if (deeplinkvals[2]!='lti') { + sel = ' selected="selected"'; + } + if (ltinums.length > 1) { + choicewrite('Select'); + } + for (var j=0; j'+ltititles[j]+''); } - choicewrite(''+ltititles[i]+''); + choicewrite(''); } - choicewrite(''); } + } else if (menusRegExp.test(extras[i])) { + extras[i] = extras[i].replace(menusRegExp,''); + possmenus = extras[i].split(','); } } } + choicewrite('Menu Items Displayed'); + choicewrite(''); + choicewrite(' Standard (all menus)'); + if (possmenus.length >= 1) { + choicewrite(''); + choicewrite(' 0) { choicewrite(' checked="checked"'); } + choicewrite(' /> Numbered collection'); + choicewrite(''); + choicewrite(''); + var sel=''; + if (deeplinkvals[3] == 0) { + sel = ' selected="selected"'; + } + if (possmenus.length > 1) { + choicewrite('Select'); + } + for (var i=0; i'+possmenus[i]+''); + } + choicewrite(''); + } choicewrite(''); } } @@ -1628,6 +1715,9 @@ function init() { selwrite('