--- loncom/interface/courseprefs.pm 2010/01/07 18:21:25 1.16
+++ loncom/interface/courseprefs.pm 2010/01/08 00:04:04 1.19
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.16 2010/01/07 18:21:25 faziophi Exp $
+# $Id: courseprefs.pm,v 1.19 2010/01/08 00:04:04 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',
+ 'cloners','url','rolenames'],
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 => {
@@ -371,11 +355,15 @@ sub print_config_box {
&Apache::loncommon::help_open_topic($item->{'help'}).'';
if (($action eq 'feedback') || ($action eq 'classlists')) {
$output .= '
-
-
+ ';
+ if (exists $item->{'header'}->[0]->{'col1'} ||
+ exists $item->{'header'}->[0]->{'col2'}) {
+ $output .= '
+
'.&mt($item->{'header'}->[0]->{'col1'}).' |
'.&mt($item->{'header'}->[0]->{'col2'}).' |
-
';
+ ';
+ }
$rowtotal ++;
if ($action eq 'feedback') {
$output .= &print_feedback('top',$cdom,$settings,$ordered,$itemtext,\$rowtotal);
@@ -394,19 +382,27 @@ sub print_config_box {
$output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype).
'
-
-
- '.&mt($item->{'header'}->[2]->{'col1'}).' |
- '.&mt($item->{'header'}->[2]->{'col2'}).' |
-
';
+ ';
+ if (exists $item->{'header'}->[0]->{'col1'} ||
+ exists $item->{'header'}->[0]->{'col2'}) {
+ $output .= '
+
+ '.&mt($item->{'header'}->[0]->{'col1'}).' |
+ '.&mt($item->{'header'}->[0]->{'col2'}).' |
+
';
+ }
}
} else {
$output .= '
-
-
+ ';
+ if (exists $item->{'header'}->[0]->{'col1'} ||
+ exists $item->{'header'}->[0]->{'col2'}) {
+ $output .= '
+
'.&mt($item->{'header'}->[0]->{'col1'}).' |
'.&mt($item->{'header'}->[0]->{'col2'}).' |
-
';
+ ';
+ }
}
$rowtotal ++;
if ($action eq 'courseinfo') {
@@ -1313,6 +1309,7 @@ sub print_courseinfo {
'',
input => 'textbox',
size => '40',
+ advanced => 1
},
'description' => {
text => ''.&mt($itemtext->{'description'}).'',
@@ -1330,12 +1327,14 @@ sub print_courseinfo {
&mt('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'}).'
('.
@@ -1364,7 +1363,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') {
@@ -1632,16 +1635,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',
},
);
@@ -2223,7 +2226,7 @@ sub print_grading {
},
'rndseed' => {
text => ''.&mt($itemtext->{'rndseed'}).''.
- ''.'
'.
+ ''.'
'.
&mt('Modifying this will make problems have different numbers and answers!').
'',
input => 'selectbox',
@@ -2435,15 +2438,13 @@ sub get_other_items {
}
sub item_table_row_start {
- my ($text,$count) = @_;
+ my ($text,$count,$add_class) = @_;
my $output;
- if ($count%2) {
- $output .= '';
- } else {
- $output .= '
';
- }
+ my $css_class = ($count % 2) ? 'LC_odd_row' : 'LC_even_row';
+ $css_class = (join(' ',$css_class,$add_class)) unless ($add_class eq '');
+ $output .= '
'."\n";;
$output .= ''.$text.
- ' | ';
+ ' | ';
return $output;
}
|