--- loncom/interface/courseprefs.pm 2010/12/24 17:51:16 1.28.2.7 +++ loncom/interface/courseprefs.pm 2012/02/01 19:54:35 1.28.2.11 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.28.2.7 2010/12/24 17:51:16 raeburn Exp $ +# $Id: courseprefs.pm,v 1.28.2.11 2012/02/01 19:54:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -474,7 +474,7 @@ sub handler { col2 => 'Value',}], ordered => ['problem_stream_switch','suppress_tries', 'default_paper_size','print_header_format', - 'disableexampointprint','canuse_pdfforms'], + 'disableexampointprint'], itemtext => { problem_stream_switch => 'Allow problems to be split over pages', suppress_tries => 'Suppress number of tries in printing', @@ -1378,9 +1378,9 @@ sub store_changes { $output .= ''; } else { if ($crstype eq 'Community') { - $output = &mt('No changes made to community settings.'); + $output .= &mt('No changes made to community settings.'); } else { - $output = &mt('No changes made to course settings.'); + $output .= &mt('No changes made to course settings.'); } } } @@ -2094,6 +2094,11 @@ sub display_loncaparev_constraints { my $cdom = $env{'course.'.$cid.'.domain'}; my $cnum = $env{'course.'.$cid.'.num'}; my $output; + my %lt = &Apache::lonlocal::texthash ( + 'all' => 'all', + 'section/group' => 'section/group', + 'user' => 'user', + ); my (%checkparms,%checkresponsetypes,%checkcrstypes,%anonsurvey,%randomizetry); &Apache::loncommon::build_release_hashes(\%checkparms,\%checkresponsetypes, \%checkcrstypes,\%anonsurvey,\%randomizetry); @@ -2103,7 +2108,7 @@ sub display_loncaparev_constraints { } my (%fromparam,%rowspan,%bymap,%byresource,@scopeorder,%toshow,%allmaps, %byresponsetype,%bysubmission); - @scopeorder = ('course','section/group','user'); + @scopeorder = ('all','section/group','user'); my $resourcedata = &Apache::lonparmset::readdata($cnum,$cdom); if (ref($resourcedata) eq 'HASH') { foreach my $key (keys(%{$resourcedata})) { @@ -2127,12 +2132,12 @@ sub display_loncaparev_constraints { $which = $2; $scope = 'section/group'; } else { - $scope = 'course'; + $scope = 'all'; } my $what="$stdname=$valname"; if ($key =~ /^\Q$start$middle\E\w+\.\Q$item\E$/) { $level = 'general'; - if ($scope eq 'course') { + if ($scope eq 'all') { if (ref($fromparam{$rev}{$scope}) eq 'ARRAY') { unless(grep(/^\Q$what\E$/,@{$fromparam{$rev}{$scope}})) { push(@{$fromparam{$rev}{$scope}},$what); @@ -2153,7 +2158,7 @@ sub display_loncaparev_constraints { } elsif ($key =~ /^\Q$start$middle\E(.+)___\(all\).\w+\.\Q$item\E$/) { $level = 'folder'; $map = $1; - if ($scope eq 'course') { + if ($scope eq 'all') { if (ref($bymap{$map}{$rev}{$scope}) eq 'ARRAY') { unless(grep(/^\Q$what\E$/,@{$bymap{$map}{$rev}{$scope}})) { push(@{$bymap{$map}{$rev}{$scope}},$what); @@ -2173,7 +2178,7 @@ sub display_loncaparev_constraints { } elsif ($key =~ /^\Q$start$middle\E(.+)\.\w+\.\Q$item\E$/) { $level = 'resource'; $resource = $1; - if ($scope eq 'course') { + if ($scope eq 'all') { if (ref($byresource{$resource}{$rev}{$scope}) eq 'ARRAY') { unless(grep(/^\Q$what\E$/,@{$byresource{$resource}{$rev}{$scope}})) { push(@{$byresource{$resource}{$rev}{$scope}},$what); @@ -2212,7 +2217,7 @@ sub display_loncaparev_constraints { if ($newrow) { $output .= &Apache::loncommon::continue_data_table_row(); } - $output .= '
'.&mt('Setting - scope: [_1]',$scope).' | '); + $r->print('||
'.&mt('Setting - scope: [_1]',$lt->{$scope}).' | '); foreach my $which (sort(keys(%{$byresource->{$symb}{$rev}{$scope}}))) { $r->print(''.$which.' | '.
join(' ',@{$byresource->{$symb}{$rev}{$scope}{$which}}). @@ -2432,7 +2438,7 @@ sub show_contents_view { } $r->print(' |
'.&mt('Setting - scope: [_1]',$scope).' | '. + $r->print('||
'.&mt('Setting - scope: [_1]',$lt->{$scope}).' | '. ''.
join(' ',@{$byresource->{$symb}{$rev}{$scope}}).' |
'.&mt('Setting - scope: [_1]',$scope).' | '); + $r->print('||
'.&mt('Setting - scope: [_1]',$lt->{$scope}).' | '); foreach my $which (sort(keys(%{$bymap->{$url}{$rev}{$scope}}))) { $r->print(''.$which.' | '.
join(' ',@{$bymap->{$url}{$rev}{$scope}{$which}}). @@ -2498,7 +2504,7 @@ sub releases_by_map { } $r->print(' |
'.&mt('Setting - scope: [_1]',$scope). + $r->print(' | ||
'.&mt('Setting - scope: [_1]',$lt->{$scope}). ' | '.
join(' ',@{$bymap->{$url}{$rev}{$scope}}).' |