--- loncom/interface/coursecatalog.pm 2021/04/29 17:45:22 1.103 +++ loncom/interface/coursecatalog.pm 2021/04/30 18:19:41 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for displaying the course catalog interface # -# $Id: coursecatalog.pm,v 1.103 2021/04/29 17:45:22 raeburn Exp $ +# $Id: coursecatalog.pm,v 1.104 2021/04/30 18:19:41 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -337,7 +337,7 @@ ENDTOGGJS $catlinks,$catjs,\@codetitles,$cattype,$canviewall); if ($env{'form.state'} eq 'listing') { $r->print(&print_course_listing($codedom,$numtitles,undef,undef,undef, - \@codetitles,$canviewall)); + \@codetitles,$canviewall,$hostname)); } } else { my (%add_entries); @@ -386,7 +386,7 @@ ENDJS } if ($env{'form.state'} eq 'listing') { $r->print(&print_course_listing($codedom,undef,\@trails,\%allitems,$subcats,\@codetitles, - $canviewall)); + $canviewall,$hostname)); } } } @@ -699,7 +699,7 @@ sub course_details { $r->print( &Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'). '

'.$textthree.'

'. - &print_course_listing($codedom,undef,$trails,$allitems,undef,$codetitles). + &print_course_listing($codedom,undef,$trails,$allitems,undef,$codetitles,undef,$hostname). '
'. '
'. &Apache::lonhtmlcommon::actionbox([ @@ -1322,7 +1322,7 @@ sub search_courselist { } sub print_course_listing { - my ($domain,$numtitles,$trails,$allitems,$subcats,$codetitles,$canviewall) = @_; + my ($domain,$numtitles,$trails,$allitems,$subcats,$codetitles,$canviewall,$hostname) = @_; my $output; my %courses; my $knownuser = &user_is_known(); @@ -1375,7 +1375,7 @@ sub print_course_listing { } my $now = time; $output .= &construct_data_table($knownuser,$domain,\%courses,$details,undef, - $now,$trails,$allitems,$canviewall); + $now,$trails,$allitems,$canviewall,$hostname); $output .= "\n".''. ''. ''. @@ -1384,7 +1384,8 @@ sub print_course_listing { } sub construct_data_table { - my ($knownuser,$domain,$courses,$details,$usersections,$now,$trails,$allitems,$canviewall) = @_; + my ($knownuser,$domain,$courses,$details,$usersections,$now, + $trails,$allitems,$canviewall,$hostname) = @_; my %sortname; if (($details eq '') || ($env{'form.showdetails'})) { $sortname{'Code'} = 'code'; @@ -1886,7 +1887,7 @@ sub courseinfo_row { my $usehttp = 0; if (($ENV{'SERVER_PORT'} == 443) && ($extsyllplain)) { unless ((&Apache::lonnet::uses_sts()) || - (&Apache::lonnet::waf_allssl(hostname))) { + (&Apache::lonnet::waf_allssl($hostname))) { $usehttp = 1; } }