--- loncom/interface/courseprefs.pm 2010/01/03 01:58:15 1.15 +++ loncom/interface/courseprefs.pm 2010/01/07 20:33:22 1.18 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.15 2010/01/03 01:58:15 raeburn Exp $ +# $Id: courseprefs.pm,v 1.18 2010/01/07 20:33:22 faziophi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -115,15 +115,15 @@ sub handler { %lt = ( conf => 'Course Configuration', edit => 'Edit Course Configuration', - gens => 'General course settings', - idnu => 'Course ID or number', - desc => 'Course Description', + gens => 'General Settings', + idnu => 'ID/Number', + desc => 'Title', catg => 'Categorize course', excc => 'Exclude from course catalog', clon => 'Users allowed to clone course', rept => 'Replacement titles for standard course roles', - time => 'Timezone in which the course takes place', - date => 'Locale used for course calendar', + time => 'Timezone', + date => 'Calendar Locale', coco => 'Course Content', copo => 'Course Policy', priv => 'Domain Coordinators in course', @@ -161,36 +161,32 @@ sub handler { 'courseinfo' => { text => $lt{'gens'}, help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value'}], ordered => ['description','courseid','categories', - 'hidefromcat','cloners','externalsyllabus', - 'url','rolenames'], + 'hidefromcat','externalsyllabus', + 'url','rolenames','cloners'], itemtext => { description => $lt{'desc'}, courseid => $lt{'idnu'}, categories => $lt{'catg'}, hidefromcat => $lt{'excc'}, cloners => $lt{'clon'}, - externalsyllabus => 'URL of Syllabus', + externalsyllabus => 'External Syllabus URL', url => 'Top Level Map', rolenames => $lt{'rept'}, }, }, 'localization' => - { text => 'Language/TimeZone/Locale', + { text => 'Language & Time Localization', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value',}], ordered => ['languages','timezone','datelocale'], itemtext => { - languages => 'Languages used', + languages => 'Language(s)', timezone => $lt{'time'}, datelocale => $lt{'date'}, }, }, 'feedback' => - { text => 'Feedback messages', + { text => 'Feedback Messages', help => 'Course_Environment', header => [{col1 => 'Questions about:', col2 => 'Recipients'}, @@ -206,19 +202,17 @@ sub handler { 'discussion' => { text => 'Discussion and Chat', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value',}], ordered => ['plc.roles.denied','plc.users.denied', 'pch.roles.denied','pch.users.denied', 'allow_limited_html_in_feedback', 'allow_discussion_post_editing'], itemtext => { - '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 posts', - allow_discussion_post_editing => 'Users can edit/delete own discussion posts', + 'plc.roles.denied' => 'Disable resource discussion', + 'plc.users.denied' => 'Disable resource discussion', + 'pch.roles.denied' => 'Disable chat room', + 'pch.users.denied' => 'Disable chat room', + allow_limited_html_in_feedback => 'HTML in discussion', + allow_discussion_post_editing => 'Allow users to edit/delete own discussion posts', }, }, 'classlists' => @@ -244,41 +238,35 @@ sub handler { }, }, 'appearance' => - { text => 'Display of resources ', + { text => 'Display of Resources ', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value'}], ordered => ['default_xml_style','pageseparators', 'disable_receipt_display','texengine', 'tthoptions'], itemtext => { - 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', + default_xml_style => 'Default XML style file', + pageseparators => 'Separate items on composite pages', + disable_receipt_display => 'Disable problem receipts display', + texengine => 'Force specific math rendering engine', tthoptions => 'Default set of options to pass to tth/m when converting TeX', }, }, 'grading' => { text => 'Grading', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value',}], ordered => ['grading','rndseed', 'receiptalg','disablesigfigs'], itemtext => { - grading => 'Grading', - rndseed => 'Randomization algorithm used', - receiptalg => 'Receipt algorithm used', - disablesigfigs => 'Disable checking of Significant Figures', + grading => 'Grading Type', + rndseed => 'Randomization algorithm', + receiptalg => 'Receipt algorithm', + disablesigfigs => 'Disable significant figure checks', }, }, 'printouts' => - { text => 'Printout generation', + { text => 'Printouts', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value',}], ordered => ['problem_stream_switch','suppress_tries', 'default_paper_size','print_header_format', 'disableexampointprint','canuse_pdfforms'], @@ -294,8 +282,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'], @@ -309,8 +295,6 @@ sub handler { 'bridgetasks' => { text => 'Bridge tasks', help => 'Course_Environment', - header => [{col1 => 'Setting', - col2 => 'Value'}], ordered => ['task_messages','task_grading', 'suppress_embed_prompt'], itemtext => { @@ -366,21 +350,20 @@ 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 .= ' -
- - - - - - -
'. - &mt($item->{text}).' '. - &Apache::loncommon::help_open_topic($item->{'help'}).'
- - +
'; + if (exists $item->{'header'}->[0]->{'col1'} || + exists $item->{'header'}->[0]->{'col2'}) { + $output .= ' + - '; + '; + } $rowtotal ++; if ($action eq 'feedback') { $output .= &print_feedback('top',$cdom,$settings,$ordered,$itemtext,\$rowtotal); @@ -389,10 +372,6 @@ sub print_config_box { } $output .= '
'.&mt($item->{'header'}->[0]->{'col1'}).' '.&mt($item->{'header'}->[0]->{'col2'}).'
-
'; @@ -403,25 +382,27 @@ sub print_config_box { $output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype). '
'.&mt($item->{'header'}->[1]->{'col1'}).'
-
- - - - - '; +
'.&mt($item->{'header'}->[2]->{'col1'}).''.&mt($item->{'header'}->[2]->{'col2'}).'
'; + if (exists $item->{'header'}->[0]->{'col1'} || + exists $item->{'header'}->[0]->{'col2'}) { + $output .= ' + + + + '; + } } } else { $output .= ' - - - -
'.&mt($item->{'header'}->[0]->{'col1'}).''.&mt($item->{'header'}->[0]->{'col2'}).'
- - +
'; + if (exists $item->{'header'}->[0]->{'col1'} || + exists $item->{'header'}->[0]->{'col2'}) { + $output .= ' + - '; + '; + } } $rowtotal ++; if ($action eq 'courseinfo') { @@ -449,9 +430,7 @@ sub print_config_box { } $output .= '
'.&mt($item->{'header'}->[0]->{'col1'}).' '.&mt($item->{'header'}->[0]->{'col2'}).'
-

'; +'; return ($output,$rowtotal); } @@ -1649,16 +1628,16 @@ sub print_localization { } my %items = ( languages => { - text => &mt($itemtext->{'languages'}).'
'. - &mt("(will override user's preference)"), + text => ''.&mt($itemtext->{'languages'}).'
'. + &mt("(overrides individual user preference)"), input => 'selectbox', }, timezone => { - text => &mt($itemtext->{'timezone'}), + text => ''.&mt($itemtext->{'timezone'}).'', input => 'selectbox', }, datelocale => { - text => &mt($itemtext->{'datelocale'}), + text => ''.&mt($itemtext->{'datelocale'}).'', input => 'selectbox', }, ); @@ -2240,7 +2219,7 @@ sub print_grading { }, 'rndseed' => { text => ''.&mt($itemtext->{'rndseed'}).''. - ''.'
'. + ''.'
'. &mt('Modifying this will make problems have different numbers and answers!'). '
', input => 'selectbox',