version 1.610, 2022/04/30 19:29:43
|
version 1.616, 2022/07/07 03:37:01
|
Line 1252 function validateParms() {
|
Line 1252 function validateParms() {
|
var dlKeyRegExp = /^deeplink_key_/; |
var dlKeyRegExp = /^deeplink_key_/; |
var dlMenusRegExp = /^deeplink_menus_/; |
var dlMenusRegExp = /^deeplink_menus_/; |
var dlCollsRegExp = /^deeplink_colls_/; |
var dlCollsRegExp = /^deeplink_colls_/; |
|
var dlTargetRegExp = /^deeplink_target_/; |
|
var dlExitRegExp = /^deeplink_exit_/; |
|
var dlExitTextRegExp = /^deeplink_exittext_/; |
var patternIP = /[\[\]\*\.a-zA-Z\d\-]+/; |
var patternIP = /[\[\]\*\.a-zA-Z\d\-]+/; |
if ((document.parmform.elements.length != 'undefined') && (document.parmform.elements.length) != 'null') { |
var numelements = document.parmform.elements.length; |
if (document.parmform.elements.length) { |
if ((typeof(numelements) != 'undefined') && (numelements != null)) { |
for (i=0; i<document.parmform.elements.length; i++) { |
if (numelements) { |
|
for (i=0; i<numelements; i++) { |
var name=document.parmform.elements[i].name; |
var name=document.parmform.elements[i].name; |
if (textRegExp.test(name)) { |
if (textRegExp.test(name)) { |
var identifier = name.replace(textRegExp,''); |
var identifier = name.replace(textRegExp,''); |
Line 1406 function validateParms() {
|
Line 1410 function validateParms() {
|
} |
} |
document.parmform.elements['set_'+identifier].value += posslinkmenu; |
document.parmform.elements['set_'+identifier].value += posslinkmenu; |
} |
} |
|
} else if (dlTargetRegExp.test(name)) { |
|
var identifier = name.replace(dlTargetRegExp,''); |
|
var idx = document.parmform.elements[i].selectedIndex; |
|
if (idx > 0) { |
|
var linktarget = document.parmform.elements[i].options[idx].value |
|
linktarget = linktarget.replace(/^\s+|\s+$/g,''); |
|
if (document.parmform.elements['set_'+identifier].value) { |
|
linktarget = ','+linktarget; |
|
} |
|
document.parmform.elements['set_'+identifier].value += linktarget; |
|
} |
|
} else if (dlExitRegExp.test(name)) { |
|
if (document.parmform.elements[i].checked) { |
|
var identifier = name.replace(dlExitRegExp,''); |
|
var posslinkexit = document.parmform.elements[i].value; |
|
posslinkexit = posslinkexit.replace(/^\s+|\s+$/g,''); |
|
if (document.parmform.elements['set_'+identifier].value) { |
|
posslinkexit = ','+posslinkexit; |
|
} |
|
document.parmform.elements['set_'+identifier].value += posslinkexit; |
|
} |
|
} else if (dlExitTextRegExp.test(name)) { |
|
var identifier = name.replace(dlExitTextRegExp,''); |
|
if ((isRadioSet('deeplink_exit_'+identifier,'yes')) || |
|
(isRadioSet('deeplink_exit_'+identifier,'url'))) { |
|
var posstext = document.parmform.elements[i].value; |
|
posstext = posstext.replace(/^\s+|\s+$/g,''); |
|
var origlength = posstext.length; |
|
posstext = posstext.replace(/[:;'",]/g,''); |
|
var newlength = posstext.length; |
|
if (newlength > 0) { |
|
var change = origlength - newlength; |
|
if (change) { |
|
alert(change+' disallowed character(s) removed from Exit Button text'); |
|
} |
|
if (posstext !== 'Exit Tool') { |
|
posstext = ':'+posstext; |
|
document.parmform.elements['set_'+identifier].value += posstext; |
|
} |
|
} else { |
|
document.parmform.elements['set_'+identifier].value = ''; |
|
if (newlength < origlength) { |
|
alert("An exit link type of 'In use' was selected but the button text value was blank, after removing disallowed characters.\nDisallowed characters are ,\":;'"); |
|
} else { |
|
alert("An exit link type of 'In use' was selected but the button text value was blank.\nPlease enter the text to use."); |
|
} |
|
return false; |
|
} |
|
} |
} |
} |
} |
} |
} |
} |
Line 1461 END
|
Line 1514 END
|
|
|
# Javascript function toggleSecret, for overview mode. |
# Javascript function toggleSecret, for overview mode. |
sub done_proctor_js { |
sub done_proctor_js { |
|
my $defaultdone = &mt('Done'); |
|
&js_escape(\$defaultdone); |
return <<"END"; |
return <<"END"; |
function toggleSecret(form,radio,key) { |
function toggleSecret(form,radio,key) { |
var radios = form[radio+key]; |
var radios = form[radio+key]; |
Line 1477 function toggleSecret(form,radio,key) {
|
Line 1532 function toggleSecret(form,radio,key) {
|
document.getElementById('done_'+key+'_proctorkey').value=''; |
document.getElementById('done_'+key+'_proctorkey').value=''; |
} |
} |
} |
} |
|
if (document.getElementById('done_'+key+'_buttontext')) { |
|
if (radios[i].value == '') { |
|
document.getElementById('done_'+key+'_buttontext').value = ''; |
|
} else { |
|
if (document.getElementById('done_'+key+'_buttontext').value == '') { |
|
document.getElementById('done_'+key+'_buttontext').value = '$defaultdone'; |
|
} |
|
} |
|
} |
} |
} |
} |
} |
} |
} |
Line 1539 function toggleDeepLink(form,item,key) {
|
Line 1603 function toggleDeepLink(form,item,key) {
|
keybox.type = 'hidden'; |
keybox.type = 'hidden'; |
} |
} |
} |
} |
|
} else if (item == 'exit') { |
|
if (document.getElementById('deeplinkdiv_'+item+'_'+key)) { |
|
if (radios[i].value == 'no') { |
|
document.getElementById('deeplinkdiv_'+item+'_'+key).style.display = 'none'; |
|
if (document.getElementById('deeplink_exittext_'+key)) { |
|
if (document.getElementById('deeplink_exittext_'+key).value != '') { |
|
document.getElementById('deeplink_exittext_'+key).value = ''; |
|
} |
|
} |
|
} else { |
|
document.getElementById('deeplinkdiv_'+item+'_'+key).style.display = 'inline-block'; |
|
if (document.getElementById('deeplink_exittext_'+key)) { |
|
if (document.getElementById('deeplink_exittext_'+key).value == '') { |
|
document.getElementById('deeplink_exittext_'+key).value = 'Exit Tool'; |
|
} |
|
} |
|
} |
|
} |
} |
} |
} |
} |
} |
} |
Line 4879 sub listdata {
|
Line 4961 sub listdata {
|
} |
} |
if ($is_map) { |
if ($is_map) { |
my $leveltitle = &mt('Folder/Map'); |
my $leveltitle = &mt('Folder/Map'); |
my $title = &Apache::lonnet::gettitle($1); |
my $title = &Apache::lonnet::gettitle($mapurl); |
if (ref($hash_for_realm) eq 'HASH') { |
if (ref($hash_for_realm) eq 'HASH') { |
if ($hash_for_realm->{$mapurl} eq '1') { |
if ($hash_for_realm->{$mapurl} eq '1') { |
$title = &mt('Main Content'); |
$title = &mt('Main Content'); |
Line 5026 sub listdata {
|
Line 5108 sub listdata {
|
sub get_date_interval_from_form { |
sub get_date_interval_from_form { |
my ($key) = @_; |
my ($key) = @_; |
my $seconds = 0; |
my $seconds = 0; |
|
my $numnotnull = 0; |
foreach my $which (['days', 86400], |
foreach my $which (['days', 86400], |
['hours', 3600], |
['hours', 3600], |
['minutes', 60], |
['minutes', 60], |
['seconds', 1]) { |
['seconds', 1]) { |
my ($name, $factor) = @{ $which }; |
my ($name, $factor) = @{ $which }; |
if (defined($env{'form.'.$name.'_'.$key})) { |
if (defined($env{'form.'.$name.'_'.$key})) { |
$seconds += $env{'form.'.$name.'_'.$key} * $factor; |
unless ($env{'form.'.$name.'_'.$key} eq '') { |
|
$numnotnull ++; |
|
$seconds += $env{'form.'.$name.'_'.$key} * $factor; |
|
} |
} |
} |
} |
} |
if (($key =~ /\.interval$/) && |
if (($key =~ /\.interval$/) && |
Line 5051 sub get_date_interval_from_form {
|
Line 5137 sub get_date_interval_from_form {
|
$seconds .= '_'.$env{'form.done_'.$key.'_proctorkey'}; |
$seconds .= '_'.$env{'form.done_'.$key.'_proctorkey'}; |
} |
} |
} |
} |
|
return if (!$numnotnull); |
return $seconds; |
return $seconds; |
} |
} |
|
|
Line 5138 sub string_ip_selector {
|
Line 5225 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 (@tables,%values,@current,%titles,%options,%optiontext,%defaults, |
%selectnull,%domlti,%crslti,@possmenus); |
%selectnull,%domlti,%crslti,@possmenus,%components); |
@components = ('state','others','listing','scope','protect','menus'); |
@tables = ('upper','lower'); |
|
%components = ( |
|
upper => ['state','others','listing','scope'], |
|
lower => ['protect','menus','target','exit'], |
|
); |
%titles = &Apache::lonlocal::texthash ( |
%titles = &Apache::lonlocal::texthash ( |
state => 'Access status', |
state => 'Access status', |
others => 'Hide other resources', |
others => 'Hide other resources', |
Line 5148 sub string_deeplink_selector {
|
Line 5239 sub string_deeplink_selector {
|
scope => 'Access scope for link', |
scope => 'Access scope for link', |
protect => 'Link protection', |
protect => 'Link protection', |
menus => 'Menu Items Displayed', |
menus => 'Menu Items Displayed', |
|
target => 'Embedded?', |
|
exit => 'Exit Tool Button?', |
); |
); |
%options = ( |
%options = ( |
state => ['only','off','both'], |
state => ['only','off','both'], |
Line 5156 sub string_deeplink_selector {
|
Line 5249 sub string_deeplink_selector {
|
scope => ['res','map','rec'], |
scope => ['res','map','rec'], |
protect => ['none','key','ltid','ltic'], |
protect => ['none','key','ltid','ltic'], |
menus => ['std','colls'], |
menus => ['std','colls'], |
|
target => ['_self','_top'], |
|
exit => ['no','yes','url'], |
); |
); |
%optiontext = &Apache::lonlocal::texthash ( |
%optiontext = &Apache::lonlocal::texthash ( |
only => 'deep only', |
only => 'deep only', |
Line 5177 sub string_deeplink_selector {
|
Line 5272 sub string_deeplink_selector {
|
ltid => 'LTI access (domain)' , |
ltid => 'LTI access (domain)' , |
std => 'Standard (all menus)', |
std => 'Standard (all menus)', |
colls => 'Numbered collection', |
colls => 'Numbered collection', |
|
_self => 'Embedded', |
|
_top => 'Not embedded', |
|
no => 'Not in use', |
|
yes => 'In use, no URL redirect', |
|
url => 'In use, redirect to URL', |
); |
); |
%selectnull = &Apache::lonlocal::texthash ( |
%selectnull = &Apache::lonlocal::texthash ( |
ltic => 'Select Launcher', |
ltic => 'Select Launcher', |
Line 5192 sub string_deeplink_selector {
|
Line 5292 sub string_deeplink_selector {
|
($values{'scope'}) = ($current[3] =~ /^(res|map|rec)$/); |
($values{'scope'}) = ($current[3] =~ /^(res|map|rec)$/); |
($values{'protect'}) = ($current[4] =~ /^(key:[a-zA-Z\d_.!\@#\$%^&*()+=-]+|ltic:\d+|ltid:\d+)$/); |
($values{'protect'}) = ($current[4] =~ /^(key:[a-zA-Z\d_.!\@#\$%^&*()+=-]+|ltic:\d+|ltid:\d+)$/); |
($values{'menus'}) = ($current[5] =~ /^(\d+)$/); |
($values{'menus'}) = ($current[5] =~ /^(\d+)$/); |
|
($values{'target'}) = ($current[6] =~ /^(_self|_top)$/); |
|
($values{'exit'}) = ($current[7] =~ /^((?:(?:yes|url)(?:|\:[^:;"',]+))|no)$/); |
} else { |
} else { |
$defaults{'state'} = 'off', |
$defaults{'state'} = 'off', |
$defaults{'others'} = 'unhide', |
$defaults{'others'} = 'unhide', |
Line 5199 sub string_deeplink_selector {
|
Line 5301 sub string_deeplink_selector {
|
$defaults{'scope'} = 'res'; |
$defaults{'scope'} = 'res'; |
$defaults{'protect'} = 'none'; |
$defaults{'protect'} = 'none'; |
$defaults{'menus'} = '0'; |
$defaults{'menus'} = '0'; |
|
$defaults{'target'} = '_top'; |
|
$defaults{'exit'} = 'yes'; |
} |
} |
my $disabled; |
my $disabled; |
if ($readonly) { |
if ($readonly) { |
Line 5229 sub string_deeplink_selector {
|
Line 5333 sub string_deeplink_selector {
|
} |
} |
} |
} |
|
|
my $output = '<input type="hidden" name="set_'.$thiskey.'" /><table><tr>'; |
my $output = '<input type="hidden" name="set_'.$thiskey.'" />'; |
foreach my $item (@components) { |
foreach my $table ('upper','lower') { |
$output .= '<th>'.$titles{$item}.'</th>'; |
next unless (ref($components{$table}) eq 'ARRAY'); |
} |
$output .= '<table width="100%"><tr>'; |
$output .= '</tr><tr>'; |
foreach my $item (@{$components{$table}}) { |
foreach my $item (@components) { |
$output .= '<th>'.$titles{$item}.'</th>'; |
$output .= '<td>'; |
} |
if (($item eq 'protect') || ($item eq 'menus')) { |
$output .= '</tr><tr>'; |
my $selected = $values{$item}; |
foreach my $item (@{$components{$table}}) { |
foreach my $option (@{$options{$item}}) { |
$output .= '<td>'; |
if ($item eq 'protect') { |
if (($item eq 'protect') || ($item eq 'menus') || ($item eq 'exit')) { |
if ($option eq 'ltid') { |
my $selected = $values{$item}; |
next unless (keys(%domlti)); |
foreach my $option (@{$options{$item}}) { |
} elsif ($option eq 'ltic') { |
if ($item eq 'protect') { |
next unless (keys(%crslti)); |
if ($option eq 'ltid') { |
} |
next unless (keys(%domlti)); |
} elsif (($item eq 'menus') && ($option eq 'colls')) { |
} elsif ($option eq 'ltic') { |
next unless (@possmenus); |
next unless (keys(%crslti)); |
} |
} |
my $checked; |
} elsif (($item eq 'menus') && ($option eq 'colls')) { |
if ($item eq 'menus') { |
next unless (@possmenus); |
if (($selected =~ /^\d+$/) && (@possmenus) && |
} |
(grep(/^\Q$selected\E$/,@possmenus))) { |
my $checked; |
if ($option eq 'colls') { |
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"'; |
$checked = ' checked="checked"'; |
} |
} |
} elsif (($option eq 'std') && ($selected == 0) && ($selected ne '')) { |
} elsif ($selected =~ /^\Q$option\E/) { |
$checked = ' checked="checked"'; |
$checked = ' checked="checked"'; |
} |
} |
} elsif ($selected =~ /^\Q$option\E/) { |
my $onclick; |
$checked = ' checked="checked"'; |
unless ($readonly) { |
} |
my $esc_key = &js_escape($thiskey); |
my $onclick; |
$onclick = ' onclick="toggleDeepLink(this.form,'."'$item','$esc_key'".');"'; |
unless ($readonly) { |
} |
my $esc_key = &js_escape($thiskey); |
$output .= '<span class="LC_nobreak"><label>'. |
$onclick = ' onclick="toggleDeepLink(this.form,'."'$item','$esc_key'".');"'; |
'<input type="radio" name="deeplink_'.$item.'_'.$thiskey.'" value="'.$option.'"'.$onclick.$disabled.$checked.' />'."\n". |
} |
$optiontext{$option}.'</label>'; |
$output .= '<span class="LC_nobreak"><label>'. |
if (($item eq 'protect') && ($option eq 'key')) { |
'<input type="radio" name="deeplink_'.$item.'_'.$thiskey.'" value="'.$option.'"'.$onclick.$disabled.$checked.' />'."\n". |
my $visibility="hidden"; |
$optiontext{$option}.'</label>'; |
my $currkey; |
if (($item eq 'protect') && ($option eq 'key')) { |
if ($checked) { |
my $visibility="hidden"; |
$visibility = "text"; |
my $currkey; |
$currkey = (split(/\:/,$values{$item}))[1]; |
if ($checked) { |
} |
$visibility = "text"; |
$output .= ' '. |
$currkey = (split(/\:/,$values{$item}))[1]; |
'<input type="'.$visibility.'" name="deeplink_'.$option.'_'.$thiskey.'" id="deeplink_'.$option.'_'.$item.'_'.$thiskey.'" value="'.$currkey.'" size="10"'.$disabled.' />'; |
} |
} elsif (($option eq 'ltic') || ($option eq 'ltid') || ($option eq 'colls')) { |
$output .= ' '. |
my $display="none"; |
'<input type="'.$visibility.'" name="deeplink_'.$option.'_'.$thiskey.'" id="deeplink_'.$option.'_'.$item.'_'.$thiskey.'" value="'.$currkey.'" size="10"'.$disabled.' />'; |
my ($current,$blankcheck,@possibles); |
} elsif (($option eq 'ltic') || ($option eq 'ltid') || ($option eq 'colls')) { |
if ($checked) { |
my $display="none"; |
$display = 'inline-block'; |
my ($current,$blankcheck,@possibles); |
if (($option eq 'ltic') || ($option eq 'ltid')) { |
if ($checked) { |
$current = (split(/\:/,$selected))[1]; |
$display = 'inline-block'; |
} else { |
if (($option eq 'ltic') || ($option eq 'ltid')) { |
$current = $selected; |
$current = (split(/\:/,$selected))[1]; |
} |
} else { |
} else { |
$current = $selected; |
$blankcheck = ' selected="selected"'; |
} |
|
} else { |
|
$blankcheck = ' selected="selected"'; |
|
} |
|
if ($option eq 'ltid') { |
|
@possibles = keys(%domlti); |
|
} elsif ($option eq 'ltic') { |
|
@possibles = keys(%crslti); |
|
} else { |
|
@possibles = @possmenus; |
|
} |
|
$output .= '<div id="deeplinkdiv_'.$option.'_'.$item.'_'.$thiskey.'"'. |
|
' style="display: '.$display.'"> <select name="'. |
|
'deeplink_'.$option.'_'.$thiskey.'"'.$disabled.'>'; |
|
if (@possibles > 1) { |
|
$output .= '<option value=""'.$blankcheck.'>'.$selectnull{$option}. |
|
'</option>'."\n"; |
|
} |
|
foreach my $poss (sort { $a <=> $b } @possibles) { |
|
my $selected; |
|
if (($poss == $current) || (scalar(@possibles) ==1)) { |
|
$selected = ' selected="selected"'; |
|
} |
} |
my $shown = $poss; |
|
if ($option eq 'ltid') { |
if ($option eq 'ltid') { |
$shown = $domlti{$poss}; |
@possibles = keys(%domlti); |
} elsif ($option eq 'ltic') { |
} elsif ($option eq 'ltic') { |
$shown = $crslti{$poss}; |
@possibles = keys(%crslti); |
|
} else { |
|
@possibles = @possmenus; |
|
} |
|
$output .= '<div id="deeplinkdiv_'.$option.'_'.$item.'_'.$thiskey.'"'. |
|
' style="display: '.$display.'"> <select name="'. |
|
'deeplink_'.$option.'_'.$thiskey.'"'.$disabled.'>'; |
|
if (@possibles > 1) { |
|
$output .= '<option value=""'.$blankcheck.'>'.$selectnull{$option}. |
|
'</option>'."\n"; |
|
} |
|
foreach my $poss (sort { $a <=> $b } @possibles) { |
|
my $selected; |
|
if (($poss == $current) || (scalar(@possibles) ==1)) { |
|
$selected = ' selected="selected"'; |
|
} |
|
my $shown = $poss; |
|
if ($option eq 'ltid') { |
|
$shown = $domlti{$poss}; |
|
} elsif ($option eq 'ltic') { |
|
$shown = $crslti{$poss}; |
|
} |
|
$output .= '<option value="'.$poss.'"'.$selected.'>'.$shown.'</option>'; |
|
} |
|
$output .= '</select></div>'; |
|
} |
|
$output .= '</span> '; |
|
} |
|
if ($item eq 'exit') { |
|
my $exitsty = 'none'; |
|
my $displayval; |
|
if ($values{$item} =~ /^(yes|url)/) { |
|
$exitsty = 'inline-block'; |
|
my $currval = (split(/\:/,$values{$item}))[1]; |
|
if ($currval eq '') { |
|
$displayval = 'Exit Tool'; |
|
} else { |
|
$displayval = $currval; |
} |
} |
$output .= '<option value="'.$poss.'"'.$selected.'>'.$shown.'</option>'; |
|
} |
} |
$output .= '</select></div>'; |
$output .= '<div id="deeplinkdiv_'.$item.'_'.$thiskey.'"'. |
} |
' style="display: '.$exitsty.'"><br />'.&mt('Button text').': '. |
$output .= '</span> '; |
'<input type="text" name="deeplink_exittext_'.$thiskey.'"'. |
} |
' id="deeplink_exittext_'.$thiskey.'" value="'.$displayval.'"'. |
} else { |
' size="10"'.$disabled.' /></div>'; |
my $selected = $values{$item}; |
|
my $defsel; |
|
if ($selected eq '') { |
|
$defsel = ' selected="selected"'; |
|
} |
|
$output .= '<select name="deeplink_'.$item.'_'.$thiskey.'"'.$disabled.'>'."\n". |
|
'<option value=""'.$defsel.'>'.&mt('Please select').'</option>'."\n"; |
|
foreach my $option (@{$options{$item}}) { |
|
$output .= '<option value="'.$option.'"'; |
|
if ($option eq $selected) { |
|
$output .= ' selected="selected"'; |
|
} |
} |
$output .= '>'.$optiontext{$option}.'</option>'; |
} else { |
} |
my $selected = $values{$item}; |
$output .= '</select>'; |
my $defsel; |
|
if ($selected eq '') { |
|
$defsel = ' selected="selected"'; |
|
} |
|
$output .= '<select name="deeplink_'.$item.'_'.$thiskey.'"'.$disabled.'>'."\n". |
|
'<option value=""'.$defsel.'>'.&mt('Please select').'</option>'."\n"; |
|
foreach my $option (@{$options{$item}}) { |
|
$output .= '<option value="'.$option.'"'; |
|
if ($option eq $selected) { |
|
$output .= ' selected="selected"'; |
|
} |
|
$output .= '>'.$optiontext{$option}.'</option>'; |
|
} |
|
$output .= '</select>'; |
|
} |
|
$output .= '</td>'; |
|
} |
|
$output .= '</tr></table>'."\n"; |
|
if ($table eq 'upper') { |
|
$output .= '<br />'; |
} |
} |
$output .= '</td>'; |
|
} |
} |
$output .= '</tr></table>'."\n"; |
|
return $output; |
return $output; |
} |
} |
|
|
Line 5380 my %strings =
|
Line 5509 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, access scope, and shown menu items']], |
=> [['on','Set choices for link protection, resource listing, access scope, shown menu items, embedding, and exit link']], |
); |
); |
|
|
|
|
Line 5391 my %stringmatches = (
|
Line 5520 my %stringmatches = (
|
=> [['_allowfrom_','[^\!]+'], |
=> [['_allowfrom_','[^\!]+'], |
['_denyfrom_','\!']], |
['_denyfrom_','\!']], |
'string_deeplink' |
'string_deeplink' |
=> [['on','^(only|off|both)\,(hide|unhide)\,(full|absent|grades|details|datestatus)\,(res|map|rec)\,(none|key\:\w+|ltic\:\d+|ltid\:\d+)\,(\d+|)$']], |
=> [['on','^(only|off|both)\,(hide|unhide)\,(full|absent|grades|details|datestatus)\,(res|map|rec)\,(none|key\:\w+|ltic\:\d+|ltid\:\d+)\,(\d+|)\,_(self|top),(yes|url|no)(|:[^:;\'",]+)$']], |
); |
); |
|
|
my %stringtypes = ( |
my %stringtypes = ( |
Line 5711 sub date_interval_selector {
|
Line 5840 sub date_interval_selector {
|
$showval %= $factor; |
$showval %= $factor; |
my %select = ((map {$_ => $_} (0..$max)), |
my %select = ((map {$_ => $_} (0..$max)), |
'select_form_order' => [0..$max]); |
'select_form_order' => [0..$max]); |
|
if ($currval eq '') { |
|
unshift(@{$select{'select_form_order'}},''); |
|
$select{''} = ''; |
|
$amount = ''; |
|
} |
$result .= &Apache::loncommon::select_form($amount,$name.'_'.$thiskey, |
$result .= &Apache::loncommon::select_form($amount,$name.'_'.$thiskey, |
\%select,'',$readonly); |
\%select,'',$readonly); |
$result .= ' '.&mt($name); |
$result .= ' '.&mt($name); |
Line 5718 sub date_interval_selector {
|
Line 5852 sub date_interval_selector {
|
if ($name eq 'interval') { |
if ($name eq 'interval') { |
unless ($skipval{'done'}) { |
unless ($skipval{'done'}) { |
my $checkedon = ''; |
my $checkedon = ''; |
|
my $checkedoff = ''; |
my $checkedproc = ''; |
my $checkedproc = ''; |
my $currproctorkey = ''; |
my $currproctorkey = ''; |
my $currprocdisplay = 'hidden'; |
my $currprocdisplay = 'hidden'; |
my $currdonetext = &mt('Done'); |
my $currdonetext = &mt('Done'); |
my $checkedoff = ' checked="checked"'; |
|
if ($currval =~ /^(?:\d+)_done$/) { |
if ($currval =~ /^(?:\d+)_done$/) { |
$checkedon = ' checked="checked"'; |
$checkedon = ' checked="checked"'; |
$checkedoff = ''; |
|
} elsif ($currval =~ /^(?:\d+)_done\:([^\:]+)\:$/) { |
} elsif ($currval =~ /^(?:\d+)_done\:([^\:]+)\:$/) { |
$currdonetext = $1; |
$currdonetext = $1; |
$checkedon = ' checked="checked"'; |
$checkedon = ' checked="checked"'; |
$checkedoff = ''; |
|
} elsif ($currval =~ /^(?:\d+)_done_proctor_(.+)$/) { |
} elsif ($currval =~ /^(?:\d+)_done_proctor_(.+)$/) { |
$currproctorkey = $1; |
$currproctorkey = $1; |
$checkedproc = ' checked="checked"'; |
$checkedproc = ' checked="checked"'; |
$checkedoff = ''; |
|
$currprocdisplay = 'text'; |
$currprocdisplay = 'text'; |
} elsif ($currval =~ /^(?:\d+)_done\:([^\:]+)\:_proctor_(.+)$/) { |
} elsif ($currval =~ /^(?:\d+)_done\:([^\:]+)\:_proctor_(.+)$/) { |
$currdonetext = $1; |
$currdonetext = $1; |
$currproctorkey = $2; |
$currproctorkey = $2; |
$checkedproc = ' checked="checked"'; |
$checkedproc = ' checked="checked"'; |
$checkedoff = ''; |
|
$currprocdisplay = 'text'; |
$currprocdisplay = 'text'; |
|
} elsif ($currval ne '') { |
|
$checkedoff = ' checked="checked"'; |
|
} else { |
|
$currdonetext = ''; |
} |
} |
my $onclick = ' onclick="toggleSecret(this.form,'."'done_','$thiskey'".');"'; |
my $onclick = ' onclick="toggleSecret(this.form,'."'done_','$thiskey'".');"'; |
my $disabled; |
my $disabled; |
Line 5757 sub date_interval_selector {
|
Line 5891 sub date_interval_selector {
|
'<input type="'.$currprocdisplay.'" id="done_'.$thiskey.'_proctorkey" '. |
'<input type="'.$currprocdisplay.'" id="done_'.$thiskey.'_proctorkey" '. |
'name="done_'.$thiskey.'_proctorkey" value="'.&HTML::Entities::encode($currproctorkey,'"<>&').'"'.$disabled.' /></span><br />'. |
'name="done_'.$thiskey.'_proctorkey" value="'.&HTML::Entities::encode($currproctorkey,'"<>&').'"'.$disabled.' /></span><br />'. |
'<span class="LC_nobreak">'.&mt('Button text').': '. |
'<span class="LC_nobreak">'.&mt('Button text').': '. |
'<input type="text" name="done_'.$thiskey.'_buttontext" value="'.&HTML::Entities::encode($currdonetext,'"<>&').'"'.$disabled.' /></span>'; |
'<input type="text" name="done_'.$thiskey.'_buttontext" id="done_'.$thiskey.'_buttontext" value="'. |
|
&HTML::Entities::encode($currdonetext,'"<>&').'"'.$disabled.' /></span>'; |
} |
} |
} |
} |
unless ($readonly) { |
unless ($readonly) { |
Line 6049 ENDOVER
|
Line 6184 ENDOVER
|
$r->print('<div>'); |
$r->print('<div>'); |
my $sortorder=$env{'form.sortorder'}; |
my $sortorder=$env{'form.sortorder'}; |
unless ($sortorder) { $sortorder='realmstudent'; } |
unless ($sortorder) { $sortorder='realmstudent'; } |
&sortmenu($r,$sortorder,'newoverview')); |
&sortmenu($r,$sortorder,'newoverview'); |
$r->print('</div></div>'); |
$r->print('</div></div>'); |
|
|
$r->print('<p><input type="submit" name="dis" value="'.&mt('Display').'" /></p>'); |
$r->print('<p><input type="submit" name="dis" value="'.&mt('Display').'" /></p>'); |