--- loncom/interface/coursecatalog.pm 2013/03/01 18:09:16 1.73
+++ loncom/interface/coursecatalog.pm 2014/03/17 18:20:32 1.80
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for displaying the course catalog interface
#
-# $Id: coursecatalog.pm,v 1.73 2013/03/01 18:09:16 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.80 2014/03/17 18:20:32 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -66,13 +66,20 @@ sub handler {
}
my $formname = 'coursecatalog';
if ($env{'form.showdom'} ne '') {
+ $env{'form.showdom'} = &LONCAPA::clean_domain($env{'form.showdom'});
if (&Apache::lonnet::domain($env{'form.showdom'}) ne '') {
$codedom = $env{'form.showdom'};
+ } else {
+ $env{'form.showdom'} = '';
}
}
my $domdesc = &Apache::lonnet::domain($codedom,'description');
&Apache::lonhtmlcommon::clear_breadcrumbs();
+ if ($env{'form.catalog_maxdepth'} ne '') {
+ $env{'form.catalog_maxdepth'} =~ s{\D}{}g;
+ }
+
my %domconfig =
&Apache::lonnet::get_dom('configuration',['coursecategories'],$codedom);
my (@cats,@trails,%allitems,%idx,@jsarray,%subcathash,$cathash);
@@ -229,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('