--- loncom/interface/courseprefs.pm 2010/12/22 16:46:43 1.28.2.4 +++ loncom/interface/courseprefs.pm 2010/08/21 04:04:54 1.29 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.28.2.4 2010/12/22 16:46:43 raeburn Exp $ +# $Id: courseprefs.pm,v 1.29 2010/08/21 04:04:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -344,11 +344,9 @@ sub handler { 'courseinfo' => { text => $lt{'gens'}, help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value'}], ordered => ['owner','co-owners','description','courseid', 'categories','hidefromcat','externalsyllabus', - 'url','rolenames','cloners'], + 'cloners','url','rolenames'], itemtext => { 'owner' => $lt{'ownr'}, 'co-owners' => $lt{'cown'}, @@ -365,8 +363,6 @@ sub handler { 'localization' => { text => 'Language and Time Localization', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value',}], ordered => ['languages','timezone','datelocale'], itemtext => { languages => 'Languages used', @@ -378,9 +374,7 @@ sub handler { { text => 'Feedback messages', help => 'Course_Environment', header => [{col1 => 'Questions about:', - col2 => 'Recipients'}, - {col1 => 'Questions about:', - col2 => 'Custom Text'}], + col2 => 'Recipients'}], ordered => ['question.email','comment.email','policy.email'], itemtext => { 'question.email' => 'Resource Content', @@ -391,15 +385,15 @@ sub handler { 'discussion' => { text => 'Discussion and Chat', help => 'Course_Environment', - ordered => ['pch.roles.denied','pch.users.denied', - 'plc.roles.denied','plc.users.denied', + ordered => ['plc.roles.denied','plc.users.denied', + 'pch.roles.denied','pch.users.denied', 'allow_limited_html_in_feedback', 'allow_discussion_post_editing'], itemtext => { - 'pch.roles.denied' => 'No Resource Discussion', - 'pch.users.denied' => 'No Resource Discussion', - 'plc.roles.denied' => 'No Chat room use', - 'plc.users.denied' => 'No Chat room use', + 'plc.roles.denied' => 'No Resource Discussion', + 'plc.users.denied' => 'No Resource Discussion', + 'pch.roles.denied' => 'No Chat room use', + 'pch.users.denied' => 'No Chat room use', allow_limited_html_in_feedback => 'Allow limited HTML in discussion', allow_discussion_post_editing => 'Users can edit/delete own discussion posts', }, @@ -429,8 +423,6 @@ 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'], @@ -445,8 +437,6 @@ sub handler { 'grading' => { text => 'Grading', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value',}], ordered => ['grading','rndseed', 'receiptalg','disablesigfigs'], itemtext => { @@ -460,8 +450,6 @@ 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'], @@ -477,8 +465,6 @@ sub handler { 'spreadsheet' => { text => 'Spreadsheets', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value'}], ordered => ['spreadsheet_default_classcalc', 'spreadsheet_default_studentcalc', 'spreadsheet_default_assesscalc','hideemptyrows'], @@ -492,8 +478,6 @@ sub handler { 'bridgetasks' => { text => 'Bridge tasks', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value'}], ordered => ['task_messages','task_grading', 'suppress_embed_prompt'], itemtext => { @@ -549,17 +533,12 @@ sub print_config_box { my $itemtext = $item->{'itemtext'}; my $rowtotal = 0; my $output = - ' - - '."\n". - ''; + '

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

+
 '. + &Apache::loncommon::help_open_topic($item->{'help'}).''; if (($action eq 'feedback') || ($action eq 'classlists')) { $output .= ' -
- - - - - - - '; } } - $output .= ''; if ($showsections) { @@ -2610,7 +2588,7 @@ sub role_checkboxes { $output .= ''; } } - $output .= ''; if ($showsections) {
'. - &mt($item->{text}).' '. - &Apache::loncommon::help_open_topic($item->{'help'}).'
- '; +
'; if (exists $item->{'header'}->[0]->{'col1'} || exists $item->{'header'}->[0]->{'col2'}) { $output .= ' @@ -576,10 +555,6 @@ sub print_config_box { } $output .= '
-
'; @@ -590,10 +565,6 @@ 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'}) { @@ -602,12 +573,10 @@ 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'}) { @@ -644,9 +613,7 @@ sub print_config_box { } $output .= '
-

'; +'; return ($output,$rowtotal); } @@ -720,8 +687,8 @@ sub process_changes { if (exists($env{'form.cloners_activate'})) { my $actnum = $env{'form.cloners_activate'}; if ($actnum ne '') { - if ($env{'form.cloners_dom_'.$actnum} ne '') { - my $clonedom = $env{'form.cloners_dom_'.$actnum}; + if ($env{'form.clonersdom_'.$actnum} ne '') { + my $clonedom = $env{'form.clonersdom_'.$actnum}; if (&check_clone($clonedom,$disallowed) eq 'ok') { $newvalues{$entry} = '*:'.$clonedom; push(@clonedoms,$newvalues{$entry}); @@ -1329,7 +1296,7 @@ sub store_changes { if ($key eq 'url') { my $bkuptime=time; $output .= (' 'x2).&mt('(Previous URL backed up)').': '. - $storehash{'top level map backup '.$bkuptime} = $values->{$key}; + $storehash{'top level map backup '.$bkuptime} => $values->{$key}; } $output .= ''; } @@ -1692,6 +1659,7 @@ sub print_courseinfo { '', input => 'textbox', size => '40', + advanced => 1 }, 'description' => { text => ''.&mt($itemtext->{'description'}).'', @@ -1715,12 +1683,14 @@ 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'}).'
('. @@ -1749,7 +1719,11 @@ sub print_courseinfo { next if (!$can_categorize); } $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') { $datatable .= &yesno_radio($item,$settings); } elsif ($item eq 'cloners') { @@ -2307,14 +2281,18 @@ sub print_feedback { foreach my $item (@{$ordered}) { $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}."
(Custom text)",$count, "advanced"); + } 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(); } @@ -2578,7 +2556,7 @@ sub role_checkboxes { $output .= '