--- loncom/interface/coursecatalog.pm 2008/07/07 15:20:18 1.36 +++ loncom/interface/coursecatalog.pm 2008/07/14 10:24:27 1.39 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for displaying the course catalog interface # -# $Id: coursecatalog.pm,v 1.36 2008/07/07 15:20:18 raeburn Exp $ +# $Id: coursecatalog.pm,v 1.39 2008/07/14 10:24:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -53,7 +53,8 @@ sub handler { } &Apache::lonacc::get_posted_cgi($r); &Apache::lonlocal::get_language_handle($r); - &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['sortby']); + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['sortby','showdom']); my $codedom = &Apache::lonnet::default_login_domain(); @@ -101,9 +102,6 @@ function setCatDepth(depth) { return; } -ENDSCRIPT - if ($env{'form.state'} eq 'listing') { - $catjs .= qq| function changeSort(caller) { document.$formname.sortby.value = caller; document.$formname.submit(); @@ -111,8 +109,9 @@ function changeSort(caller) { function setCourseId(caller) { document.$formname.coursenum.value = caller; document.$formname.submit(); -}\n|; - } +} + +ENDSCRIPT my $numtitles; if ($env{'form.currcat_0'} eq 'instcode::0') { $numtitles = &instcode_course_selector($r,$codedom,$formname,$domdesc, @@ -173,7 +172,7 @@ sub course_details { {text=>"Course details"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course Details')); $r->print('
'.&mt('Detailed course information:').'

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

'); $r->print(''. @@ -319,10 +318,7 @@ function setElements() { ''. ''); - if (($numtitles > 0) && ($env{'form.state'} eq 'listing')) { - $r->print('
'); - } + '" />

'); } else { &cat_header($r,$codedom,$js,\%add_entries,$catlinks,$numtitles); my $cat_maxdepth = $env{'form.catalog_maxdepth'}; @@ -492,8 +488,8 @@ sub additional_filters { $output .= ''; + &mt('Include subcategories within "[_1]"', + &unescape($catname)).''; } } my $show_selfenroll_status; @@ -841,7 +837,7 @@ sub build_courseinfo_hash { $cleandesc=~s/'/\\'/g; $cleandesc =~ s/^\s+//; my ($cdom,$cnum)=split(/\_/,$course); - my ($descr,$instcode,$singleowner,$ttype,$selfenroll_types, + my ($instcode,$singleowner,$ttype,$selfenroll_types, $selfenroll_start,$selfenroll_end,@owners,%ownernames,$categories); if (ref($courses->{$course}) eq 'HASH') { $descr = $courses->{$course}{'description'}; @@ -1097,7 +1093,7 @@ sub identify_sections { } } @secnums = sort {$a <=> $b} @secnums; - my $seclist = join(', ',@secnums); + $seclist = join(', ',@secnums); my $numsec = @secnums; return ($seclist,$numsec); }