--- loncom/interface/coursecatalog.pm 2010/09/30 12:01:14 1.58.4.4 +++ loncom/interface/coursecatalog.pm 2012/04/18 19:47:36 1.70 @@ -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.70 2012/04/18 19:47:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -182,16 +182,14 @@ sub course_details { &courselink_javascript().''."\n"; my $start_page = &Apache::loncommon::start_page('Course/Community Catalog',$js, - { - 'add_entries' => \%add_entries, - 'no_inline_link' => 1,}); + {'add_entries' => \%add_entries, }); $r->print($start_page); if ($env{'form.numtitles'} > 0) { &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/coursecatalog", text=>"Course/Community Catalog"}); } - my $brtextone = 'Course listing'; + my $brtextone = 'Course listing'; my $brtexttwo = 'Course details'; if ($env{'form.currcat_0'} eq 'communities::0') { $brtextone = 'Community listing'; @@ -201,6 +199,7 @@ sub course_details { ({href=>"javascript:document.$formname.submit()", text=>$brtextone}, {text=>$brtexttwo}); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog')); $r->print('
'); if ($env{'form.currcat_0'} eq 'communities::0') { $r->print(&mt('Detailed community information:')); @@ -284,7 +283,6 @@ sub instcode_course_selector { $r->print(''."\n". ''."\n". ''."\n". - ''."\n". ''. 'print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog')); - my $onchange; - unless ($env{'form.interface'} eq 'textual') { - $onchange = 'this.form.submit()'; - } + my $onchange = 'this.form.submit()'; $r->print('
'. ''; - } else { + } else { $output .= - ''. + ''. ''. ''; } @@ -1023,7 +1016,13 @@ sub courseinfo_row { if (($info->{'selfenroll_start'} > 0) && ($info->{'selfenroll_start'} > $now)) { $output .= ''; } else { - $output .= ''; + $output .= ''; } $selfenroll = 1; }
'.&mt('Domain:').''. &Apache::loncommon::select_dom_form($codedom,'showdom','',1,$onchange)); @@ -401,7 +394,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"'; @@ -529,9 +522,9 @@ sub additional_filters { } my $selfenroll_text; if ($env{'form.currcat_0'} eq 'communities::0') { - $selfenroll_text = &mt('Only show communities which allow self-enrollment'); + $selfenroll_text = &mt('Only show communities which currently allow self-enrollment (or will allow it in the future)'); } else { - $selfenroll_text = &mt('Only show courses which allow self-enrollment'); + $selfenroll_text = &mt('Only show courses which currently allow self-enrollment (or will allow it in the future)'); } $output .= '
'. ''.$accessdates.''.$accessdates.''.$accessdates.''.$counts.''.$autoenrollment.''.&mt('Starts: [_1]',''.$showstart.'').'
'.&mt('Ends: [_1]',''.$showend.'').'
'.&mt('Enroll in course').''.&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 .= '