--- loncom/interface/courseprefs.pm 2010/05/22 16:39:13 1.28 +++ loncom/interface/courseprefs.pm 2010/08/14 13:46:13 1.28.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.28 2010/05/22 16:39:13 raeburn Exp $ +# $Id: courseprefs.pm,v 1.28.2.1 2010/08/14 13:46:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -344,9 +344,11 @@ sub handler { 'courseinfo' => { text => $lt{'gens'}, help => 'Course_Environment', + header => [{col1 => 'Setting', + col2 => 'Value'}], ordered => ['owner','co-owners','description','courseid', 'categories','hidefromcat','externalsyllabus', - 'cloners','url','rolenames'], + 'url','rolenames','cloners'], itemtext => { 'owner' => $lt{'ownr'}, 'co-owners' => $lt{'cown'}, @@ -363,6 +365,8 @@ sub handler { 'localization' => { text => 'Language and Time Localization', help => 'Course_Environment', + header => [{col1 => 'Setting', + col2 => 'Value',}], ordered => ['languages','timezone','datelocale'], itemtext => { languages => 'Languages used', @@ -374,7 +378,9 @@ sub handler { { text => 'Feedback messages', help => 'Course_Environment', header => [{col1 => 'Questions about:', - col2 => 'Recipients'}], + col2 => 'Recipients'}, + {col1 => 'Questions about:', + col2 => 'Custom Text'}], ordered => ['question.email','comment.email','policy.email'], itemtext => { 'question.email' => 'Resource Content', @@ -423,6 +429,8 @@ sub handler { 'appearance' => { text => 'Display of resources ', help => 'Course_Environment', + header => [{col1 => 'Setting', + col2 => 'Value',}], ordered => ['default_xml_style','pageseparators', 'disable_receipt_display','texengine', 'tthoptions'], @@ -437,6 +445,8 @@ sub handler { 'grading' => { text => 'Grading', help => 'Course_Environment', + header => [{col1 => 'Setting', + col2 => 'Value',}], ordered => ['grading','rndseed', 'receiptalg','disablesigfigs'], itemtext => { @@ -450,6 +460,8 @@ sub handler { 'printouts' => { text => 'Printout generation', help => 'Course_Environment', + header => [{col1 => 'Setting', + col2 => 'Value',}], ordered => ['problem_stream_switch','suppress_tries', 'default_paper_size','print_header_format', 'disableexampointprint','canuse_pdfforms'], @@ -465,6 +477,8 @@ sub handler { 'spreadsheet' => { text => 'Spreadsheets', help => 'Course_Environment', + header => [{col1 => 'Setting', + col2 => 'Value'}], ordered => ['spreadsheet_default_classcalc', 'spreadsheet_default_studentcalc', 'spreadsheet_default_assesscalc','hideemptyrows'], @@ -478,6 +492,8 @@ sub handler { 'bridgetasks' => { text => 'Bridge tasks', help => 'Course_Environment', + header => [{col1 => 'Setting', + col2 => 'Value'}], ordered => ['task_messages','task_grading', 'suppress_embed_prompt'], itemtext => { @@ -533,12 +549,17 @@ sub print_config_box { my $itemtext = $item->{'itemtext'}; my $rowtotal = 0; my $output = - '

'.&mt($item->{text}).'

-
 '. - &Apache::loncommon::help_open_topic($item->{'help'}).''; + ' + + '."\n". + ''; if (($action eq 'feedback') || ($action eq 'classlists')) { $output .= ' -
'. + &mt($item->{text}).' '. + &Apache::loncommon::help_open_topic($item->{'help'}).'
'; + + + + + + + +
+ '; if (exists $item->{'header'}->[0]->{'col1'} || exists $item->{'header'}->[0]->{'col2'}) { $output .= ' @@ -555,6 +576,10 @@ sub print_config_box { } $output .= '
+
'; @@ -565,6 +590,10 @@ sub print_config_box { $output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype). '
'.&mt($item->{'header'}->[1]->{'col1'}).'
+
'; if (exists $item->{'header'}->[0]->{'col1'} || exists $item->{'header'}->[0]->{'col2'}) { @@ -573,10 +602,12 @@ sub print_config_box { '; - } + } } } else { $output .= ' + + + +
'.&mt($item->{'header'}->[0]->{'col1'}).' '.&mt($item->{'header'}->[0]->{'col2'}).'
'; if (exists $item->{'header'}->[0]->{'col1'} || exists $item->{'header'}->[0]->{'col2'}) { @@ -613,7 +644,9 @@ sub print_config_box { } $output .= '
-'; +

'; return ($output,$rowtotal); } @@ -1659,7 +1692,6 @@ sub print_courseinfo { '', input => 'textbox', size => '40', - advanced => 1 }, 'description' => { text => ''.&mt($itemtext->{'description'}).'', @@ -1683,14 +1715,12 @@ sub print_courseinfo { &mt('Owner and Coordinators included automatically'), input => 'textbox', size => '40', - advanced => 1 }, 'rolenames' => { text => ''.&mt($itemtext->{'rolenames'}).'
'. '('.$replace.')', input => 'textbox', size => '20', - advanced => 1 }, 'externalsyllabus' => { text => ''.&mt($itemtext->{'externalsyllabus'}).'
('. @@ -1719,11 +1749,7 @@ sub print_courseinfo { next if (!$can_categorize); } $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); - } + $datatable .= &item_table_row_start($items{$item}{text},$count); if ($items{$item}{input} eq 'radio') { $datatable .= &yesno_radio($item,$settings); } elsif ($item eq 'cloners') { @@ -2281,18 +2307,14 @@ sub print_feedback { foreach my $item (@{$ordered}) { $count ++; - if ($position eq 'top') { - $datatable .= &item_table_row_start($items{$item}{text},$count); - } else { - $datatable .= &item_table_row_start($items{$item}{text}."
(Custom text)",$count, "advanced"); - } + $datatable .= &item_table_row_start($items{$item}{text},$count); if ($position eq 'top') { my $includeempty = 0; $datatable .= &user_table($cdom,$item,\@sections, $settings->{$item},\%lt); } else { $datatable .= &Apache::lonhtmlcommon::textbox($item.'.text', - $settings->{$item.'.text'},$items{$item}{size}); + $settings->{$item.'.text'},$items{$item}{size}); } $datatable .= &item_table_row_end(); }