version 1.28.2.7, 2010/12/24 17:51:16
|
version 1.41, 2011/01/14 00:18:47
|
Line 215 use Apache::lonnet;
|
Line 215 use Apache::lonnet;
|
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonconfigsettings; |
use Apache::lonconfigsettings; |
|
use Apache::lonparmset; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
|
Line 267 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 294 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 338 sub handler {
|
Line 339 sub handler {
|
|
|
if ($phase eq 'releaseinfo') { |
if ($phase eq 'releaseinfo') { |
my $loncaparev = $env{'course.'.$cid.'.internal.releaserequired'}; |
my $loncaparev = $env{'course.'.$cid.'.internal.releaserequired'}; |
if ($loncaparev) { |
if ($loncaparev) { |
&display_loncaparev_constraints($r,$navmap,$loncaparev,$crstype); |
&display_loncaparev_constraints($r,$navmap,$loncaparev,$crstype); |
return OK; |
return OK; |
} |
} |
Line 353 sub handler {
|
Line 354 sub handler {
|
'courseinfo' => |
'courseinfo' => |
{ text => $lt{'gens'}, |
{ text => $lt{'gens'}, |
help => 'Course_Environment', |
help => 'Course_Environment', |
header => [{col1 => 'Setting', |
|
col2 => 'Value'}], |
|
ordered => ['owner','co-owners','loncaparev','description', |
ordered => ['owner','co-owners','loncaparev','description', |
'courseid','categories','hidefromcat', |
'courseid','categories','hidefromcat', |
'externalsyllabus','cloners','url','rolenames'], |
'externalsyllabus','cloners','url','rolenames'], |
Line 375 sub handler {
|
Line 374 sub handler {
|
'localization' => |
'localization' => |
{ text => 'Language and Time Localization', |
{ text => 'Language and Time Localization', |
help => 'Course_Environment', |
help => 'Course_Environment', |
header => [{col1 => 'Setting', |
|
col2 => 'Value',}], |
|
ordered => ['languages','timezone','datelocale'], |
ordered => ['languages','timezone','datelocale'], |
itemtext => { |
itemtext => { |
languages => 'Languages used', |
languages => 'Languages used', |
Line 388 sub handler {
|
Line 385 sub handler {
|
{ text => 'Feedback messages', |
{ text => 'Feedback messages', |
help => 'Course_Environment', |
help => 'Course_Environment', |
header => [{col1 => 'Questions about:', |
header => [{col1 => 'Questions about:', |
col2 => 'Recipients'}, |
col2 => 'Recipients'}], |
{col1 => 'Questions about:', |
|
col2 => 'Custom Text'}], |
|
ordered => ['question.email','comment.email','policy.email'], |
ordered => ['question.email','comment.email','policy.email'], |
itemtext => { |
itemtext => { |
'question.email' => 'Resource Content', |
'question.email' => 'Resource Content', |
Line 439 sub handler {
|
Line 434 sub handler {
|
'appearance' => |
'appearance' => |
{ text => 'Display of resources ', |
{ text => 'Display of resources ', |
help => 'Course_Environment', |
help => 'Course_Environment', |
header => [{col1 => 'Setting', |
|
col2 => 'Value',}], |
|
ordered => ['default_xml_style','pageseparators', |
ordered => ['default_xml_style','pageseparators', |
'disable_receipt_display','texengine', |
'disable_receipt_display','texengine', |
'tthoptions'], |
'tthoptions'], |
Line 455 sub handler {
|
Line 448 sub handler {
|
'grading' => |
'grading' => |
{ text => 'Grading', |
{ text => 'Grading', |
help => 'Course_Environment', |
help => 'Course_Environment', |
header => [{col1 => 'Setting', |
|
col2 => 'Value',}], |
|
ordered => ['grading','rndseed', |
ordered => ['grading','rndseed', |
'receiptalg','disablesigfigs'], |
'receiptalg','disablesigfigs'], |
itemtext => { |
itemtext => { |
Line 470 sub handler {
|
Line 461 sub handler {
|
'printouts' => |
'printouts' => |
{ text => 'Printout generation', |
{ text => 'Printout generation', |
help => 'Course_Environment', |
help => 'Course_Environment', |
header => [{col1 => 'Setting', |
|
col2 => 'Value',}], |
|
ordered => ['problem_stream_switch','suppress_tries', |
ordered => ['problem_stream_switch','suppress_tries', |
'default_paper_size','print_header_format', |
'default_paper_size','print_header_format', |
'disableexampointprint','canuse_pdfforms'], |
'disableexampointprint','canuse_pdfforms'], |
Line 487 sub handler {
|
Line 476 sub handler {
|
'spreadsheet' => |
'spreadsheet' => |
{ text => 'Spreadsheets', |
{ text => 'Spreadsheets', |
help => 'Course_Environment', |
help => 'Course_Environment', |
header => [{col1 => 'Setting', |
|
col2 => 'Value'}], |
|
ordered => ['spreadsheet_default_classcalc', |
ordered => ['spreadsheet_default_classcalc', |
'spreadsheet_default_studentcalc', |
'spreadsheet_default_studentcalc', |
'spreadsheet_default_assesscalc','hideemptyrows'], |
'spreadsheet_default_assesscalc','hideemptyrows'], |
Line 502 sub handler {
|
Line 489 sub handler {
|
'bridgetasks' => |
'bridgetasks' => |
{ text => 'Bridge tasks', |
{ text => 'Bridge tasks', |
help => 'Course_Environment', |
help => 'Course_Environment', |
header => [{col1 => 'Setting', |
|
col2 => 'Value'}], |
|
ordered => ['task_messages','task_grading', |
ordered => ['task_messages','task_grading', |
'suppress_embed_prompt'], |
'suppress_embed_prompt'], |
itemtext => { |
itemtext => { |
Line 559 sub print_config_box {
|
Line 544 sub print_config_box {
|
my $itemtext = $item->{'itemtext'}; |
my $itemtext = $item->{'itemtext'}; |
my $rowtotal = 0; |
my $rowtotal = 0; |
my $output = |
my $output = |
'<table class="LC_nested_outer"> |
'<h3><a href="#">'.&mt($item->{text}).'</a></h3> |
<tr> |
<div> <span style="float:right">'. |
<th align="left" valign="middle"><span class="LC_nobreak" style="font-size: larger;" >'. |
&Apache::loncommon::help_open_topic($item->{'help'}).'</span>'; |
&mt($item->{text}).' '. |
|
&Apache::loncommon::help_open_topic($item->{'help'}).'</span></th>'."\n". |
|
'</tr>'; |
|
if (($action eq 'feedback') || ($action eq 'classlists')) { |
if (($action eq 'feedback') || ($action eq 'classlists')) { |
$output .= ' |
$output .= ' |
<tr> |
<table class="LC_nested">'; |
<td> |
|
<table class="LC_nested">'; |
|
if (exists $item->{'header'}->[0]->{'col1'} || |
if (exists $item->{'header'}->[0]->{'col1'} || |
exists $item->{'header'}->[0]->{'col2'}) { |
exists $item->{'header'}->[0]->{'col2'}) { |
$output .= ' |
$output .= ' |
Line 586 sub print_config_box {
|
Line 566 sub print_config_box {
|
} |
} |
$output .= ' |
$output .= ' |
</table> |
</table> |
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
<table class="LC_nested"> |
<table class="LC_nested"> |
<tr class="LC_info_row"> |
<tr class="LC_info_row"> |
<td class="LC_left_item">'.&mt($item->{'header'}->[1]->{'col1'}).'</td>'; |
<td class="LC_left_item">'.&mt($item->{'header'}->[1]->{'col1'}).'</td>'; |
Line 600 sub print_config_box {
|
Line 576 sub print_config_box {
|
$output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype). |
$output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype). |
' |
' |
</table> |
</table> |
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
<table class="LC_nested">'; |
<table class="LC_nested">'; |
if (exists $item->{'header'}->[0]->{'col1'} || |
if (exists $item->{'header'}->[0]->{'col1'} || |
exists $item->{'header'}->[0]->{'col2'}) { |
exists $item->{'header'}->[0]->{'col2'}) { |
Line 612 sub print_config_box {
|
Line 584 sub print_config_box {
|
<td class="LC_left_item">'.&mt($item->{'header'}->[0]->{'col1'}).'</td> |
<td class="LC_left_item">'.&mt($item->{'header'}->[0]->{'col1'}).'</td> |
<td class="LC_right_item">'.&mt($item->{'header'}->[0]->{'col2'}).'</td> |
<td class="LC_right_item">'.&mt($item->{'header'}->[0]->{'col2'}).'</td> |
</tr>'; |
</tr>'; |
} |
} |
} |
} |
} else { |
} else { |
$output .= ' |
$output .= ' |
<tr> |
|
<td> |
|
<table class="LC_nested">'; |
<table class="LC_nested">'; |
if (exists $item->{'header'}->[0]->{'col1'} || |
if (exists $item->{'header'}->[0]->{'col1'} || |
exists $item->{'header'}->[0]->{'col2'}) { |
exists $item->{'header'}->[0]->{'col2'}) { |
Line 654 sub print_config_box {
|
Line 624 sub print_config_box {
|
} |
} |
$output .= ' |
$output .= ' |
</table> |
</table> |
</td> |
</div>'; |
</tr> |
|
</table><br />'; |
|
return ($output,$rowtotal); |
return ($output,$rowtotal); |
} |
} |
|
|
Line 1717 sub print_courseinfo {
|
Line 1685 sub print_courseinfo {
|
'</span>', |
'</span>', |
input => 'textbox', |
input => 'textbox', |
size => '40', |
size => '40', |
|
advanced => 1 |
}, |
}, |
'description' => { |
'description' => { |
text => '<b>'.&mt($itemtext->{'description'}).'</b>', |
text => '<b>'.&mt($itemtext->{'description'}).'</b>', |
Line 1739 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' |
}, |
}, |
'rolenames' => { |
'rolenames' => { |
text => '<b>'.&mt($itemtext->{'rolenames'}).'</b><br />'. |
text => '<b>'.&mt($itemtext->{'rolenames'}).'</b><br />'. |
'('.$replace.')', |
'('.$replace.')', |
input => 'textbox', |
input => 'textbox', |
size => '20', |
size => '20', |
|
advanced => 1 |
}, |
}, |
'externalsyllabus' => { |
'externalsyllabus' => { |
text => '<b>'.&mt($itemtext->{'externalsyllabus'}).'</b><br />('. |
text => '<b>'.&mt($itemtext->{'externalsyllabus'}).'</b><br />('. |
Line 1777 sub print_courseinfo {
|
Line 1747 sub print_courseinfo {
|
next if (!$can_categorize); |
next if (!$can_categorize); |
} |
} |
$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 ($items{$item}{input} eq 'radio') { |
if ($items{$item}{input} eq 'radio') { |
$datatable .= &yesno_radio($item,$settings); |
$datatable .= &yesno_radio($item,$settings); |
} elsif ($item eq 'cloners') { |
} elsif ($item eq 'cloners') { |
Line 2094 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); |
Line 2103 sub display_loncaparev_constraints {
|
Line 2082 sub display_loncaparev_constraints {
|
} |
} |
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 2121 sub display_loncaparev_constraints {
|
Line 2100 sub display_loncaparev_constraints {
|
if ($key =~ /^\Q$start\E(\[useropt\:($match_username\:$match_domain)\]\.)/) { |
if ($key =~ /^\Q$start\E(\[useropt\:($match_username\:$match_domain)\]\.)/) { |
$middle = $1; |
$middle = $1; |
$which = $2; |
$which = $2; |
$scope = 'user'; |
$scope = 'user'; |
} elsif ($key =~ /^\Q$start\E(\[(\w+)\]\.)/) { |
} elsif ($key =~ /^\Q$start\E(\[(\w+)\]\.)/) { |
$middle = $1; |
$middle = $1; |
$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 2153 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 2173 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 2212 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 2223 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 2316 sub display_loncaparev_constraints {
|
Line 2295 sub display_loncaparev_constraints {
|
my $mapres_header = '<h4>'. |
my $mapres_header = '<h4>'. |
&mt('Requirements for specific folders or resources'). |
&mt('Requirements for specific folders or resources'). |
'</h4>'; |
'</h4>'; |
if ((keys(%toshow) > 0) || (keys(%byresource) > 0) || |
if ((keys(%toshow) > 0) || (keys(%byresource) > 0) || |
(keys(%bysubmission) > 0) || (keys(%byresponsetype))) { |
(keys(%bysubmission) > 0) || (keys(%byresponsetype))) { |
$output .= $mapres_header; |
$output .= $mapres_header; |
} |
} |
Line 2329 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 { |
$r->print('<p class="LC_info">'. |
$r->print('<p class="LC_info">'. |
&mt('No version requirements from resource content or settings.'). |
&mt('No version requirements from resource content or settings.'). |
'</p>'); |
'</p>'); |
} |
} |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
|
|
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, |
if ((keys(%{$toshow}) > 0) || (keys(%{$byresource}) > 0) || |
$scopeorder,$lt) = @_; |
|
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"); |
my $whitespace = '<img src="'.$location.'/whitespace_21.gif" alt="" />'; |
my $whitespace = '<img src="'.$location.'/whitespace_21.gif" alt="" />'; |
Line 2356 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 2424 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 2432 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 2481 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 2490 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 2498 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 2787 sub print_feedback {
|
Line 2767 sub print_feedback {
|
|
|
foreach my $item (@{$ordered}) { |
foreach my $item (@{$ordered}) { |
$count ++; |
$count ++; |
$datatable .= &item_table_row_start($items{$item}{text},$count); |
if ($position eq 'top') { |
|
$datatable .= &item_table_row_start($items{$item}{text},$count); |
|
} else { |
|
$datatable .= &item_table_row_start($items{$item}{text}."<br/>(Custom text)",$count, "advanced"); |
|
} |
if ($position eq 'top') { |
if ($position eq 'top') { |
my $includeempty = 0; |
my $includeempty = 0; |
$datatable .= &user_table($cdom,$item,\@sections, |
$datatable .= &user_table($cdom,$item,\@sections, |
$settings->{$item},\%lt); |
$settings->{$item},\%lt); |
} else { |
} else { |
$datatable .= &Apache::lonhtmlcommon::textbox($item.'.text', |
$datatable .= &Apache::lonhtmlcommon::textbox($item.'.text', |
$settings->{$item.'.text'},$items{$item}{size}); |
$settings->{$item.'.text'},$items{$item}{size}); |
} |
} |
$datatable .= &item_table_row_end(); |
$datatable .= &item_table_row_end(); |
} |
} |
Line 3244 sub print_grading {
|
Line 3228 sub print_grading {
|
input => 'selectbox', |
input => 'selectbox', |
options => { |
options => { |
standard => &mt('Standard: shows points'), |
standard => &mt('Standard: shows points'), |
|
categories => &mt('Categories: shows points according to categories'), |
external => &mt('External: shows number of completed parts and totals'), |
external => &mt('External: shows number of completed parts and totals'), |
externalnototals => &mt('External: shows only number of completed parts'), |
externalnototals => &mt('External: shows only number of completed parts'), |
spreadsheet => &mt('Spreadsheet: (with link to detailed scores)'), |
spreadsheet => &mt('Spreadsheet: (with link to detailed scores)'), |
}, |
}, |
order => ['standard','external','externalnototals','spreadsheet'], |
order => ['standard','categories','external','externalnototals','spreadsheet'], |
}, |
}, |
'rndseed' => { |
'rndseed' => { |
text => '<b>'.&mt($itemtext->{'rndseed'}).'</b>'. |
text => '<b>'.&mt($itemtext->{'rndseed'}).'</b>'. |
Line 3265 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 3276 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 3547 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') { |