--- loncom/interface/courseprefs.pm 2010/01/07 18:43:32 1.17
+++ 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.17 2010/01/07 18:43:32 faziophi Exp $
+# $Id: courseprefs.pm,v 1.19 2010/01/08 00:04:04 faziophi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -161,11 +161,9 @@ sub handler {
'courseinfo' =>
{ text => $lt{'gens'},
help => 'Course_Environment',
- header => [{col1 => 'Setting',
- col2 => 'Value'}],
ordered => ['description','courseid','categories',
'hidefromcat','externalsyllabus',
- 'url','rolenames','cloners'],
+ 'cloners','url','rolenames'],
itemtext => {
description => $lt{'desc'},
courseid => $lt{'idnu'},
@@ -180,8 +178,6 @@ sub handler {
'localization' =>
{ text => 'Language & Time Localization',
help => 'Course_Environment',
- header => [{col1 => 'Setting',
- col2 => 'Value',}],
ordered => ['languages','timezone','datelocale'],
itemtext => {
languages => 'Language(s)',
@@ -206,8 +202,6 @@ 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',
@@ -246,8 +240,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'],
@@ -262,8 +254,6 @@ sub handler {
'grading' =>
{ text => 'Grading',
help => 'Course_Environment',
- header => [{col1 => 'Setting',
- col2 => 'Value',}],
ordered => ['grading','rndseed',
'receiptalg','disablesigfigs'],
itemtext => {
@@ -277,8 +267,6 @@ sub handler {
'printouts' =>
{ 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') {
@@ -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;
}
|