--- loncom/interface/coursecatalog.pm 2013/12/30 01:33:21 1.77 +++ loncom/interface/coursecatalog.pm 2014/01/15 18:49:19 1.78 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for displaying the course catalog interface # -# $Id: coursecatalog.pm,v 1.77 2013/12/30 01:33:21 raeburn Exp $ +# $Id: coursecatalog.pm,v 1.78 2014/01/15 18:49:19 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -236,26 +236,25 @@ 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:')); - } else { - $r->print(&mt('Detailed course information:')); - } - $r->print('

'. - &print_course_listing($codedom,undef,$trails,$allitems,undef,$codetitles). - '

'); - $r->print('
'. - ''); - 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(''. - &Apache::lonhtmlcommon::echo_form_input(['coursenum','catalogfilter', - 'showdetails','courseid']).'
'); + $r->print( + &Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'). + '

'. + (($env{'form.currcat_0'} eq 'communities::0') ? + &mt('Detailed community information:') : + &mt('Detailed course information:')). + '

'. + &print_course_listing($codedom,undef,$trails,$allitems,undef,$codetitles). + '
'. + '
'. + &Apache::lonhtmlcommon::actionbox([ + ''. + (($env{'form.currcat_0'} eq 'communities::0') ? + &mt('Back to community listing') : &mt('Back to course listing')). + '' + ]). + &Apache::lonhtmlcommon::echo_form_input(['coursenum','catalogfilter', + 'showdetails','courseid']). + '
'); return; } @@ -822,11 +821,13 @@ sub print_course_listing { $env{'form.coursenum'}, undef,undef,'.',1); if (keys(%courses) == 0) { + $output = '

'; 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.'); } + $output .= '

'; return $output; } } else { @@ -836,17 +837,13 @@ sub print_course_listing { %courses = &search_courselist($domain,$subcats); } if (keys(%courses) == 0) { + $output = '

'; if ($env{'form.currcat_0'} eq 'communities::0') { - $output = - '

' - .&mt('No communities match the criteria you selected.') - .'

'; + $output .= &mt('No communities match the criteria you selected.'); } else { - $output = - '

' - .&mt('No courses match the criteria you selected.') - .'

'; + $output .= &mt('No courses match the criteria you selected.'); } + $output .= '

'; return $output; } if (($knownuser) && (!$env{'form.showdetails'}) && (!&user_is_dc($domain))) {