--- loncom/interface/courseprefs.pm 2011/10/19 21:15:53 1.47 +++ loncom/interface/courseprefs.pm 2012/06/03 13:40:50 1.49.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.47 2011/10/19 21:15:53 www Exp $ +# $Id: courseprefs.pm,v 1.49.2.2 2012/06/03 13:40:50 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -463,7 +463,7 @@ sub handler { help => 'Course_Prefs_Printouts', 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', @@ -665,7 +665,21 @@ sub process_changes { } } } elsif (ref($item->{'ordered'}) eq 'ARRAY') { - @ordered = @{$item->{'ordered'}}; + if ($action eq 'courseinfo') { + my ($can_toggle_cat,$can_categorize) = + &can_modify_catsettings($cdom,$crstype); + foreach my $entry (@{$item->{'ordered'}}) { + next if (($entry eq 'hidefromcat') && + (!$can_toggle_cat)); + next if (($entry eq 'categories') && + (!$can_categorize)); + next if (($entry eq 'loncaparev') || + ($entry eq 'owner')); + push(@ordered,$entry); + } + } else { + @ordered = @{$item->{'ordered'}}; + } } if (@ordered > 0) { if ($action eq 'feedback') { @@ -707,7 +721,6 @@ sub process_changes { } } else { foreach my $entry (@ordered) { - next if (($entry eq 'loncaparev') || ($entry eq 'owner')); if ($entry eq 'cloners') { if ($env{'form.cloners_all'}) { $newvalues{$entry} = '*'; @@ -2392,7 +2405,7 @@ sub show_contents_view { } $r->print(&Apache::loncommon::start_data_table_row(). ''.$indent.$icon.' '.$title.''); - &releases_by_map($r,$bymap,$url,$scopeorder); + &releases_by_map($r,$bymap,$url,$scopeorder,$lt); $r->print(&Apache::loncommon::end_data_table_row()); } else { my $rowspan; @@ -3245,12 +3258,11 @@ sub print_grading { input => 'selectbox', options => { standard => &mt('Standard: shows points'), - categories => &mt('Categories: shows points according to categories'), external => &mt('External: shows number of completed parts and totals'), externalnototals => &mt('External: shows only number of completed parts'), spreadsheet => &mt('Spreadsheet: (with link to detailed scores)'), }, - order => ['standard','categories','external','externalnototals','spreadsheet'], + order => ['standard','external','externalnototals','spreadsheet'], }, 'rndseed' => { text => ''.&mt($itemtext->{'rndseed'}).''.