[LON-CAPA-cvs] cvs: loncom /interface coursecatalog.pm

raeburn raeburn@source.lon-capa.org
Sat, 07 Feb 2009 18:06:19 -0000


raeburn		Sat Feb  7 18:06:19 2009 EDT

  Modified files:              
    /loncom/interface	coursecatalog.pm 
  Log:
  - Corner case: Main Categories set to include both "official courses" and one or more custom categories, but there are no courses with institutional codes.  
    - Javascript function setCatDepth() needed for Main Categories link was absent in this one case.
  
  
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.44 loncom/interface/coursecatalog.pm:1.45
--- loncom/interface/coursecatalog.pm:1.44	Tue Sep 23 20:31:09 2008
+++ loncom/interface/coursecatalog.pm	Sat Feb  7 18:06:19 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler for displaying the course catalog interface
 #
-# $Id: coursecatalog.pm,v 1.44 2008/09/23 20:31:09 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.45 2009/02/07 18:06:19 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -351,6 +351,7 @@
                   '<input type="hidden" name="numtitles" value="'.$numtitles.
                   '" /></form><br /><br />');
     } else {
+        $js = '<script type"text/javascript">'."\n$catjs\n".'</script>';
         &cat_header($r,$codedom,$js,\%add_entries,$catlinks,$numtitles);
         my $cat_maxdepth = $env{'form.catalog_maxdepth'};
         $r->print('<form name="'.$formname.'" method="post" action="/adm/coursecatalog">'.