[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface coursecatalog.pm
raeburn
raeburn@source.lon-capa.org
Wed, 14 Apr 2010 18:58:37 -0000
raeburn Wed Apr 14 18:58:37 2010 EDT
Modified files: (Branch: version_2_9_X)
/loncom/interface coursecatalog.pm
Log:
- Backport 1.60.
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.53.4.4 loncom/interface/coursecatalog.pm:1.53.4.5
--- loncom/interface/coursecatalog.pm:1.53.4.4 Fri Feb 12 00:21:30 2010
+++ loncom/interface/coursecatalog.pm Wed Apr 14 18:58:37 2010
@@ -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 @@
({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('<br />'.&mt('Detailed course information:').'<br /><br />'.
+ $r->print('<br />');
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $r->print(&mt('Detailed community information:'));
+ } else {
+ $r->print(&mt('Detailed course information:'));
+ }
+ $r->print('<br /><br />'.
&print_course_listing($codedom,undef,$trails,$allitems).
'<br /><br />');
$r->print('<form name="'.$formname.'" method="post" action="/adm/coursecatalog">'.
- '<a href = "javascript:document.coursecatalog.submit()">'.
- &mt('Back to course listing').'</a>'.
+ '<a href = "javascript:document.coursecatalog.submit()">');
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $r->print(&mt('Back to community listing'));
+ } else {
+ $r->print(&mt('Back to course listing'));
+ }
+ $r->print('</a>'.
&Apache::lonhtmlcommon::echo_form_input(['coursenum','catalogfilter',
'showdetails','courseid']).'</form>');
return;
@@ -294,15 +311,19 @@
'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 @@
$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 @@
}
if ($knownuser) {
if ($details) {
- $output .=
- '<th>'.&mt('Default Access Dates for Students').'</th>'.
- '<th>'.&mt('Student Counts').'</th>'.
- '<th>'.&mt('Auto-enrollment of[_1]registered students','<br />').'</th>';
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $output .= '<th>'.&mt('Default Access Dates for Members').'</th>';
+ } else {
+ $output .=
+ '<th>'.&mt('Default Access Dates for Students').'</th>'.
+ '<th>'.&mt('Student Counts').'</th>'.
+ '<th>'.&mt('Auto-enrollment of[_1]registered students','<br />').'</th>';
+ }
} else {
$output .= '<th>'.&mt('Details').'</th>';
}
@@ -975,10 +1004,14 @@
'<td>'.$ownerlast.'</td>';
if ($knownuser) {
if ($details) {
- $output .=
- '<td>'.$accessdates.'</td>'.
- '<td>'.$counts.'</td>'.
- '<td>'.$autoenrollment.'</td>';
+ if ($env{'form.currcat_0'} eq 'communities::0') {
+ $output .= '<td>'.$accessdates.'</td>';
+ } else {
+ $output .=
+ '<td>'.$accessdates.'</td>'.
+ '<td>'.$counts.'</td>'.
+ '<td>'.$autoenrollment.'</td>';
+ }
} else {
$output .= "<td><a href=\"javascript:setCourseId('$cnum')\">".&mt('Show more details').'</a></td>';
}