version 1.596, 2020/02/12 16:25:47
|
version 1.598, 2020/12/24 00:37:30
|
Line 1241 function validateParms() {
|
Line 1241 function validateParms() {
|
var tailLenient = /\.lenient$/; |
var tailLenient = /\.lenient$/; |
var patternRelWeight = /^\-?[\d.]+$/; |
var patternRelWeight = /^\-?[\d.]+$/; |
var patternLenientStd = /^(yes|no|default)$/; |
var patternLenientStd = /^(yes|no|default)$/; |
|
var ipRegExp = /^setip/; |
var ipallowRegExp = /^setipallow_/; |
var ipallowRegExp = /^setipallow_/; |
var ipdenyRegExp = /^setipdeny_/; |
var ipdenyRegExp = /^setipdeny_/; |
var deeplinkRegExp = /^deeplink_(listing|scope)_/; |
var deeplinkRegExp = /^deeplink_/; |
var deeplinkUrlsRegExp = /^deeplink_urls_/; |
var dlListScopeRegExp = /^deeplink_(listing|scope)_/; |
var deeplinkltiRegExp = /^deeplink_lti_/; |
var dlLinkUrlsRegExp = /^deeplink_urls_/; |
var deeplinkkeyRegExp = /^deeplink_key_/; |
var dlLtiRegExp = /^deeplink_lti_/; |
|
var dlKeyRegExp = /^deeplink_key_/; |
|
var dlMenusRegExp = /^deeplink_menus_/; |
|
var dlCollsRegExp = /^deeplink_colls_/; |
var patternIP = /[\[\]\*\.a-zA-Z\d\-]+/; |
var patternIP = /[\[\]\*\.a-zA-Z\d\-]+/; |
if ((document.parmform.elements.length != 'undefined') && (document.parmform.elements.length) != 'null') { |
if ((document.parmform.elements.length != 'undefined') && (document.parmform.elements.length) != 'null') { |
if (document.parmform.elements.length) { |
if (document.parmform.elements.length) { |
Line 1275 function validateParms() {
|
Line 1279 function validateParms() {
|
} |
} |
} |
} |
} |
} |
} else if (ipallowRegExp.test(name)) { |
} else if (ipRegExp.test(name)) { |
var identifier = name.replace(ipallowRegExp,''); |
if (ipallowRegExp.test(name)) { |
var possallow = document.parmform.elements[i].value; |
var identifier = name.replace(ipallowRegExp,''); |
possallow = possallow.replace(/^\s+|\s+$/g,''); |
var possallow = document.parmform.elements[i].value; |
if (patternIP.test(possallow)) { |
possallow = possallow.replace(/^\s+|\s+$/g,''); |
if (document.parmform.elements['set_'+identifier].value) { |
if (patternIP.test(possallow)) { |
possallow = ','+possallow; |
if (document.parmform.elements['set_'+identifier].value) { |
} |
possallow = ','+possallow; |
document.parmform.elements['set_'+identifier].value += possallow; |
} |
} |
document.parmform.elements['set_'+identifier].value += possallow; |
} else if (ipdenyRegExp.test(name)) { |
} |
var identifier = name.replace(ipdenyRegExp,''); |
} else if (ipdenyRegExp.test(name)) { |
var possdeny = document.parmform.elements[i].value; |
var identifier = name.replace(ipdenyRegExp,''); |
possdeny = possdeny.replace(/^\s+|\s+$/g,''); |
var possdeny = document.parmform.elements[i].value; |
if (patternIP.test(possdeny)) { |
possdeny = possdeny.replace(/^\s+|\s+$/g,''); |
possdeny = '!'+possdeny; |
if (patternIP.test(possdeny)) { |
if (document.parmform.elements['set_'+identifier].value) { |
possdeny = '!'+possdeny; |
possdeny = ','+possdeny; |
if (document.parmform.elements['set_'+identifier].value) { |
|
possdeny = ','+possdeny; |
|
} |
|
document.parmform.elements['set_'+identifier].value += possdeny; |
} |
} |
document.parmform.elements['set_'+identifier].value += possdeny; |
|
} |
} |
} else if (deeplinkRegExp.test(name)) { |
} else if (deeplinkRegExp.test(name)) { |
var identifier = name.replace(deeplinkRegExp,''); |
if (dlListScopeRegExp.test(name)) { |
var possdeeplink = document.parmform.elements[i].value; |
var identifier = name.replace(dlListScopeRegExp,''); |
possdeeplink = possdeeplink.replace(/^\s+|\s+$/g,''); |
var idx = document.parmform.elements[i].selectedIndex; |
if (document.parmform.elements['set_'+identifier].value) { |
if (idx > 0) { |
possdeeplink = ','+possdeeplink; |
var possdeeplink = document.parmform.elements[i].options[idx].value |
} |
possdeeplink = possdeeplink.replace(/^\s+|\s+$/g,''); |
document.parmform.elements['set_'+identifier].value += possdeeplink; |
if (document.parmform.elements['set_'+identifier].value) { |
} else if (deeplinkUrlsRegExp.test(name)) { |
possdeeplink = ','+possdeeplink; |
if (document.parmform.elements[i].checked) { |
} |
var identifier = name.replace(deeplinkUrlsRegExp,''); |
document.parmform.elements['set_'+identifier].value += possdeeplink; |
var posslinkurl = document.parmform.elements[i].value; |
} |
posslinkurl = posslinkurl.replace(/^\s+|\s+$/g,''); |
} else if (dlLinkUrlsRegExp.test(name)) { |
if (document.parmform.elements['set_'+identifier].value) { |
if (document.parmform.elements[i].checked) { |
posslinkurl = ','+posslinkurl; |
var identifier = name.replace(dlLinkUrlsRegExp,''); |
} |
var posslinkurl = document.parmform.elements[i].value; |
document.parmform.elements['set_'+identifier].value += posslinkurl; |
posslinkurl = posslinkurl.replace(/^\s+|\s+$/g,''); |
} |
if (document.parmform.elements['set_'+identifier].value) { |
} else if (deeplinkltiRegExp.test(name)) { |
posslinkurl = ','+posslinkurl; |
var identifier = name.replace(deeplinkltiRegExp,''); |
} |
var posslti = document.parmform.elements[i].value; |
document.parmform.elements['set_'+identifier].value += posslinkurl; |
posslti = posslti.replace(/\D+/g,''); |
} |
if (document.parmform.elements['set_'+identifier].value) { |
} else if (dlLtiRegExp.test(name)) { |
posslti = ':'+posslti; |
var identifier = name.replace(dlLtiRegExp,''); |
} |
if (isRadioSet('deeplink_urls_'+identifier,'lti')) { |
document.parmform.elements['set_'+identifier].value += posslti; |
var posslti = document.parmform.elements[i].value; |
} else if (deeplinkkeyRegExp.test(name)) { |
posslti = posslti.replace(/\D+/g,''); |
var identifier = name.replace(deeplinkkeyRegExp,''); |
if (posslti.length) { |
var posskey = document.parmform.elements[i].value; |
if (document.parmform.elements['set_'+identifier].value) { |
posskey = posskey.replace(/\W+/g,''); |
posslti = ':'+posslti; |
if (document.parmform.elements['set_'+identifier].value) { |
} |
posslti = ':'+posskey; |
document.parmform.elements['set_'+identifier].value += posslti; |
|
} else { |
|
document.parmform.elements['set_'+identifier].value = ''; |
|
alert("A link type of 'deep with LTI launch' was selected but no LTI launcher was selected.\nPlease select one, or choose a different supported link type."); |
|
return false; |
|
} |
|
} |
|
} else if (dlKeyRegExp.test(name)) { |
|
var identifier = name.replace(dlKeyRegExp,''); |
|
if (isRadioSet('deeplink_urls_'+identifier,'key')) { |
|
var posskey = document.parmform.elements[i].value; |
|
posskey = posskey.replace(/^\s+|\s+$/g,''); |
|
var origlength = posskey.length; |
|
posskey = posskey.replace(/[^a-zA-Z\d_.!@#$%^&*()+=-]/g,''); |
|
var newlength = posskey.length; |
|
if (newlength > 0) { |
|
var change = origlength - newlength; |
|
if (change) { |
|
alert(change+' disallowed character(s) removed from deeplink key'); |
|
} |
|
if (document.parmform.elements['set_'+identifier].value) { |
|
posskey = ':'+posskey; |
|
} |
|
document.parmform.elements['set_'+identifier].value += posskey; |
|
} else { |
|
document.parmform.elements['set_'+identifier].value = ''; |
|
if (newlength < origlength) { |
|
alert("A link type of 'deep with key' was selected but the key value was blank, after removing disallowed characters.\nPlease enter a key using one or more of: a-zA-Z0-9_.!@#$%^&*()+=-"); |
|
} else { |
|
alert("A link type of 'deep with key' was selected but the key value was blank.\nPlease enter a key."); |
|
} |
|
return false; |
|
} |
|
} |
|
} else if (dlMenusRegExp.test(name)) { |
|
if (document.parmform.elements[i].checked) { |
|
var identifier = name.replace(dlMenusRegExp,''); |
|
var posslinkmenu = document.parmform.elements[i].value; |
|
posslinkmenu = posslinkmenu.replace(/^\s+|\s+$/g,''); |
|
if (posslinkmenu == 'std') { |
|
posslinkmenu = '0'; |
|
if (document.parmform.elements['set_'+identifier].value) { |
|
posslinkmenu = ','+posslinkmenu; |
|
} |
|
document.parmform.elements['set_'+identifier].value += posslinkmenu; |
|
} |
|
} |
|
} else if (dlCollsRegExp.test(name)) { |
|
var identifier = name.replace(dlCollsRegExp,''); |
|
if (isRadioSet('deeplink_menus_'+identifier,'colls')) { |
|
var posslinkmenu = document.parmform.elements[i].value; |
|
if (document.parmform.elements['set_'+identifier].value) { |
|
posslinkmenu = ','+posslinkmenu; |
|
} |
|
document.parmform.elements['set_'+identifier].value += posslinkmenu; |
|
} |
} |
} |
document.parmform.elements['set_'+identifier].value += posskey; |
|
} |
} |
} |
} |
} |
} |
Line 1337 function validateParms() {
|
Line 1397 function validateParms() {
|
return true; |
return true; |
} |
} |
|
|
|
function isRadioSet(name,expected) { |
|
var menuitems = document.getElementsByName(name); |
|
var radioLength = menuitems.length; |
|
result = false; |
|
if (radioLength > 1) { |
|
for (var j=0; j<radioLength; j++) { |
|
if (menuitems[j].checked) { |
|
if (menuitems[j].value == expected) { |
|
result = true; |
|
break; |
|
} |
|
} |
|
} |
|
} |
|
return result; |
|
} |
|
|
ENDSCRIPT |
ENDSCRIPT |
} |
} |
|
|
Line 1401 function toggleDeepLink(form,item,key) {
|
Line 1478 function toggleDeepLink(form,item,key) {
|
if (document.getElementById('deeplink_key_'+item+'_'+key)) { |
if (document.getElementById('deeplink_key_'+item+'_'+key)) { |
keybox = document.getElementById('deeplink_key_'+item+'_'+key); |
keybox = document.getElementById('deeplink_key_'+item+'_'+key); |
} |
} |
var ltidiv; |
var divoption; |
if (document.getElementById('deeplinkdiv_lti_'+item+'_'+key)) { |
if (item == 'urls') { |
ltidiv = document.getElementById('deeplinkdiv_lti_'+item+'_'+key); |
divoption = 'lti' |
|
} else { |
|
if (item == 'menus') { |
|
divoption = 'colls'; |
|
} |
|
} |
|
var seldiv; |
|
if (document.getElementById('deeplinkdiv_'+divoption+'_'+item+'_'+key)) { |
|
seldiv = document.getElementById('deeplinkdiv_'+divoption+'_'+item+'_'+key); |
} |
} |
for (var i=0; i<radios.length; i++) { |
for (var i=0; i<radios.length; i++) { |
if (radios[i].checked) { |
if (radios[i].checked) { |
if (radios[i].value == 'lti') { |
if (radios[i].value == divoption) { |
ltidiv.style.display = 'inline-block'; |
seldiv.style.display = 'inline-block'; |
keybox.type = 'hidden'; |
if (item == 'urls') { |
keybox.value = ''; |
|
} else { |
|
if (ltidiv != '') { |
|
ltidiv.style.display = 'none'; |
|
form['deeplink_lti_'+key].selectedIndex = 0; |
|
} |
|
if (radios[i].value == 'key') { |
|
keybox.type = 'text'; |
|
} else { |
|
keybox.type = 'hidden'; |
keybox.type = 'hidden'; |
|
keybox.value = ''; |
|
} |
|
} else { |
|
if (seldiv != '') { |
|
seldiv.style.display = 'none'; |
|
form['deeplink_'+divoption+'_'+key].selectedIndex = 0; |
|
} |
|
if (item == 'urls') { |
|
if (radios[i].value == 'key') { |
|
keybox.type = 'text'; |
|
} else { |
|
keybox.type = 'hidden'; |
|
} |
} |
} |
} |
} |
} |
} |
Line 1629 sub print_row {
|
Line 1718 sub print_row {
|
if (keys(%posslti)) { |
if (keys(%posslti)) { |
$extra = 'lti_'; |
$extra = 'lti_'; |
foreach my $lti (sort { $a <=> $b } keys(%posslti)) { |
foreach my $lti (sort { $a <=> $b } keys(%posslti)) { |
$extra .= $lti.':'.&js_escape($posslti{$lti}).','; |
$extra .= $lti.':'.&escape(&escape($posslti{$lti})).','; |
} |
} |
$extra =~ s/,$//; |
$extra =~ s/,$//; |
} |
} |
|
if ($env{'course.'.$env{'request.course.id'}.'.menucollections'}) { |
|
my @colls; |
|
foreach my $item (split(/;/,$env{'course.'.$env{'request.course.id'}.'.menucollections'})) { |
|
my ($num,$value) = split(/\%/,$item); |
|
if ($num =~ /^\d+$/) { |
|
push(@colls,$num); |
|
} |
|
} |
|
if (@colls) { |
|
if ($extra) { |
|
$extra .= '&'; |
|
} |
|
$extra .= 'menus_'.join(',',@colls); |
|
} |
|
} |
} |
} |
if ($parmlev eq 'general') { |
if ($parmlev eq 'general') { |
if ($uname) { |
if ($uname) { |
Line 1766 sub print_row {
|
Line 1870 sub print_row {
|
# @param {boolean} $noeditgrp - true if no edit is allowed for group level parameters |
# @param {boolean} $noeditgrp - true if no edit is allowed for group level parameters |
# @param {boolean} $readonly -true if editing not allowed. |
# @param {boolean} $readonly -true if editing not allowed. |
# @param {boolean} $ismaplevel - true if level is for a map. |
# @param {boolean} $ismaplevel - true if level is for a map. |
# @param {strring} $extra - extra informatio to pass to plink. |
# @param {string} $extra - extra information to pass to plink. |
sub print_td { |
sub print_td { |
my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display, |
my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display, |
$noeditgrp,$readonly,$ismaplevel,$extra)=@_; |
$noeditgrp,$readonly,$ismaplevel,$extra)=@_; |
Line 2517 function group_or_section(caller) {
|
Line 2621 function group_or_section(caller) {
|
} |
} |
|
|
if (%grouphash) { |
if (%grouphash) { |
$groups=&mt('Group:').' <select name="cgroup"'; |
$groups=&mt('Group').': <select name="cgroup"'; |
if (%sectionhash && $env{'form.action'} eq 'settable' && $currsec eq '') { |
if (%sectionhash && $env{'form.action'} eq 'settable' && $currsec eq '') { |
$groups .= qq| onchange="group_or_section('cgroup')" |; |
$groups .= qq| onchange="group_or_section('cgroup')" |; |
} |
} |
Line 4869 sub string_ip_selector {
|
Line 4973 sub string_ip_selector {
|
|
|
sub string_deeplink_selector { |
sub string_deeplink_selector { |
my ($thiskey, $showval, $readonly) = @_; |
my ($thiskey, $showval, $readonly) = @_; |
my (@components,%values,@current,%titles,%options,%optiontext,%defaults,%posslti); |
my (@components,%values,@current,%titles,%options,%optiontext,%defaults, |
@components = ('listing','scope','urls'); |
%selectnull,%posslti,@possmenus); |
|
@components = ('listing','scope','urls','menus'); |
%titles = &Apache::lonlocal::texthash ( |
%titles = &Apache::lonlocal::texthash ( |
listing => 'In Contents and/or Gradebook', |
listing => 'In Contents and/or Gradebook', |
scope => 'Access scope for link', |
scope => 'Access scope for link', |
urls => 'Supported link types', |
urls => 'Supported link types', |
|
menus => 'Menu Items Displayed', |
); |
); |
%options = ( |
%options = ( |
listing => ['full','absent','grades','details','datestatus'], |
listing => ['full','absent','grades','details','datestatus'], |
scope => ['res','map','rec'], |
scope => ['res','map','rec'], |
urls => ['any','only','key','lti'], |
urls => ['any','only','key','lti'], |
|
menus => ['std','colls'], |
); |
); |
%optiontext = &Apache::lonlocal::texthash ( |
%optiontext = &Apache::lonlocal::texthash ( |
full => 'Listed (linked) in both', |
full => 'Listed (linked) in both', |
Line 4894 sub string_deeplink_selector {
|
Line 5001 sub string_deeplink_selector {
|
only => 'deep only', |
only => 'deep only', |
key => 'deep with key', |
key => 'deep with key', |
lti => 'deep with LTI launch', |
lti => 'deep with LTI launch', |
|
std => 'Standard (all menus)', |
|
colls => 'Numbered collection', |
|
); |
|
%selectnull = &Apache::lonlocal::texthash ( |
|
lti => 'Select Provider', |
|
colls => 'Select', |
); |
); |
if ($showval =~ /,/) { |
if ($showval =~ /,/) { |
|
%values=(); |
@current = split(/,/,$showval); |
@current = split(/,/,$showval); |
($values{'listing'}) = ($current[0] =~ /^(full|absent|grades|details|datestatus)$/); |
($values{'listing'}) = ($current[0] =~ /^(full|absent|grades|details|datestatus)$/); |
($values{'scope'}) = ($current[1] =~ /^(res|map|rec)$/); |
($values{'scope'}) = ($current[1] =~ /^(res|map|rec)$/); |
($values{'urls'}) = ($current[2] =~ /^(any|only|key:\w+|lti:\d+)$/); |
($values{'urls'}) = ($current[2] =~ /^(any|only|key:[a-zA-Z\d_.!\@#\$%^&*()+=-]+|lti:\d+)$/); |
|
($values{'menus'}) = ($current[3] =~ /^(\d+)$/); |
} else { |
} else { |
$defaults{'listing'} = 'full'; |
$defaults{'listing'} = 'full'; |
$defaults{'scope'} = 'res'; |
$defaults{'scope'} = 'res'; |
$defaults{'urls'} = 'any'; |
$defaults{'urls'} = 'any'; |
|
$defaults{'menus'} = '0'; |
} |
} |
my $disabled; |
my $disabled; |
if ($readonly) { |
if ($readonly) { |
Line 4919 sub string_deeplink_selector {
|
Line 5035 sub string_deeplink_selector {
|
} |
} |
} |
} |
} |
} |
|
if ($env{'course.'.$env{'request.course.id'}.'.menucollections'}) { |
|
foreach my $item (split(/;/,$env{'course.'.$env{'request.course.id'}.'.menucollections'})) { |
|
my ($num,$value) = split(/\%/,$item); |
|
if ($num =~ /^\d+$/) { |
|
push(@possmenus,$num); |
|
} |
|
} |
|
} |
|
|
my $output = '<input type="hidden" name="set_'.$thiskey.'" /><table><tr>'; |
my $output = '<input type="hidden" name="set_'.$thiskey.'" /><table><tr>'; |
foreach my $item ('listing','scope','urls') { |
foreach my $item (@components) { |
$output .= '<th>'.$titles{$item}.'</th>'; |
$output .= '<th>'.$titles{$item}.'</th>'; |
} |
} |
$output .= '</tr><tr>'; |
$output .= '</tr><tr>'; |
foreach my $item (@components) { |
foreach my $item (@components) { |
$output .= '<td>'; |
$output .= '<td>'; |
if ($item eq 'urls') { |
if (($item eq 'urls') || ($item eq 'menus')) { |
my $selected = $values{$item}; |
my $selected = $values{$item}; |
foreach my $option (@{$options{$item}}) { |
foreach my $option (@{$options{$item}}) { |
if ($option eq 'lti') { |
if (($item eq 'urls') && ($option eq 'lti')) { |
next unless (keys(%posslti)); |
next unless (keys(%posslti)); |
|
} elsif (($item eq 'menus') && ($option eq 'colls')) { |
|
next unless (@possmenus); |
} |
} |
my $checked; |
my $checked; |
if ($selected =~ /^\Q$option\E/) { |
if ($item eq 'menus') { |
|
if (($selected =~ /^\d+$/) && (@possmenus) && |
|
(grep(/^\Q$selected\E$/,@possmenus))) { |
|
if ($option eq 'colls') { |
|
$checked = ' checked="checked"'; |
|
} |
|
} elsif (($option eq 'std') && ($selected == 0) && ($selected ne '')) { |
|
$checked = ' checked="checked"'; |
|
} |
|
} elsif ($selected =~ /^\Q$option\E/) { |
$checked = ' checked="checked"'; |
$checked = ' checked="checked"'; |
} |
} |
my $onclick; |
my $onclick; |
Line 4944 sub string_deeplink_selector {
|
Line 5080 sub string_deeplink_selector {
|
$output .= '<span class="LC_nobreak"><label>'. |
$output .= '<span class="LC_nobreak"><label>'. |
'<input type="radio" name="deeplink_'.$item.'_'.$thiskey.'" value="'.$option.'"'.$onclick.$disabled.$checked.' />'."\n". |
'<input type="radio" name="deeplink_'.$item.'_'.$thiskey.'" value="'.$option.'"'.$onclick.$disabled.$checked.' />'."\n". |
$optiontext{$option}.'</label>'; |
$optiontext{$option}.'</label>'; |
if ($option eq 'key') { |
if (($item eq 'urls') && ($option eq 'key')) { |
my $visibility="hidden"; |
my $visibility="hidden"; |
my $currkey; |
my $currkey; |
if ($checked) { |
if ($checked) { |
Line 4952 sub string_deeplink_selector {
|
Line 5088 sub string_deeplink_selector {
|
$currkey = (split(/\:/,$values{$item}))[1]; |
$currkey = (split(/\:/,$values{$item}))[1]; |
} |
} |
$output .= ' '. |
$output .= ' '. |
'<input type="'.$visibility.'" name="deeplink_'.$option.'_'.$thiskey.'" id="deeplink_'.$option.'_'.$item.'_'.$thiskey.'" value="'.$currkey.'" size="6"'.$disabled.' />'; |
'<input type="'.$visibility.'" name="deeplink_'.$option.'_'.$thiskey.'" id="deeplink_'.$option.'_'.$item.'_'.$thiskey.'" value="'.$currkey.'" size="10"'.$disabled.' />'; |
} elsif ($option eq 'lti') { |
} elsif (($option eq 'lti') || ($option eq 'colls')) { |
my $display="none"; |
my $display="none"; |
my ($currlti,$blankcheck); |
my ($current,$blankcheck,@possibles); |
if ($checked) { |
if ($checked) { |
$display = 'inline-block'; |
$display = 'inline-block'; |
$currlti = (split(/\:/,$values{$item}))[1]; |
if ($option eq 'lti') { |
|
$current = (split(/\:/,$selected))[1]; |
|
} else { |
|
$current = $selected; |
|
} |
} else { |
} else { |
$blankcheck = ' selected="selected"'; |
$blankcheck = ' selected="selected"'; |
} |
} |
|
if ($option eq 'lti') { |
|
@possibles = keys(%posslti); |
|
} else { |
|
@possibles = @possmenus; |
|
} |
$output .= '<div id="deeplinkdiv_'.$option.'_'.$item.'_'.$thiskey.'"'. |
$output .= '<div id="deeplinkdiv_'.$option.'_'.$item.'_'.$thiskey.'"'. |
' style="display: '.$display.'"> <select name="'. |
' style="display: '.$display.'"> <select name="'. |
'deeplink_'.$option.'_'.$thiskey.'"'.$disabled.'>'. |
'deeplink_'.$option.'_'.$thiskey.'"'.$disabled.'>'; |
'<option value=""'.$blankcheck.'>'.&mt('Select Provider').'</option>'."\n"; |
if (@possibles > 1) { |
foreach my $lti (sort { $a <=> $b } keys(%posslti)) { |
$output .= '<option value=""'.$blankcheck.'>'.$selectnull{$option}. |
|
'</option>'."\n"; |
|
} |
|
foreach my $poss (sort { $a <=> $b } @possibles) { |
my $selected; |
my $selected; |
if ($lti == $currlti) { |
if (($poss == $current) || (scalar(@possibles) ==1)) { |
$selected = ' selected="selected"'; |
$selected = ' selected="selected"'; |
} |
} |
$output .= '<option value="'.$lti.'"'.$selected.'>'.$posslti{$lti}.'</option>'; |
my $shown = $poss; |
|
if ($option eq 'lti') { |
|
$shown = $posslti{$poss}; |
|
} |
|
$output .= '<option value="'.$poss.'"'.$selected.'>'.$shown.'</option>'; |
} |
} |
$output .= '</select></div>'; |
$output .= '</select></div>'; |
} |
} |
Line 5035 my %strings =
|
Line 5187 my %strings =
|
=> [['_allowfrom_','Hostname(s), or IP(s) from which access is allowed'], |
=> [['_allowfrom_','Hostname(s), or IP(s) from which access is allowed'], |
['_denyfrom_','Hostname(s) or IP(s) from which access is disallowed']], |
['_denyfrom_','Hostname(s) or IP(s) from which access is disallowed']], |
'string_deeplink' |
'string_deeplink' |
=> [['on','Set choices for link protection, resource listing, and access scope']], |
=> [['on','Set choices for link protection, resource listing, access scope, and shown menu items']], |
); |
); |
|
|
|
|
Line 5046 my %stringmatches = (
|
Line 5198 my %stringmatches = (
|
=> [['_allowfrom_','[^\!]+'], |
=> [['_allowfrom_','[^\!]+'], |
['_denyfrom_','\!']], |
['_denyfrom_','\!']], |
'string_deeplink' |
'string_deeplink' |
=> [['on','^(full|absent|grades|details|datestatus)\,(res|map|rec)\,(any|only|key\:\w+|lti\:\d+)$']], |
=> [['on','^(full|absent|grades|details|datestatus)\,(res|map|rec)\,(any|only|key\:\w+|lti\:\d+)\,(\d+|)$']], |
); |
); |
|
|
my %stringtypes = ( |
my %stringtypes = ( |