--- loncom/interface/coursecatalog.pm 2010/09/30 12:01:14 1.58.4.4
+++ loncom/interface/coursecatalog.pm 2012/02/14 00:29:50 1.58.4.8.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for displaying the course catalog interface
#
-# $Id: coursecatalog.pm,v 1.58.4.4 2010/09/30 12:01:14 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.58.4.8.2.1 2012/02/14 00:29:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -284,7 +284,6 @@ sub instcode_course_selector {
$r->print(''."\n".
''."\n".
''."\n".
- ''."\n".
''.
''.
- '
'.
- '');
return;
@@ -401,7 +402,7 @@ sub category_breadcrumbs {
$catlinks .= '';
for (my $j=0; $j<@{$cats[$shallower]{$container}}; $j++) {
my $name = $cats[$shallower]{$container}[$j];
- my $item = &escape($name).':'.$container.':'.$shallower;
+ my $item = &escape($name).':'.&escape($container).':'.$shallower;
my $selected = '';
if ($item eq $env{'form.currcat_'.$shallower}) {
$selected = ' selected="selected"';
@@ -805,8 +806,8 @@ sub build_courseinfo_hash {
$selfenroll_end = $courses->{$course}{'selfenroll_end_date'};
$categories = $courses->{$course}{'categories'};
push(@owners,$singleowner);
- if (ref($courses->{$course}{'co-owners'}) eq 'ARRAY') {
- foreach my $item (@{$courses->{$course}{'co-owners'}}) {
+ if ($courses->{$course}{'co-owners'} ne '') {
+ foreach my $item (split(/,/,$courses->{$course}{'co-owners'})) {
push(@owners,$item);
}
}
@@ -1023,7 +1024,13 @@ sub courseinfo_row {
if (($info->{'selfenroll_start'} > 0) && ($info->{'selfenroll_start'} > $now)) {
$output .= ''.&mt('Starts: [_1]',''.$showstart.'').' '.&mt('Ends: [_1]',''.$showend.'').' | ';
} else {
- $output .= ''.&mt('Enroll in course').' | ';
+ $output .= ''.&mt('Enroll in course').' ';
+ if ($info->{'selfenroll_end'} == 0) {
+ $output .= &mt('Available permanently');
+ } elsif ($info->{'selfenroll_end'} > $now) {
+ $output .= &mt('Self-enrollment ends: [_1]',''.$showend.'');
+ }
+ $output .= ' | ';
}
$selfenroll = 1;
}