--- loncom/interface/coursecatalog.pm 2010/05/30 14:49:22 1.58.4.1
+++ loncom/interface/coursecatalog.pm 2010/08/14 02:00:27 1.58.4.2
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for displaying the course catalog interface
#
-# $Id: coursecatalog.pm,v 1.58.4.1 2010/05/30 14:49:22 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.58.4.2 2010/08/14 02:00:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -87,8 +87,13 @@ sub handler {
}
&Apache::loncommon::extract_categories($cathash,\@cats,\@trails,\%allitems,
\%idx,\@jsarray,$subcats);
+ my ($numtitles,@codetitles);
if ($env{'form.coursenum'} ne '' && &user_is_known()) {
- &course_details($r,$codedom,$formname,$domdesc,\@trails,\%allitems);
+ if ($env{'form.currcat_0'} eq 'instcode::0') {
+ $numtitles = &instcode_course_selector($r,$codedom,$formname,$domdesc,
+ undef,undef,\@codetitles);
+ }
+ &course_details($r,$codedom,$formname,$domdesc,\@trails,\%allitems,\@codetitles);
} else {
my ($catlinks,$has_subcats,$selitem) = &category_breadcrumbs($codedom,@cats);
my $catjs = <<"ENDSCRIPT";
@@ -114,12 +119,12 @@ function setCourseId(caller) {
ENDSCRIPT
$catjs .= &courselink_javascript();
- my $numtitles;
if ($env{'form.currcat_0'} eq 'instcode::0') {
$numtitles = &instcode_course_selector($r,$codedom,$formname,$domdesc,
- $catlinks,$catjs);
+ $catlinks,$catjs,\@codetitles);
if ($env{'form.state'} eq 'listing') {
- $r->print(&print_course_listing($codedom,$numtitles));
+ $r->print(&print_course_listing($codedom,$numtitles,undef,undef,undef,
+ \@codetitles));
}
} else {
my (%add_entries);
@@ -164,7 +169,7 @@ ENDJS
$display_button.'" />
');
}
if ($env{'form.state'} eq 'listing') {
- $r->print(&print_course_listing($codedom,undef,\@trails,\%allitems,$subcats));
+ $r->print(&print_course_listing($codedom,undef,\@trails,\%allitems,$subcats,\@codetitles));
}
}
}
@@ -173,7 +178,7 @@ ENDJS
}
sub course_details {
- my ($r,$codedom,$formname,$domdesc,$trails,$allitems) = @_;
+ my ($r,$codedom,$formname,$domdesc,$trails,$allitems,$codetitles) = @_;
my $output;
my %add_entries = (topmargin => "0",
marginheight => "0",);
@@ -207,7 +212,7 @@ sub course_details {
$r->print(&mt('Detailed course information:'));
}
$r->print('
'.
- &print_course_listing($codedom,undef,$trails,$allitems).
+ &print_course_listing($codedom,undef,$trails,$allitems,undef,$codetitles).
'
');
$r->print('