--- loncom/interface/courseprefs.pm 2009/05/12 21:20:42 1.3 +++ loncom/interface/courseprefs.pm 2009/11/24 21:50:14 1.8.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.3 2009/05/12 21:20:42 raeburn Exp $ +# $Id: courseprefs.pm,v 1.8.2.1 2009/11/24 21:50:14 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -66,15 +66,18 @@ sub handler { return HTTP_NOT_ACCEPTABLE; } + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['phase','actions','origin']); &Apache::lonhtmlcommon::clear_breadcrumbs(); + if ($env{'form.origin'} eq 'params') { + &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/parmset", + text=>"Parameter Manager"}); + } &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/courseprefs', text=>"Course Configuration"}); my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Edit Course Configuration'); - &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, - ['phase','actions']); - my $phase = 'pickactions'; if ( exists($env{'form.phase'}) ) { $phase = $env{'form.phase'}; @@ -188,7 +191,7 @@ sub handler { default_xml_style => 'Default XML Style File', pageseparators => 'Visibly Separate Items on Pages', disable_receipt_display => 'Disable display of problem receipts', - texengine => 'Force use of a specific math rendering engine.', + texengine => 'Force use of a specific math rendering engine', tthoptions => 'Default set of options to pass to tth/m when converting TeX', }, }, @@ -248,7 +251,7 @@ sub handler { itemtext => { task_messages => 'Send message to student when clicking Done on Tasks', task_grading => 'Bridge Task grading by instructors and TAs in sections' , - suppress_embed_prompt => 'Hi$de upload references prompt if uploading file to portfolio', + suppress_embed_prompt => 'Hide upload references prompt if uploading file to portfolio', }, }, 'other' => @@ -551,7 +554,6 @@ sub process_changes { if ($newvalues{$ext_entry} ne $values->{$stdrole.'.plaintext'}) { my $dupname = 0; if ($newvalues{$ext_entry} ne '') { - my $dupname = 0; if (grep(/^\Q$newvalues{$ext_entry}\E$/,@replacements)) { $dupname = 1; push(@{$disallowed->{'rolenames'}{'replacements'}},$newvalues{$ext_entry}); @@ -652,7 +654,7 @@ sub process_changes { } foreach my $key (keys(%env)) { if ($key =~ /^form\.\Q$entry\E_($match_username:$match_domain)$/) { - if ($env{'form.'.$key}) { + if ($env{$key}) { my $nothide = $1; if (!grep(/^\Q$nothide\E$/,@new_nothide)) { push(@new_nothide,$nothide); @@ -1421,7 +1423,7 @@ sub assign_course_categories { } my $catwin_js; if ($hascats) { - my $alert = &mt('Use \"Save\" in the main window to save course categories'); + my $alert = &mt("Use 'Save' in the main window to save course categories"); $catwin_js = < @@ -1638,7 +1640,7 @@ sub user_table { } else { my $num = 0; my @curr = split(/,/,$currvalue); - $output .= &Apache::loncommon::start_data_table(); + $output .= ''; my ($currusers); foreach my $val (@curr) { next if ($val eq ''); @@ -1669,7 +1671,7 @@ sub user_table { $num ++; } if ($num) { - $output .= &Apache::loncommon::start_data_table_row(). + $output .= ''. ''. - &Apache::loncommon::end_data_table_row(); + ''; } - $output .= &Apache::loncommon::start_data_table_row(). + $output .= ''. ''.&Apache::loncommon::end_data_table_row(). - &Apache::loncommon::end_data_table(); + '
'; if ($num > 1) { $output .= $lt->{'currone'}; @@ -1678,15 +1680,14 @@ sub user_table { } $output .= '
'. ''.$currusers.'
'. $lt->{'add'}.'
'. &select_recipient($item,$num,$cdom,$sections). ''. - '
'; } return $output; } @@ -1697,9 +1698,8 @@ sub select_recipient { my $selectlink = &Apache::loncommon::selectstudent_link('display',$item.'_uname_'.$num, $item.'_udom_'.$num,1); - my $css_class = ($num % 2)?'LC_even_row':'LC_odd_row'; my $output = - '
'.&mt('Username').'
'. + ''. ''; if (ref($sections) eq 'ARRAY') { @@ -1753,9 +1753,10 @@ sub print_discussion { } my %items = ( 'plc.roles.denied' => { - text => ''.&mt($itemtext->{'plc.roles.denied'}).''. - &Apache::loncommon::help_open_topic("Course_Disable_Discussion"). - &mt('(roles-based)'), + text => ''. + &mt($itemtext->{'plc.roles.denied'}).''. + &Apache::loncommon::help_open_topic("Course_Disable_Discussion").'
'. + &mt('(role-based)'), input => 'checkbox', }, @@ -1766,8 +1767,9 @@ sub print_discussion { }, 'pch.roles.denied' => { - text => ''.&mt($itemtext->{'pch.roles.denied'}).''. - &Apache::loncommon::help_open_topic("Course_Disable_Discussion").'
'. + text => ''. + &mt($itemtext->{'pch.roles.denied'}).''. + &Apache::loncommon::help_open_topic("Course_Disable_Discussion").'
'. &mt('(role-based)'), input => 'checkbox', }, @@ -2073,7 +2075,7 @@ sub print_grading { }, 'receiptalg' => { text => ''.&mt($itemtext->{'receiptalg'}).'
'. - &mt('This controls how receipt numbers are generated.'), + &mt('This controls how receipt numbers are generated'), input => 'selectbox', options => { receipt => 'receipt', @@ -2408,7 +2410,9 @@ sub nothidepriv_row { } } if (exists($privileged{$udom}{$uname})) { - push(@privusers,$user); + unless (grep(/^\Q$user\E$/,@privusers)) { + push(@privusers,$user); + } } } if (@privusers) { @@ -2428,8 +2432,8 @@ sub nothidepriv_row { ''. + $hideon.' value="" />'.&mt('Hidden').' '. + ''. ''; } $datatable .= '
'.&mt('Username').'
'. '
'.&mt('Domain').'
'.$domform.'
'. ' '. - '
'; @@ -2511,11 +2515,11 @@ function getIndexByName(item) { ENDJS - $output .= $currstr.&Apache::loncommon::start_data_table(); + $output .= $currstr.''; if (@curr > 0) { for (my $i=0; $i<@curr; $i++) { my $pos = $i+1; - $output .= &Apache::loncommon::start_data_table_row(). + $output .= ''. ''; } - $output .= &Apache::loncommon::end_data_table_row(); + $output .= ''; } } my $pos = $currnum+1; - $output .= &Apache::loncommon::start_data_table_row(). + $output .= ''. ''. - &Apache::loncommon::end_data_table_row(); + ''; $pos ++; $currnum ++; - $output .= &Apache::loncommon::start_data_table_row(). + $output .= ''. ''. @@ -2550,8 +2554,8 @@ ENDJS '" value="" size ="25" />'. ''. - &Apache::loncommon::end_data_table_row(). - &Apache::loncommon::end_data_table(); + ''. + '
'. &position_selector($pos,$i,$maxnum).&mt('Delete:'). '
'. &position_selector($pos,$currnum,$maxnum). ''.&mt('New').''. &substitution_selector($currnum).'
'. &position_selector($pos,$currnum,$maxnum). ''.&mt('New').'
'; return $output; }