';
+ $datatable .= &mt('(overrides affiliation, if set)').
+ ''.
+ ''.
+ '';
} else {
- $datatable .= ' ';
+ $datatable .= &mt('(overrides affiliation, if checked)').
+ ''.
+ ''.
+ ' ';
}
my %advcell;
foreach my $item (@usertools) {
@@ -1370,9 +1370,6 @@ sub print_quotas {
}
}
}
- if (!$curroption) {
- $curroption = 'norequest';
- }
$datatable .= ' | '.$titles{$item}.' | ';
my $checked = '';
if ($curroption eq '') {
@@ -2442,6 +2439,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;
@@ -2451,14 +2453,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'}.' | '.
@@ -2474,8 +2487,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;
@@ -2497,7 +2524,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;
@@ -2518,14 +2553,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
.'
|