--- loncom/interface/coursecatalog.pm 2010/10/07 14:41:49 1.65 +++ loncom/interface/coursecatalog.pm 2011/11/21 15:42:59 1.69 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for displaying the course catalog interface # -# $Id: coursecatalog.pm,v 1.65 2010/10/07 14:41:49 raeburn Exp $ +# $Id: coursecatalog.pm,v 1.69 2011/11/21 15:42:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -283,7 +283,6 @@ sub instcode_course_selector { $r->print(''."\n". ''."\n". ''."\n". - ''."\n". ''. '{$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); } } @@ -1017,7 +1016,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; }