version 1.72, 2015/06/09 21:22:55
|
version 1.76, 2016/03/04 21:43:15
|
Line 2557 sub display_loncaparev_constraints {
|
Line 2557 sub display_loncaparev_constraints {
|
if (grep(/^\Q$value\E$/,@{$Apache::lonrelrequtils::checkparms{$item}})) { |
if (grep(/^\Q$value\E$/,@{$Apache::lonrelrequtils::checkparms{$item}})) { |
my $stdtype = &Apache::lonparmset::standard_parameter_types($item); |
my $stdtype = &Apache::lonparmset::standard_parameter_types($item); |
$found{$item}{'valname'} = &get_param_description($stdtype,$value); |
$found{$item}{'valname'} = &get_param_description($stdtype,$value); |
$found{$item}{'rev'} = $Apache::lonnet::needsrelease{'parameter:'.$item.':'.$value.':'}; |
$found{$item}{'rev'} = $Apache::lonnet::needsrelease{'parameter:'.$item.':'.$value.'::'}; |
} |
} |
} |
} |
} |
} |
Line 2568 sub display_loncaparev_constraints {
|
Line 2568 sub display_loncaparev_constraints {
|
foreach my $valuematch (@{$Apache::lonrelrequtils::checkparmsmatch{$item}}) { |
foreach my $valuematch (@{$Apache::lonrelrequtils::checkparmsmatch{$item}}) { |
if ($value =~ /$valuematch/) { |
if ($value =~ /$valuematch/) { |
my $stdtype = &Apache::lonparmset::standard_parameter_types($item); |
my $stdtype = &Apache::lonparmset::standard_parameter_types($item); |
$found{$item}{'valname'} = &get_param_description($stdtype,$value,1); |
$found{$item}{'valname'} = &get_param_description($stdtype,$value,1); |
$found{$item}{'rev'} = |
$found{$item}{'rev'} = |
$Apache::lonnet::needsrelease{'parameter:'.$item.'::'.$valuematch}; |
$Apache::lonnet::needsrelease{'parameter:'.$item.'::'.$valuematch.':'}; |
last; |
last; |
} |
} |
} |
} |
} |
} |
} |
} |
|
foreach my $item (keys(%Apache::lonrelrequtils::checkparmnamesmatch)) { |
|
my $regexp; |
|
if ($item eq 'maplevelrecurse') { |
|
$regexp = '\.(?:sequence|page)___\(rec\)\.'; |
|
} |
|
if ($regexp ne '') { |
|
if ($key =~ /$regexp.*\.(\w+)$/) { |
|
my $name = $1; |
|
my $value = $resourcedata->{$key}; |
|
if ($name eq 'type') { |
|
last unless (($value eq 'problem') || ($value eq 'practice') || ($value eq 'exam') || |
|
($value eq 'survey') || ($value eq 'surveycred') || ($value eq 'anonsurvey') || |
|
($value eq 'anonsurveycred') || ($value eq 'randomizetry') || ($value eq 'library')); |
|
} |
|
my $stdtype = &Apache::lonparmset::standard_parameter_types($name); |
|
$found{$name}{'valname'} = &get_param_description($stdtype,$value); |
|
$found{$name}{'extra'} = &mt('Recursive into sub-folders'); |
|
$found{$name}{'rev'} = |
|
$Apache::lonnet::needsrelease{'parameter::::'.$item}; |
|
} |
|
} |
|
} |
foreach my $item (keys(%found)) { |
foreach my $item (keys(%found)) { |
my $stdname = &Apache::lonparmset::standard_parameter_names($item); |
my $stdname = &Apache::lonparmset::standard_parameter_names($item); |
my $rev = $found{$item}{'rev'}; |
my $rev = $found{$item}{'rev'}; |
my $valname = $found{$item}{'valname'}; |
my $valname = $found{$item}{'valname'}; |
|
my $extra = $found{$item}{'extra'}; |
my ($middle,$scope,$which,$level,$map,$resource); |
my ($middle,$scope,$which,$level,$map,$resource); |
my $start = $cid.'.'; |
my $start = $cid.'.'; |
if ($key =~ /^\Q$start\E(\[useropt\:($match_username\:$match_domain)\]\.)/) { |
if ($key =~ /^\Q$start\E(\[useropt\:($match_username\:$match_domain)\]\.)/) { |
Line 2594 sub display_loncaparev_constraints {
|
Line 2617 sub display_loncaparev_constraints {
|
$scope = 'all'; |
$scope = 'all'; |
} |
} |
my $what="$stdname=$valname"; |
my $what="$stdname=$valname"; |
|
if ($extra) { |
|
$what .= "<br/>$extra<br />"; |
|
} |
if ($key =~ /^\Q$start$middle\E\w+\.\Q$item\E$/) { |
if ($key =~ /^\Q$start$middle\E\w+\.\Q$item\E$/) { |
$level = 'general'; |
$level = 'general'; |
if ($scope eq 'all') { |
if ($scope eq 'all') { |
Line 2614 sub display_loncaparev_constraints {
|
Line 2640 sub display_loncaparev_constraints {
|
} |
} |
} |
} |
$rowspan{$rev} ++; |
$rowspan{$rev} ++; |
} elsif ($key =~ /^\Q$start$middle\E(.+)___\(all\).\w+\.\Q$item\E$/) { |
} elsif ($key =~ /^\Q$start$middle\E(.+)___\((all|rec)\).\w+\.\Q$item\E$/) { |
$level = 'folder'; |
$level = 'folder'; |
$map = $1; |
$map = $1; |
if ($scope eq 'all') { |
if ($scope eq 'all') { |
Line 2703 sub display_loncaparev_constraints {
|
Line 2729 sub display_loncaparev_constraints {
|
if (keys(%comm_blocks) > 0) { |
if (keys(%comm_blocks) > 0) { |
foreach my $block (keys(%comm_blocks)) { |
foreach my $block (keys(%comm_blocks)) { |
if ($block =~ /^firstaccess____(.+)$/) { |
if ($block =~ /^firstaccess____(.+)$/) { |
my $rev = $Apache::lonnet::needsrelease{'course:commblock:timer'}; |
my $rev = $Apache::lonnet::needsrelease{'course:commblock:timer:'}; |
if (ref($comm_blocks{$block}) eq 'HASH') { |
if (ref($comm_blocks{$block}) eq 'HASH') { |
push(@{$fromblocks{'timer'}{$rev}},&unescape($comm_blocks{$block}{'event'}). |
push(@{$fromblocks{'timer'}{$rev}},&unescape($comm_blocks{$block}{'event'}). |
' '.&mt('set by [_1]', |
' '.&mt('set by [_1]', |
Line 2718 sub display_loncaparev_constraints {
|
Line 2744 sub display_loncaparev_constraints {
|
if (ref($comm_blocks{$block}{'blocks'}) eq 'HASH') { |
if (ref($comm_blocks{$block}{'blocks'}) eq 'HASH') { |
if (ref($comm_blocks{$block}{'blocks'}{'docs'}) eq 'HASH') { |
if (ref($comm_blocks{$block}{'blocks'}{'docs'}) eq 'HASH') { |
if (keys(%{$comm_blocks{$block}{'blocks'}{'docs'}}) > 0) { |
if (keys(%{$comm_blocks{$block}{'blocks'}{'docs'}}) > 0) { |
my $rev = $Apache::lonnet::needsrelease{'course:commblock:docs'}; |
my $rev = $Apache::lonnet::needsrelease{'course:commblock:docs:'}; |
push(@{$fromblocks{'docs'}{$rev}},&unescape($comm_blocks{$block}{'event'}). |
push(@{$fromblocks{'docs'}{$rev}},&unescape($comm_blocks{$block}{'event'}). |
' '. |
' '. |
&mt('set by [_1]', |
&mt('set by [_1]', |
&Apache::loncommon::plainname(split(/:/,$comm_blocks{$block}{'setter'})))); |
&Apache::loncommon::plainname(split(/:/,$comm_blocks{$block}{'setter'})))); |
} |
} |
} elsif ($comm_blocks{$block}{'blocks'}{'printout'} eq 'on') { |
} elsif ($comm_blocks{$block}{'blocks'}{'printout'} eq 'on') { |
my $rev = $Apache::lonnet::needsrelease{'course:commblock:printout'}; |
my $rev = $Apache::lonnet::needsrelease{'course:commblock:printout:'}; |
push(@{$fromblocks{'printout'}{$rev}},&unescape($comm_blocks{$block}{'event'}). |
push(@{$fromblocks{'printout'}{$rev}},&unescape($comm_blocks{$block}{'event'}). |
' '. |
' '. |
&mt('set by [_1]', |
&mt('set by [_1]', |
Line 2769 sub display_loncaparev_constraints {
|
Line 2795 sub display_loncaparev_constraints {
|
|
|
if (defined($navmap)) { |
if (defined($navmap)) { |
my %anonsubms=&Apache::lonnet::dump('nohist_anonsurveys',$cdom,$cnum); |
my %anonsubms=&Apache::lonnet::dump('nohist_anonsurveys',$cdom,$cnum); |
my $rev_anonsurv=$Apache::lonnet::needsrelease{'parameter:type:anonsurvey'}; |
my $rev_anonsurv=$Apache::lonnet::needsrelease{'parameter:type:anonsurvey::'}; |
my %randtrysubms=&Apache::lonnet::dump('nohist_randomizetry',$cdom,$cnum); |
my %randtrysubms=&Apache::lonnet::dump('nohist_randomizetry',$cdom,$cnum); |
my $rev_randtry=$Apache::lonnet::needsrelease{'parameter:type:randomizetry'}; |
my $rev_randtry=$Apache::lonnet::needsrelease{'parameter:type:randomizetry::'}; |
my $stdtype=&Apache::lonparmset::standard_parameter_types('type'); |
my $stdtype=&Apache::lonparmset::standard_parameter_types('type'); |
my $stdname=&Apache::lonparmset::standard_parameter_names('type'); |
my $stdname=&Apache::lonparmset::standard_parameter_names('type'); |
my $valanon=&get_param_description($stdtype,'anonsurvey'); |
my $valanon=&get_param_description($stdtype,'anonsurvey'); |
Line 3044 sub show_contents_view {
|
Line 3070 sub show_contents_view {
|
sub releases_by_map { |
sub releases_by_map { |
my ($r,$bymap,$url,$scopeorder,$lt) = @_; |
my ($r,$bymap,$url,$scopeorder,$lt) = @_; |
return unless ((ref($bymap) eq 'HASH') && (ref($scopeorder) eq 'ARRAY')); |
return unless ((ref($bymap) eq 'HASH') && (ref($scopeorder) eq 'ARRAY')); |
|
my $newrow = 0; |
if (ref($bymap->{$url}) eq 'HASH') { |
if (ref($bymap->{$url}) eq 'HASH') { |
foreach my $rev (sort(keys(%{$bymap->{$url}}))) { |
foreach my $rev (sort(keys(%{$bymap->{$url}}))) { |
|
if ($newrow) { |
|
$r->print(&Apache::loncommon::end_data_table_row(). |
|
&Apache::loncommon::continue_data_table_row()); |
|
} |
$r->print('<td valign="middle">'.$rev.'</td><td>'); |
$r->print('<td valign="middle">'.$rev.'</td><td>'); |
if (ref($bymap->{$url}{$rev}) eq 'HASH') { |
if (ref($bymap->{$url}{$rev}) eq 'HASH') { |
$r->print('<table border="0">'); |
$r->print('<table border="0">'); |
Line 3067 sub releases_by_map {
|
Line 3098 sub releases_by_map {
|
$r->print('</table>'); |
$r->print('</table>'); |
} |
} |
$r->print('</td>'); |
$r->print('</td>'); |
|
$newrow = 1; |
} |
} |
} else { |
} else { |
$r->print('<td colspan="2"> </td>'); |
$r->print('<td colspan="2"> </td>'); |
Line 3077 sub releases_by_map {
|
Line 3109 sub releases_by_map {
|
sub get_param_description { |
sub get_param_description { |
my ($stdtype,$value,$regexp) = @_; |
my ($stdtype,$value,$regexp) = @_; |
my ($name,$parammatches,$paramstrings,@possibles); |
my ($name,$parammatches,$paramstrings,@possibles); |
$paramstrings = &Apache::lonparmset::standard_string_options($stdtype); |
if ($stdtype =~ /^string/) { |
|
$paramstrings = &Apache::lonparmset::standard_string_options($stdtype); |
|
} elsif ($stdtype eq 'date_interval') { |
|
$paramstrings = &Apache::lonparmset::standard_interval_options($stdtype); |
|
} |
if ($regexp) { |
if ($regexp) { |
$parammatches = &Apache::lonparmset::standard_string_matches($stdtype); |
if ($stdtype =~ /^string/) { |
|
$parammatches = &Apache::lonparmset::standard_string_matches($stdtype); |
|
} elsif ($stdtype eq 'date_interval') { |
|
$parammatches = &Apache::lonparmset::standard_interval_matches($stdtype); |
|
} |
if (ref($parammatches) eq 'ARRAY') { |
if (ref($parammatches) eq 'ARRAY') { |
@possibles = @{$parammatches}; |
@possibles = @{$parammatches}; |
} else { |
} else { |
Line 3092 sub get_param_description {
|
Line 3132 sub get_param_description {
|
if (ref($paramstrings) eq 'ARRAY') { |
if (ref($paramstrings) eq 'ARRAY') { |
@possibles = @{$paramstrings}; |
@possibles = @{$paramstrings}; |
} else { |
} else { |
|
if (($stdtype eq 'date_start') || ($stdtype eq 'date_end')) { |
|
if ($name == 0) { |
|
$name = &mt('Never'); |
|
} elsif (($name ne '') && ($name !~ /\D/)) { |
|
$name = &Apache::lonlocal::locallocaltime($name); |
|
} |
|
} |
return $name; |
return $name; |
} |
} |
} |
} |
Line 3945 sub print_appearance {
|
Line 3992 sub print_appearance {
|
input => 'selectbox', |
input => 'selectbox', |
options => { |
options => { |
MathJax => 'MathJax', |
MathJax => 'MathJax', |
jsMath => 'jsMath', |
|
mimetex => &mt('Convert to Images'), |
mimetex => &mt('Convert to Images'), |
tth => &mt('TeX to HTML'), |
tth => &mt('TeX to HTML'), |
}, |
}, |
order => ['MathJax','jsMath','mimetex','tth'], |
order => ['MathJax','mimetex','tth'], |
nullval => $mathdef, |
nullval => $mathdef, |
}, |
}, |
'tthoptions' => { |
'tthoptions' => { |