version 1.600, 2021/06/12 22:06:32
|
version 1.605, 2022/03/23 16:39:47
|
Line 1245 function validateParms() {
|
Line 1245 function validateParms() {
|
var ipallowRegExp = /^setipallow_/; |
var ipallowRegExp = /^setipallow_/; |
var ipdenyRegExp = /^setipdeny_/; |
var ipdenyRegExp = /^setipdeny_/; |
var deeplinkRegExp = /^deeplink_/; |
var deeplinkRegExp = /^deeplink_/; |
var dlListScopeRegExp = /^deeplink_(listing|scope)_/; |
var dlListScopeRegExp = /^deeplink_(state|others|listing|scope)_/; |
var dlLinkUrlsRegExp = /^deeplink_urls_/; |
var dlLinkProtectRegExp = /^deeplink_protect_/; |
var dlLtiRegExp = /^deeplink_lti_/; |
var dlLtidRegExp = /^deeplink_ltid_/; |
|
var dlLticRegExp = /^deeplink_ltic_/; |
var dlKeyRegExp = /^deeplink_key_/; |
var dlKeyRegExp = /^deeplink_key_/; |
var dlMenusRegExp = /^deeplink_menus_/; |
var dlMenusRegExp = /^deeplink_menus_/; |
var dlCollsRegExp = /^deeplink_colls_/; |
var dlCollsRegExp = /^deeplink_colls_/; |
Line 1314 function validateParms() {
|
Line 1315 function validateParms() {
|
} |
} |
document.parmform.elements['set_'+identifier].value += possdeeplink; |
document.parmform.elements['set_'+identifier].value += possdeeplink; |
} |
} |
} else if (dlLinkUrlsRegExp.test(name)) { |
} else if (dlLinkProtectRegExp.test(name)) { |
if (document.parmform.elements[i].checked) { |
if (document.parmform.elements[i].checked) { |
var identifier = name.replace(dlLinkUrlsRegExp,''); |
var identifier = name.replace(dlLinkProtectRegExp,''); |
var posslinkurl = document.parmform.elements[i].value; |
var posslinkurl = document.parmform.elements[i].value; |
posslinkurl = posslinkurl.replace(/^\s+|\s+$/g,''); |
posslinkurl = posslinkurl.replace(/^\s+|\s+$/g,''); |
if (document.parmform.elements['set_'+identifier].value) { |
if (document.parmform.elements['set_'+identifier].value) { |
Line 1324 function validateParms() {
|
Line 1325 function validateParms() {
|
} |
} |
document.parmform.elements['set_'+identifier].value += posslinkurl; |
document.parmform.elements['set_'+identifier].value += posslinkurl; |
} |
} |
} else if (dlLtiRegExp.test(name)) { |
} else if (dlLtidRegExp.test(name)) { |
var identifier = name.replace(dlLtiRegExp,''); |
var identifier = name.replace(dlLtidRegExp,''); |
if (isRadioSet('deeplink_urls_'+identifier,'lti')) { |
if (isRadioSet('deeplink_protect_'+identifier,'ltid')) { |
var posslti = document.parmform.elements[i].value; |
var possltid = document.parmform.elements[i].value; |
posslti = posslti.replace(/\D+/g,''); |
possltid = possltid.replace(/\D+/g,''); |
if (posslti.length) { |
if (possltid.length) { |
if (document.parmform.elements['set_'+identifier].value) { |
if (document.parmform.elements['set_'+identifier].value) { |
posslti = ':'+posslti; |
possltid = ':'+possltid; |
} |
} |
document.parmform.elements['set_'+identifier].value += posslti; |
document.parmform.elements['set_'+identifier].value += possltid; |
} else { |
} else { |
document.parmform.elements['set_'+identifier].value = ''; |
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."); |
alert("A link type of 'domain LTI launch' was selected but no domain LTI launcher was selected.\nPlease select one, or choose a different supported link type."); |
return false; |
return false; |
} |
} |
} |
} |
|
} else if (dlLticRegExp.test(name)) { |
|
var identifier = name.replace(dlLticRegExp,''); |
|
if (isRadioSet('deeplink_protect_'+identifier,'ltic')) { |
|
var possltic = document.parmform.elements[i].value; |
|
possltic = possltic.replace(/\D+/g,''); |
|
if (possltic.length) { |
|
if (document.parmform.elements['set_'+identifier].value) { |
|
possltic = ':'+possltic; |
|
} |
|
document.parmform.elements['set_'+identifier].value += possltic; |
|
} else { |
|
document.parmform.elements['set_'+identifier].value = ''; |
|
alert("A link type of 'course LTI launch' was selected but no course LTI launcher was selected.\nPlease select one, or choose a different supported link type."); |
|
return false; |
|
} |
|
} |
} else if (dlKeyRegExp.test(name)) { |
} else if (dlKeyRegExp.test(name)) { |
var identifier = name.replace(dlKeyRegExp,''); |
var identifier = name.replace(dlKeyRegExp,''); |
if (isRadioSet('deeplink_urls_'+identifier,'key')) { |
if (isRadioSet('deeplink_protect_'+identifier,'key')) { |
var posskey = document.parmform.elements[i].value; |
var posskey = document.parmform.elements[i].value; |
posskey = posskey.replace(/^\s+|\s+$/g,''); |
posskey = posskey.replace(/^\s+|\s+$/g,''); |
var origlength = posskey.length; |
var origlength = posskey.length; |
Line 1478 function toggleDeepLink(form,item,key) {
|
Line 1495 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 divoption; |
var divoptions = new Array(); |
if (item == 'urls') { |
if (item == 'protect') { |
divoption = 'lti' |
divoptions = ['ltic','ltid']; |
} else { |
} else { |
if (item == 'menus') { |
if (item == 'menus') { |
divoption = 'colls'; |
divoptions = ['colls']; |
} |
} |
} |
} |
var seldiv; |
var seldivs = new Array(); |
if (document.getElementById('deeplinkdiv_'+divoption+'_'+item+'_'+key)) { |
if ((item == 'protect') || (item == 'menus')) { |
seldiv = document.getElementById('deeplinkdiv_'+divoption+'_'+item+'_'+key); |
for (var i=0; i<divoptions.length; i++) { |
|
if (document.getElementById('deeplinkdiv_'+divoptions[i]+'_'+item+'_'+key)) { |
|
seldivs[i] = document.getElementById('deeplinkdiv_'+divoptions[i]+'_'+item+'_'+key); |
|
} else { |
|
seldivs[i] = ''; |
|
} |
|
} |
} |
} |
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 == divoption) { |
if ((item == 'protect') || (item == 'menus')) { |
seldiv.style.display = 'inline-block'; |
for (var j=0; j<seldivs.length; j++) { |
if (item == 'urls') { |
if (radios[i].value == divoptions[j]) { |
keybox.type = 'hidden'; |
if (seldivs[j] != '') { |
keybox.value = ''; |
seldivs[j].style.display = 'inline-block'; |
} |
} |
} else { |
if (item == 'protect') { |
if (seldiv != '') { |
keybox.type = 'hidden'; |
seldiv.style.display = 'none'; |
keybox.value = ''; |
form['deeplink_'+divoption+'_'+key].selectedIndex = 0; |
} |
|
} else { |
|
if (seldivs[j] != '') { |
|
seldivs[j].style.display = 'none'; |
|
form['deeplink_'+divoptions[j]+'_'+key].selectedIndex = 0; |
|
} |
|
} |
} |
} |
if (item == 'urls') { |
if (item == 'protect') { |
if (radios[i].value == 'key') { |
if (radios[i].value == 'key') { |
keybox.type = 'text'; |
keybox.type = 'text'; |
} else { |
} else { |
Line 1704 sub print_row {
|
Line 1733 sub print_row {
|
$effparm_rec = 1; |
$effparm_rec = 1; |
} |
} |
if ($parmname eq 'deeplink') { |
if ($parmname eq 'deeplink') { |
my %posslti; |
my ($domltistr,$crsltistr); |
my %lti = |
my %lti = |
&Apache::lonnet::get_domain_lti($env{'course.'.$env{'request.course.id'}.'.domain'}, |
&Apache::lonnet::get_domain_lti($env{'course.'.$env{'request.course.id'}.'.domain'}, |
'provider'); |
'linkprot'); |
foreach my $item (keys(%lti)) { |
if (keys(%lti)) { |
if (ref($lti{$item}) eq 'HASH') { |
foreach my $item (sort { $a <=> $b } (keys(%lti))) { |
unless ($lti{$item}{'requser'}) { |
if (($item =~ /^\d+$/) && (ref($lti{$item}) eq 'HASH')) { |
$posslti{$item} = $lti{$item}{'consumer'}; |
$domltistr .= $item.':'.&escape(&escape($lti{$item}{'name'})).','; |
} |
} |
} |
} |
|
$domltistr =~ s/,$//; |
|
if ($domltistr) { |
|
$extra = 'ltid_'.$domltistr; |
|
} |
} |
} |
if (keys(%posslti)) { |
my %courselti = &Apache::lonnet::get_course_lti($cnum,$cdom); |
$extra = 'lti_'; |
if (keys(%courselti)) { |
foreach my $lti (sort { $a <=> $b } keys(%posslti)) { |
foreach my $item (sort { $a <=> $b } keys(%courselti)) { |
$extra .= $lti.':'.&escape(&escape($posslti{$lti})).','; |
if (($item =~ /^\d+$/) && (ref($courselti{$item}) eq 'HASH')) { |
|
$crsltistr .= $item.':'.&escape(&escape($courselti{$item}{'name'})).','; |
|
} |
|
} |
|
$crsltistr =~ s/,$//; |
|
if ($crsltistr) { |
|
if ($extra) { |
|
$extra .= '&'; |
|
} |
|
$extra .= 'ltic_'.$crsltistr; |
} |
} |
$extra =~ s/,$//; |
|
} |
} |
if ($env{'course.'.$env{'request.course.id'}.'.menucollections'}) { |
if ($env{'course.'.$env{'request.course.id'}.'.menucollections'}) { |
my @colls; |
my @colls; |
Line 2046 sub extractResourceInformation {
|
Line 2087 sub extractResourceInformation {
|
my $uris=shift; |
my $uris=shift; |
my $keyorder=shift; |
my $keyorder=shift; |
my $defkeytype=shift; |
my $defkeytype=shift; |
|
my $pssymb=shift; |
|
|
my $keyordercnt=100; |
my $keyordercnt=100; |
|
|
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my @allres=$navmap->retrieveResources(undef,undef,1,undef,1); |
return unless(ref($navmap)); |
|
my @allres; |
|
if ($pssymb ne '') { |
|
my $res = $navmap->getBySymb($pssymb); |
|
if (ref($res)) { |
|
@allres = ($res); |
|
} |
|
} |
|
if (!@allres) { |
|
@allres=$navmap->retrieveResources(undef,undef,1,undef,1); |
|
} |
foreach my $resource (@allres) { |
foreach my $resource (@allres) { |
my $id=$resource->id(); |
my $id=$resource->id(); |
my ($mapid,$resid)=split(/\./,$id); |
my ($mapid,$resid)=split(/\./,$id); |
Line 2174 sub isdateparm {
|
Line 2226 sub isdateparm {
|
|
|
sub is_specialstring { |
sub is_specialstring { |
my $type=shift; |
my $type=shift; |
return (($type=~/^string_/) && (($type ne 'string_yesno'))); |
return (($type=~/^string_/) && ($type ne 'string_yesno')); |
} |
} |
|
|
# Prints the HTML and Javascript to select parameters, with various shortcuts. |
# Prints the HTML and Javascript to select parameters, with various shortcuts. |
Line 3323 sub assessparms {
|
Line 3375 sub assessparms {
|
# --------------------------------------------------------- Get all assessments |
# --------------------------------------------------------- Get all assessments |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%keyorder); |
\%keyorder,undef,$pssymb); |
|
|
%allmaps_inverted = reverse(%allmaps); |
%allmaps_inverted = reverse(%allmaps); |
|
|
Line 3340 sub assessparms {
|
Line 3392 sub assessparms {
|
my $chome = $env{'course.'.$env{'request.course.id'}.'.home'}; |
my $chome = $env{'course.'.$env{'request.course.id'}.'.home'}; |
my ($got_chostname,$chostname,$cmajor,$cminor); |
my ($got_chostname,$chostname,$cmajor,$cminor); |
my $totalstored = 0; |
my $totalstored = 0; |
|
my $totalskippeduser = 0; |
my $now = time; |
my $now = time; |
for (my $i=0;$i<=$#markers;$i++) { |
for (my $i=0;$i<=$#markers;$i++) { |
my ($needsrelease,$needsnewer,$name,$namematch); |
my ($needsrelease,$needsnewer,$name,$namematch); |
Line 3348 sub assessparms {
|
Line 3401 sub assessparms {
|
} |
} |
if ($markers[$i] =~ /\&(8|7|6|5)$/) { |
if ($markers[$i] =~ /\&(8|7|6|5)$/) { |
next if ($noeditgrp); |
next if ($noeditgrp); |
|
} elsif ($markers[$i] =~ /\&(4|3|2|1)$/) { |
|
if ($uname eq '') { |
|
$totalskippeduser ++; |
|
next; |
|
} |
} |
} |
if ($markers[$i] =~ /\&(17|11|7|3)$/) { |
if ($markers[$i] =~ /\&(17|11|7|3)$/) { |
$namematch = 'maplevelrecurse'; |
$namematch = 'maplevelrecurse'; |
Line 3486 sub assessparms {
|
Line 3544 sub assessparms {
|
# ---------------------------------------------------------------- Done storing |
# ---------------------------------------------------------------- Done storing |
if ($totalstored) { |
if ($totalstored) { |
$message.='<p class="LC_warning">' |
$message.='<p class="LC_warning">' |
|
.&mt('Changes for [quant,_1,parameter] saved.',$totalstored) |
|
.'<br />' |
.&mt('Changes can take up to 10 minutes before being active for all students.') |
.&mt('Changes can take up to 10 minutes before being active for all students.') |
.&Apache::loncommon::help_open_topic('Caching') |
.&Apache::loncommon::help_open_topic('Caching') |
.'</p>'; |
.'</p>'; |
|
} else { |
|
$message.='<p class="LC_info">'.&mt('No parameter changes saved.').'</p>'; |
|
} |
|
if ($totalskippeduser) { |
|
$message .= '<p class="LC_warning">'; |
|
if ($uhome eq 'no_host') { |
|
$message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the username or ID was invalid.', |
|
$totalskippeduser); |
|
} elsif ($env{'form.userroles'} eq 'any') { |
|
$message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the user does not have a course role.', |
|
$totalskippeduser); |
|
} else { |
|
$message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the user is not a student.', |
|
$totalskippeduser); |
|
} |
|
$message .= '</p>'; |
} |
} |
} |
} |
|
|
Line 4982 sub string_ip_selector {
|
Line 5058 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, |
my (@components,%values,@current,%titles,%options,%optiontext,%defaults, |
%selectnull,%posslti,@possmenus); |
%selectnull,%domlti,%crslti,@possmenus); |
@components = ('listing','scope','urls','menus'); |
@components = ('state','others','listing','scope','protect','menus'); |
%titles = &Apache::lonlocal::texthash ( |
%titles = &Apache::lonlocal::texthash ( |
|
state => 'Access status', |
|
others => 'Hide other resources', |
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', |
protect => 'Link protection', |
menus => 'Menu Items Displayed', |
menus => 'Menu Items Displayed', |
); |
); |
%options = ( |
%options = ( |
|
state => ['only','off','both'], |
|
others => ['hide','unhide'], |
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'], |
protect => ['none','key','ltid','ltic'], |
menus => ['std','colls'], |
menus => ['std','colls'], |
); |
); |
%optiontext = &Apache::lonlocal::texthash ( |
%optiontext = &Apache::lonlocal::texthash ( |
|
only => 'deep only', |
|
off => 'deeplink off', |
|
both => 'regular + deep', |
|
hide => 'Hidden', |
|
unhide => 'Unhidden', |
full => 'Listed (linked) in both', |
full => 'Listed (linked) in both', |
absent => 'Not listed', |
absent => 'Not listed', |
grades => 'Listed in grades only', |
grades => 'Listed in grades only', |
Line 5005 sub string_deeplink_selector {
|
Line 5090 sub string_deeplink_selector {
|
res => 'resource only', |
res => 'resource only', |
map => 'enclosing map/folder', |
map => 'enclosing map/folder', |
rec => 'recursive map/folder', |
rec => 'recursive map/folder', |
any => 'regular + deep', |
none => 'not in use', |
only => 'deep only', |
key => 'key access', |
key => 'deep with key', |
ltic => 'LTI access (course)', |
lti => 'deep with LTI launch', |
ltid => 'LTI access (domain)' , |
std => 'Standard (all menus)', |
std => 'Standard (all menus)', |
colls => 'Numbered collection', |
colls => 'Numbered collection', |
); |
); |
%selectnull = &Apache::lonlocal::texthash ( |
%selectnull = &Apache::lonlocal::texthash ( |
lti => 'Select Provider', |
ltic => 'Select Launcher', |
|
ltid => 'Select Launcher', |
colls => 'Select', |
colls => 'Select', |
); |
); |
if ($showval =~ /,/) { |
if ($showval =~ /,/) { |
%values=(); |
%values=(); |
@current = split(/,/,$showval); |
@current = split(/,/,$showval); |
($values{'listing'}) = ($current[0] =~ /^(full|absent|grades|details|datestatus)$/); |
($values{'state'}) = ($current[0] =~ /^(only|off|both)$/); |
($values{'scope'}) = ($current[1] =~ /^(res|map|rec)$/); |
($values{'others'}) = ($current[1] =~ /^(hide|unhide)$/); |
($values{'urls'}) = ($current[2] =~ /^(any|only|key:[a-zA-Z\d_.!\@#\$%^&*()+=-]+|lti:\d+)$/); |
($values{'listing'}) = ($current[2] =~ /^(full|absent|grades|details|datestatus)$/); |
($values{'menus'}) = ($current[3] =~ /^(\d+)$/); |
($values{'scope'}) = ($current[3] =~ /^(res|map|rec)$/); |
|
($values{'protect'}) = ($current[4] =~ /^(key:[a-zA-Z\d_.!\@#\$%^&*()+=-]+|ltic:\d+|ltid:\d+)$/); |
|
($values{'menus'}) = ($current[5] =~ /^(\d+)$/); |
} else { |
} else { |
|
$defaults{'state'} = 'off', |
|
$defaults{'others'} = 'unhide', |
$defaults{'listing'} = 'full'; |
$defaults{'listing'} = 'full'; |
$defaults{'scope'} = 'res'; |
$defaults{'scope'} = 'res'; |
$defaults{'urls'} = 'any'; |
$defaults{'protect'} = 'none'; |
$defaults{'menus'} = '0'; |
$defaults{'menus'} = '0'; |
} |
} |
my $disabled; |
my $disabled; |
if ($readonly) { |
if ($readonly) { |
$disabled=' disabled="disabled"'; |
$disabled=' disabled="disabled"'; |
} |
} |
my %lti = |
my %courselti = |
|
&Apache::lonnet::get_course_lti($env{'course.'.$env{'request.course.id'}.'.num'}, |
|
$env{'course.'.$env{'request.course.id'}.'.domain'}); |
|
foreach my $item (keys(%courselti)) { |
|
if (ref($courselti{$item}) eq 'HASH') { |
|
$crslti{$item} = $courselti{$item}{'name'}; |
|
} |
|
} |
|
my %lti = |
&Apache::lonnet::get_domain_lti($env{'course.'.$env{'request.course.id'}.'.domain'}, |
&Apache::lonnet::get_domain_lti($env{'course.'.$env{'request.course.id'}.'.domain'}, |
'provider'); |
'linkprot'); |
foreach my $item (keys(%lti)) { |
foreach my $item (keys(%lti)) { |
if (ref($lti{$item}) eq 'HASH') { |
if (($item =~ /^\d+$/) && (ref($lti{$item}) eq 'HASH')) { |
unless ($lti{$item}{'requser'}) { |
$domlti{$item} = $lti{$item}{'name'}; |
$posslti{$item} = $lti{$item}{'consumer'}; |
|
} |
|
} |
} |
} |
} |
if ($env{'course.'.$env{'request.course.id'}.'.menucollections'}) { |
if ($env{'course.'.$env{'request.course.id'}.'.menucollections'}) { |
Line 5059 sub string_deeplink_selector {
|
Line 5155 sub string_deeplink_selector {
|
$output .= '</tr><tr>'; |
$output .= '</tr><tr>'; |
foreach my $item (@components) { |
foreach my $item (@components) { |
$output .= '<td>'; |
$output .= '<td>'; |
if (($item eq 'urls') || ($item eq 'menus')) { |
if (($item eq 'protect') || ($item eq 'menus')) { |
my $selected = $values{$item}; |
my $selected = $values{$item}; |
foreach my $option (@{$options{$item}}) { |
foreach my $option (@{$options{$item}}) { |
if (($item eq 'urls') && ($option eq 'lti')) { |
if ($item eq 'protect') { |
next unless (keys(%posslti)); |
if ($option eq 'ltid') { |
|
next unless (keys(%domlti)); |
|
} elsif ($option eq 'ltic') { |
|
next unless (keys(%crslti)); |
|
} |
} elsif (($item eq 'menus') && ($option eq 'colls')) { |
} elsif (($item eq 'menus') && ($option eq 'colls')) { |
next unless (@possmenus); |
next unless (@possmenus); |
} |
} |
Line 5088 sub string_deeplink_selector {
|
Line 5188 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 (($item eq 'urls') && ($option eq 'key')) { |
if (($item eq 'protect') && ($option eq 'key')) { |
my $visibility="hidden"; |
my $visibility="hidden"; |
my $currkey; |
my $currkey; |
if ($checked) { |
if ($checked) { |
Line 5097 sub string_deeplink_selector {
|
Line 5197 sub string_deeplink_selector {
|
} |
} |
$output .= ' '. |
$output .= ' '. |
'<input type="'.$visibility.'" name="deeplink_'.$option.'_'.$thiskey.'" id="deeplink_'.$option.'_'.$item.'_'.$thiskey.'" value="'.$currkey.'" size="10"'.$disabled.' />'; |
'<input type="'.$visibility.'" name="deeplink_'.$option.'_'.$thiskey.'" id="deeplink_'.$option.'_'.$item.'_'.$thiskey.'" value="'.$currkey.'" size="10"'.$disabled.' />'; |
} elsif (($option eq 'lti') || ($option eq 'colls')) { |
} elsif (($option eq 'ltic') || ($option eq 'ltid') || ($option eq 'colls')) { |
my $display="none"; |
my $display="none"; |
my ($current,$blankcheck,@possibles); |
my ($current,$blankcheck,@possibles); |
if ($checked) { |
if ($checked) { |
$display = 'inline-block'; |
$display = 'inline-block'; |
if ($option eq 'lti') { |
if (($option eq 'ltic') || ($option eq 'ltid')) { |
$current = (split(/\:/,$selected))[1]; |
$current = (split(/\:/,$selected))[1]; |
} else { |
} else { |
$current = $selected; |
$current = $selected; |
Line 5110 sub string_deeplink_selector {
|
Line 5210 sub string_deeplink_selector {
|
} else { |
} else { |
$blankcheck = ' selected="selected"'; |
$blankcheck = ' selected="selected"'; |
} |
} |
if ($option eq 'lti') { |
if ($option eq 'ltid') { |
@possibles = keys(%posslti); |
@possibles = keys(%domlti); |
|
} elsif ($option eq 'ltic') { |
|
@possibles = keys(%crslti); |
} else { |
} else { |
@possibles = @possmenus; |
@possibles = @possmenus; |
} |
} |
Line 5128 sub string_deeplink_selector {
|
Line 5230 sub string_deeplink_selector {
|
$selected = ' selected="selected"'; |
$selected = ' selected="selected"'; |
} |
} |
my $shown = $poss; |
my $shown = $poss; |
if ($option eq 'lti') { |
if ($option eq 'ltid') { |
$shown = $posslti{$poss}; |
$shown = $domlti{$poss}; |
|
} elsif ($option eq 'ltic') { |
|
$shown = $crslti{$poss}; |
} |
} |
$output .= '<option value="'.$poss.'"'.$selected.'>'.$shown.'</option>'; |
$output .= '<option value="'.$poss.'"'.$selected.'>'.$shown.'</option>'; |
} |
} |
Line 5206 my %stringmatches = (
|
Line 5310 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+)\,(\d+|)$']], |
=> [['on','^(only|off|both)\,(hide|unhide)\,(full|absent|grades|details|datestatus)\,(res|map|rec)\,(none|key\:\w+|ltic\:\d+|ltid\:\d+)\,(\d+|)$']], |
); |
); |
|
|
my %stringtypes = ( |
my %stringtypes = ( |
Line 5813 ENDOVER
|
Line 5917 ENDOVER
|
|
|
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%keyorder,\%defkeytype); |
\%keyorder,\%defkeytype,$pssymb); |
|
|
if (grep {$_ eq 'all'} (@psprt)) { |
if (grep {$_ eq 'all'} (@psprt)) { |
@psprt = keys(%allparts); |
@psprt = keys(%allparts); |