--- loncom/interface/domainprefs.pm 2009/11/16 04:03:05 1.119
+++ loncom/interface/domainprefs.pm 2009/11/23 21:45:18 1.120
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.119 2009/11/16 04:03:05 raeburn Exp $
+# $Id: domainprefs.pm,v 1.120 2009/11/23 21:45:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -303,7 +303,7 @@ sub handler {
col2 => 'Value'}],
},
'coursecategories' =>
- { text => 'Cataloging of courses',
+ { text => 'Cataloging of courses/communities',
help => 'Domain_Configuration_Cataloging_Courses',
header => [{col1 => 'Category settings',
col2 => '',},
@@ -325,6 +325,12 @@ sub handler {
header => [{col1 => 'Setting',
col2 => 'Value',}],
},
+ 'privacy' =>
+ {text => 'User Privacy',
+ help => 'Domain_Configuration_User_Privacy',
+ header => [{col1 => 'Setting',
+ col2 => 'Value',}],
+ },
);
my %servers = &dom_servers($dom);
if (keys(%servers) > 1) {
@@ -2595,6 +2601,11 @@ sub print_coursecategories {
my $toggle_cats_dom = ' checked="checked" ';
my $can_cat_crs = ' ';
my $can_cat_dom = ' checked="checked" ';
+ my $toggle_catscomm_comm = ' ';
+ my $toggle_catscomm_dom = ' checked="checked" ';
+ my $can_catcomm_comm = ' ';
+ my $can_catcomm_dom = ' checked="checked" ';
+
if (ref($settings) eq 'HASH') {
if ($settings->{'togglecats'} eq 'crs') {
$toggle_cats_crs = $toggle_cats_dom;
@@ -2604,14 +2615,25 @@ sub print_coursecategories {
$can_cat_crs = $can_cat_dom;
$can_cat_dom = ' ';
}
+ if ($settings->{'togglecatscomm'} eq 'comm') {
+ $toggle_catscomm_comm = $toggle_catscomm_dom;
+ $toggle_catscomm_dom = ' ';
+ }
+ if ($settings->{'categorizecomm'} eq 'comm') {
+ $can_catcomm_comm = $can_catcomm_dom;
+ $can_catcomm_dom = ' ';
+ }
}
my %title = &Apache::lonlocal::texthash (
- togglecats => 'Show/Hide a course in the catalog',
- categorize => 'Assign a category to a course',
+ togglecats => 'Show/Hide a course in catalog',
+ togglecatscomm => 'Show/Hide a community in catalog',
+ categorize => 'Assign a category to a course',
+ categorizecomm => 'Assign a category to a community',
);
my %level = &Apache::lonlocal::texthash (
- dom => 'Set in "Modify Course" (Domain)',
- crs => 'Set in "Modify Parameters" (Course)',
+ dom => 'Set in Domain',
+ crs => 'Set in Course',
+ comm => 'Set in Community',
);
$datatable = '
'.
''.$title{'togglecats'}.' | '.
@@ -2627,8 +2649,22 @@ sub print_coursecategories {
$can_cat_dom.' value="dom" />'.$level{'dom'}.' '.
''.
+ '
'.
+ ''.$title{'togglecatscomm'}.' | '.
+ ' '.
+ ' | '.
+ '
'.
+ ''.$title{'categorizecomm'}.' | '.
+ ''.
+ ' '.
+ ' | '.
'
';
- $$rowtotal += 2;
+ $$rowtotal += 4;
} else {
my $css_class;
my $itemcount = 1;
@@ -2650,7 +2686,15 @@ sub print_coursecategories {
if (ref($cats[0]) eq 'ARRAY') {
my $numtop = @{$cats[0]};
my $maxnum = $numtop;
- if ((!grep(/^instcode$/,@{$cats[0]})) || ($cathash->{'instcode::0'} eq '')) {
+ my %default_names = (
+ instcode => &mt('Official courses'),
+ communities => &mt('Communities'),
+ );
+
+ if ((!grep(/^instcode$/,@{$cats[0]})) ||
+ ($cathash->{'instcode::0'} eq '') ||
+ (!grep(/^communities$/,@{$cats[0]})) ||
+ ($cathash->{'communities::0'} eq '')) {
$maxnum ++;
}
my $lastidx;
@@ -2671,14 +2715,33 @@ sub print_coursecategories {
$datatable .= '';
}
$datatable .= '';
- if ($parent eq 'instcode') {
- $datatable .= ''.&mt('Official courses')
- .' ('
- .&mt('with institutional codes').') | '
- .' '
- .' | ';
+ if ($parent eq 'instcode' || $parent eq 'communities') {
+ $datatable .= ''
+ .$default_names{$parent}.'';
+ if ($parent eq 'instcode') {
+ $datatable .= '
('
+ .&mt('with institutional codes')
+ .')';
+ } else {
+ $datatable .= '';
+ }
+ $datatable .= ' | ';
} else {
$datatable .= $parent
.'