--- loncom/interface/coursecatalog.pm 2010/02/12 00:21:30 1.53.4.4
+++ loncom/interface/coursecatalog.pm 2010/04/14 18:58:37 1.53.4.5
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for displaying the course catalog interface
#
-# $Id: coursecatalog.pm,v 1.53.4.4 2010/02/12 00:21:30 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.53.4.5 2010/04/14 18:58:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -190,17 +190,34 @@ sub course_details {
({href=>"/adm/coursecatalog",
text=>"Course/Community Catalog"});
}
+ my $brtextone = 'Course listing';
+ my $brtexttwo = 'Course details';
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $brtextone = 'Community listing';
+ $brtextone = 'Community details';
+ }
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"javascript:document.$formname.submit()",
- text=>"Course listing"},
- {text=>"Course details"});
+ text=>$brtextone},
+ {text=>$brtexttwo});
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'));
- $r->print('
'.&mt('Detailed course information:').'
'.
+ $r->print('
');
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $r->print(&mt('Detailed community information:'));
+ } else {
+ $r->print(&mt('Detailed course information:'));
+ }
+ $r->print('
'.
&print_course_listing($codedom,undef,$trails,$allitems).
'
');
$r->print('
');
return;
@@ -294,15 +311,19 @@ sub cat_header {
'add_entries' => $add_entries,
'no_inline_link' => 1,});
$r->print($start_page);
+ my $brtext = 'Course listing';
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $brtext = 'Community listing';
+ }
if ($env{'form.state'} eq 'listing') {
if ($numtitles > 0) {
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"/adm/coursecatalog",
text=>"Course/Community Catalog"},
- {text=>"Course listing"});
+ {text=>$brtext});
} else {
&Apache::lonhtmlcommon::add_breadcrumb
- ({text=>"Course listing"});
+ ({text=>$brtext});
}
} else {
&Apache::lonhtmlcommon::add_breadcrumb
@@ -634,7 +655,11 @@ sub print_course_listing {
$env{'form.coursenum'},
undef,undef,'.',1);
if (keys(%courses) == 0) {
- $output .= &mt('The courseID provided does not match a course in this domain.');
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $output .= &mt('The courseID provided does not match a community in this domain.');
+ } else {
+ $output .= &mt('The courseID provided does not match a course in this domain.');
+ }
return $output;
}
} else {
@@ -703,10 +728,14 @@ sub construct_data_table {
}
if ($knownuser) {
if ($details) {
- $output .=
- ''.&mt('Default Access Dates for Students').' | '.
- ''.&mt('Student Counts').' | '.
- ''.&mt('Auto-enrollment of[_1]registered students',' ').' | ';
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $output .= ''.&mt('Default Access Dates for Members').' | ';
+ } else {
+ $output .=
+ ''.&mt('Default Access Dates for Students').' | '.
+ ''.&mt('Student Counts').' | '.
+ ''.&mt('Auto-enrollment of[_1]registered students',' ').' | ';
+ }
} else {
$output .= ''.&mt('Details').' | ';
}
@@ -975,10 +1004,14 @@ sub courseinfo_row {
''.$ownerlast.' | ';
if ($knownuser) {
if ($details) {
- $output .=
- ''.$accessdates.' | '.
- ''.$counts.' | '.
- ''.$autoenrollment.' | ';
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $output .= ''.$accessdates.' | ';
+ } else {
+ $output .=
+ ''.$accessdates.' | '.
+ ''.$counts.' | '.
+ ''.$autoenrollment.' | ';
+ }
} else {
$output .= "".&mt('Show more details').' | ';
}