version 1.37, 2010/12/24 17:16:04
|
version 1.41, 2011/01/14 00:18:47
|
Line 268 sub handler {
|
Line 268 sub handler {
|
my %lt; |
my %lt; |
if ($crstype eq 'Community') { |
if ($crstype eq 'Community') { |
%lt = ( |
%lt = ( |
conf => 'Community Configuration', |
conf => 'Community Settings', |
edit => 'Edit Community Configuration', |
edit => 'Edit Community Settings', |
gens => 'General community settings', |
gens => 'General community settings', |
idnu => 'Community ID or number', |
idnu => 'Community ID or number', |
desc => 'Community Description', |
desc => 'Community Description', |
Line 295 sub handler {
|
Line 295 sub handler {
|
); |
); |
} else { |
} else { |
%lt = ( |
%lt = ( |
conf => 'Course Configuration', |
conf => 'Course Settings', |
edit => 'Edit Course Configuration', |
edit => 'Edit Course Settings', |
gens => 'General course settings', |
gens => 'General course settings', |
idnu => 'Course ID or number', |
idnu => 'Course ID or number', |
desc => 'Course Description', |
desc => 'Course Description', |
Line 1708 sub print_courseinfo {
|
Line 1708 sub print_courseinfo {
|
text => '<b>'.&mt($itemtext->{'cloners'}).'</b><br />'. |
text => '<b>'.&mt($itemtext->{'cloners'}).'</b><br />'. |
&mt('Owner and Coordinators included automatically'), |
&mt('Owner and Coordinators included automatically'), |
input => 'textbox', |
input => 'textbox', |
size => '40', |
size => '40' |
advanced => 1 |
|
}, |
}, |
'rolenames' => { |
'rolenames' => { |
text => '<b>'.&mt($itemtext->{'rolenames'}).'</b><br />'. |
text => '<b>'.&mt($itemtext->{'rolenames'}).'</b><br />'. |
Line 2069 sub display_loncaparev_constraints {
|
Line 2068 sub display_loncaparev_constraints {
|
my $cdom = $env{'course.'.$cid.'.domain'}; |
my $cdom = $env{'course.'.$cid.'.domain'}; |
my $cnum = $env{'course.'.$cid.'.num'}; |
my $cnum = $env{'course.'.$cid.'.num'}; |
my $output; |
my $output; |
|
my %lt = &Apache::lonlocal::texthash ( |
|
'all' => 'all', |
|
'section/group' => 'section/group', |
|
'user' => 'user', |
|
); |
my (%checkparms,%checkresponsetypes,%checkcrstypes,%anonsurvey,%randomizetry); |
my (%checkparms,%checkresponsetypes,%checkcrstypes,%anonsurvey,%randomizetry); |
&Apache::loncommon::build_release_hashes(\%checkparms,\%checkresponsetypes, |
&Apache::loncommon::build_release_hashes(\%checkparms,\%checkresponsetypes, |
\%checkcrstypes,\%anonsurvey,\%randomizetry); |
\%checkcrstypes,\%anonsurvey,\%randomizetry); |
|
|
# my %paramstrings = |
|
# ('string_questiontype' => |
|
# [[ 'anonsurveycred', 'Anonymous Survey'], |
|
# [ 'anonsurvey', 'Anonymous Survey'], |
|
# [ 'randomizetry', 'New Randomization Each N Tries']] |
|
# ); |
|
if (defined($checkcrstypes{$crstype})) { |
if (defined($checkcrstypes{$crstype})) { |
$output .= '<h4>'.&mt('Course type: [_1] requires [_2] or newer',$crstype, |
$output .= '<h4>'.&mt('Course type: [_1] requires [_2] or newer',$crstype, |
$checkcrstypes{$crstype}).'</h4>'; |
$checkcrstypes{$crstype}).'</h4>'; |
} |
} |
my (%fromparam,%rowspan,%bymap,%byresource,@scopeorder,%toshow,%allmaps, |
my (%fromparam,%rowspan,%bymap,%byresource,@scopeorder,%toshow,%allmaps, |
%byresponsetype,%bysubmission); |
%byresponsetype,%bysubmission); |
@scopeorder = ('course','section/group','user'); |
@scopeorder = ('all','section/group','user'); |
my $resourcedata = &Apache::lonparmset::readdata($cnum,$cdom); |
my $resourcedata = &Apache::lonparmset::readdata($cnum,$cdom); |
if (ref($resourcedata) eq 'HASH') { |
if (ref($resourcedata) eq 'HASH') { |
foreach my $key (keys(%{$resourcedata})) { |
foreach my $key (keys(%{$resourcedata})) { |
Line 2109 sub display_loncaparev_constraints {
|
Line 2106 sub display_loncaparev_constraints {
|
$which = $2; |
$which = $2; |
$scope = 'section/group'; |
$scope = 'section/group'; |
} else { |
} else { |
$scope = 'course'; |
$scope = 'all'; |
} |
} |
my $what="$stdname=$valname"; |
my $what="$stdname=$valname"; |
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 'course') { |
if ($scope eq 'all') { |
if (ref($fromparam{$rev}{$scope}) eq 'ARRAY') { |
if (ref($fromparam{$rev}{$scope}) eq 'ARRAY') { |
unless(grep(/^\Q$what\E$/,@{$fromparam{$rev}{$scope}})) { |
unless(grep(/^\Q$what\E$/,@{$fromparam{$rev}{$scope}})) { |
push(@{$fromparam{$rev}{$scope}},$what); |
push(@{$fromparam{$rev}{$scope}},$what); |
Line 2135 sub display_loncaparev_constraints {
|
Line 2132 sub display_loncaparev_constraints {
|
} elsif ($key =~ /^\Q$start$middle\E(.+)___\(all\).\w+\.\Q$item\E$/) { |
} elsif ($key =~ /^\Q$start$middle\E(.+)___\(all\).\w+\.\Q$item\E$/) { |
$level = 'folder'; |
$level = 'folder'; |
$map = $1; |
$map = $1; |
if ($scope eq 'course') { |
if ($scope eq 'all') { |
if (ref($bymap{$map}{$rev}{$scope}) eq 'ARRAY') { |
if (ref($bymap{$map}{$rev}{$scope}) eq 'ARRAY') { |
unless(grep(/^\Q$what\E$/,@{$bymap{$map}{$rev}{$scope}})) { |
unless(grep(/^\Q$what\E$/,@{$bymap{$map}{$rev}{$scope}})) { |
push(@{$bymap{$map}{$rev}{$scope}},$what); |
push(@{$bymap{$map}{$rev}{$scope}},$what); |
Line 2155 sub display_loncaparev_constraints {
|
Line 2152 sub display_loncaparev_constraints {
|
} elsif ($key =~ /^\Q$start$middle\E(.+)\.\w+\.\Q$item\E$/) { |
} elsif ($key =~ /^\Q$start$middle\E(.+)\.\w+\.\Q$item\E$/) { |
$level = 'resource'; |
$level = 'resource'; |
$resource = $1; |
$resource = $1; |
if ($scope eq 'course') { |
if ($scope eq 'all') { |
if (ref($byresource{$resource}{$rev}{$scope}) eq 'ARRAY') { |
if (ref($byresource{$resource}{$rev}{$scope}) eq 'ARRAY') { |
unless(grep(/^\Q$what\E$/,@{$byresource{$resource}{$rev}{$scope}})) { |
unless(grep(/^\Q$what\E$/,@{$byresource{$resource}{$rev}{$scope}})) { |
push(@{$byresource{$resource}{$rev}{$scope}},$what); |
push(@{$byresource{$resource}{$rev}{$scope}},$what); |
Line 2194 sub display_loncaparev_constraints {
|
Line 2191 sub display_loncaparev_constraints {
|
if ($newrow) { |
if ($newrow) { |
$output .= &Apache::loncommon::continue_data_table_row(); |
$output .= &Apache::loncommon::continue_data_table_row(); |
} |
} |
$output .= '<td>'.$scope.'</td>'; |
$output .= '<td>'.$lt{$scope}.'</td>'; |
foreach my $which (sort(keys(%{$fromparam{$rev}{$scope}}))) { |
foreach my $which (sort(keys(%{$fromparam{$rev}{$scope}}))) { |
$output .= '<td>'.$which.'</td><td>'. |
$output .= '<td>'.$which.'</td><td>'. |
join('<br />',@{$fromparam{$rev}{$scope}{$which}}).'</td>'; |
join('<br />',@{$fromparam{$rev}{$scope}{$which}}).'</td>'; |
Line 2205 sub display_loncaparev_constraints {
|
Line 2202 sub display_loncaparev_constraints {
|
if ($newrow) { |
if ($newrow) { |
$output .= &Apache::loncommon::continue_data_table_row(); |
$output .= &Apache::loncommon::continue_data_table_row(); |
} |
} |
$output .= '<td>'.$scope.'</td><td> </td><td>'. |
$output .= '<td>'.$lt{$scope}.'</td><td> </td><td>'. |
join('<br />',@{$fromparam{$rev}{$scope}}).'</td>'. |
join('<br />',@{$fromparam{$rev}{$scope}}).'</td>'. |
&Apache::loncommon::end_data_table_row(); |
&Apache::loncommon::end_data_table_row(); |
$newrow = 1; |
$newrow = 1; |
Line 2311 sub display_loncaparev_constraints {
|
Line 2308 sub display_loncaparev_constraints {
|
$r->print($output); |
$r->print($output); |
if (defined($navmap)) { |
if (defined($navmap)) { |
&show_contents_view($r,$navmap,$cid,\%toshow,\%bymap,\%byresource,\%bysubmission, |
&show_contents_view($r,$navmap,$cid,\%toshow,\%bymap,\%byresource,\%bysubmission, |
\%byresponsetype,\@scopeorder); |
\%byresponsetype,\@scopeorder,\%lt); |
} |
} |
$r->print('<br /><br />'); |
$r->print('<br /><br />'); |
} else { |
} else { |
Line 2324 sub display_loncaparev_constraints {
|
Line 2321 sub display_loncaparev_constraints {
|
} |
} |
|
|
sub show_contents_view { |
sub show_contents_view { |
my ($r,$navmap,$cid,$toshow,$bymap,$byresource,$bysubmission,$byresponsetype,$scopeorder) = @_; |
my ($r,$navmap,$cid,$toshow,$bymap,$byresource,$bysubmission,$byresponsetype, |
|
$scopeorder,$lt) = @_; |
if ((keys(%{$toshow}) > 0) || (keys(%{$byresource}) > 0) || |
if ((keys(%{$toshow}) > 0) || (keys(%{$byresource}) > 0) || |
(keys(%{$bysubmission}) > 0) || (keys(%{$byresponsetype}) > 0)) { |
(keys(%{$bysubmission}) > 0) || (keys(%{$byresponsetype}) > 0)) { |
my $location=&Apache::loncommon::lonhttpdurl("/adm/lonIcons"); |
my $location=&Apache::loncommon::lonhttpdurl("/adm/lonIcons"); |
Line 2338 sub show_contents_view {
|
Line 2336 sub show_contents_view {
|
&Apache::loncommon::end_data_table_header_row(). |
&Apache::loncommon::end_data_table_header_row(). |
&Apache::loncommon::start_data_table_row(). |
&Apache::loncommon::start_data_table_row(). |
'<td> '.$icon.' '.&mt('Main Course Documents').'</td>'); |
'<td> '.$icon.' '.&mt('Main Course Documents').'</td>'); |
&releases_by_map($r,$bymap,$topmap,$scopeorder); |
&releases_by_map($r,$bymap,$topmap,$scopeorder,$lt); |
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
my $it=$navmap->getIterator(undef,undef,undef,1,1,undef); |
my $it=$navmap->getIterator(undef,undef,undef,1,1,undef); |
my $curRes; |
my $curRes; |
Line 2406 sub show_contents_view {
|
Line 2404 sub show_contents_view {
|
$r->print('<table border="0">'); |
$r->print('<table border="0">'); |
foreach my $scope (@{$scopeorder}) { |
foreach my $scope (@{$scopeorder}) { |
if (ref($byresource->{$symb}{$rev}{$scope}) eq 'HASH') { |
if (ref($byresource->{$symb}{$rev}{$scope}) eq 'HASH') { |
$r->print('<tr><td>'.&mt('Setting - scope: [_1]',$scope).'</td>'); |
$r->print('<tr><td>'.&mt('Setting - scope: [_1]',$lt->{$scope}).'</td>'); |
foreach my $which (sort(keys(%{$byresource->{$symb}{$rev}{$scope}}))) { |
foreach my $which (sort(keys(%{$byresource->{$symb}{$rev}{$scope}}))) { |
$r->print('<td>'.$which.'</td><td>'. |
$r->print('<td>'.$which.'</td><td>'. |
join('<br />',@{$byresource->{$symb}{$rev}{$scope}{$which}}). |
join('<br />',@{$byresource->{$symb}{$rev}{$scope}{$which}}). |
Line 2414 sub show_contents_view {
|
Line 2412 sub show_contents_view {
|
} |
} |
$r->print('</tr>'); |
$r->print('</tr>'); |
} elsif (ref($byresource->{$symb}{$rev}{$scope}) eq 'ARRAY') { |
} elsif (ref($byresource->{$symb}{$rev}{$scope}) eq 'ARRAY') { |
$r->print('<tr><td>'.&mt('Setting - scope: [_1]',$scope).'</td>'. |
$r->print('<tr><td>'.&mt('Setting - scope: [_1]',$lt->{$scope}).'</td>'. |
'<td> </td><td>'. |
'<td> </td><td>'. |
join('<br />',@{$byresource->{$symb}{$rev}{$scope}}).'</td></tr>'); |
join('<br />',@{$byresource->{$symb}{$rev}{$scope}}).'</td></tr>'); |
} |
} |
Line 2463 sub show_contents_view {
|
Line 2461 sub show_contents_view {
|
} |
} |
|
|
sub releases_by_map { |
sub releases_by_map { |
my ($r,$bymap,$url,$scopeorder) = @_; |
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')); |
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}}))) { |
Line 2472 sub releases_by_map {
|
Line 2470 sub releases_by_map {
|
$r->print('<table border="0">'); |
$r->print('<table border="0">'); |
foreach my $scope (@{$scopeorder}) { |
foreach my $scope (@{$scopeorder}) { |
if (ref($bymap->{$url}{$rev}{$scope}) eq 'HASH') { |
if (ref($bymap->{$url}{$rev}{$scope}) eq 'HASH') { |
$r->print('<tr><td>'.&mt('Setting - scope: [_1]',$scope).'</td>'); |
$r->print('<tr><td>'.&mt('Setting - scope: [_1]',$lt->{$scope}).'</td>'); |
foreach my $which (sort(keys(%{$bymap->{$url}{$rev}{$scope}}))) { |
foreach my $which (sort(keys(%{$bymap->{$url}{$rev}{$scope}}))) { |
$r->print('<td>'.$which.'</td><td>'. |
$r->print('<td>'.$which.'</td><td>'. |
join('<br />',@{$bymap->{$url}{$rev}{$scope}{$which}}). |
join('<br />',@{$bymap->{$url}{$rev}{$scope}{$which}}). |
Line 2480 sub releases_by_map {
|
Line 2478 sub releases_by_map {
|
} |
} |
$r->print('</tr>'); |
$r->print('</tr>'); |
} elsif (ref($bymap->{$url}{$rev}{$scope}) eq 'ARRAY') { |
} elsif (ref($bymap->{$url}{$rev}{$scope}) eq 'ARRAY') { |
$r->print('<tr><td>'.&mt('Setting - scope: [_1]',$scope). |
$r->print('<tr><td>'.&mt('Setting - scope: [_1]',$lt->{$scope}). |
'</td><td> </td><td>'. |
'</td><td> </td><td>'. |
join('<br />',@{$bymap->{$url}{$rev}{$scope}}).'</td></tr>'); |
join('<br />',@{$bymap->{$url}{$rev}{$scope}}).'</td></tr>'); |
} |
} |
Line 3252 sub print_grading {
|
Line 3250 sub print_grading {
|
'64bit5' => '64bit5', |
'64bit5' => '64bit5', |
}, |
}, |
order => ['32bit','64bit','64bit2','64bit3','64bit4','64bit5'], |
order => ['32bit','64bit','64bit2','64bit3','64bit4','64bit5'], |
|
advanced => 1 |
}, |
}, |
'receiptalg' => { |
'receiptalg' => { |
text => '<b>'.&mt($itemtext->{'receiptalg'}).'</b><br />'. |
text => '<b>'.&mt($itemtext->{'receiptalg'}).'</b><br />'. |
Line 3263 sub print_grading {
|
Line 3262 sub print_grading {
|
receipt3 => 'receipt3', |
receipt3 => 'receipt3', |
}, |
}, |
order => ['receipt','receipt2','receipt3'], |
order => ['receipt','receipt2','receipt3'], |
|
advanced => 1 |
}, |
}, |
'disablesigfigs' => { |
'disablesigfigs' => { |
text => '<b>'.&mt($itemtext->{'disablesigfigs'}).'</b>', |
text => '<b>'.&mt($itemtext->{'disablesigfigs'}).'</b>', |
Line 3534 sub make_item_rows {
|
Line 3534 sub make_item_rows {
|
my $count = 0; |
my $count = 0; |
foreach my $item (@{$ordered}) { |
foreach my $item (@{$ordered}) { |
$count ++; |
$count ++; |
$datatable .= &item_table_row_start($items->{$item}{text},$count); |
if (exists $items->{$item}{advanced} && $items->{$item}{advanced} == 1) { |
|
$datatable .= &item_table_row_start($items->{$item}{text},$count,"advanced"); |
|
} else { |
|
$datatable .= &item_table_row_start($items->{$item}{text},$count); |
|
} |
if ($item eq 'nothideprivileged') { |
if ($item eq 'nothideprivileged') { |
$datatable .= ¬hidepriv_row($cdom,$item,$settings,$crstype); |
$datatable .= ¬hidepriv_row($cdom,$item,$settings,$crstype); |
} elsif ($item eq 'print_header_format') { |
} elsif ($item eq 'print_header_format') { |