[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface coursecatalog.pm
raeburn
raeburn@source.lon-capa.org
Wed, 18 Mar 2009 21:03:25 -0000
raeburn Wed Mar 18 21:03:25 2009 EDT
Modified files: (Branch: version_2_8_X)
/loncom/interface coursecatalog.pm
Log:
- Backport 1.50.
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.48 loncom/interface/coursecatalog.pm:1.48.2.1
--- loncom/interface/coursecatalog.pm:1.48 Sat Feb 7 22:03:45 2009
+++ loncom/interface/coursecatalog.pm Wed Mar 18 21:03:25 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for displaying the course catalog interface
#
-# $Id: coursecatalog.pm,v 1.48 2009/02/07 22:03:45 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.48.2.1 2009/03/18 21:03:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -123,11 +123,16 @@
}
} else {
my (%add_entries);
+ my ($currdepth,$deeper) = &get_depth_values();
if ($selitem) {
+ my $alert = &mt('Choose a subcategory to display');
+ if (!$deeper) {
+ $alert = &mt('Choose a category to display');
+ }
$catjs .= <<ENDJS;
function check_selected() {
if (document.coursecats.$selitem.options[document.coursecats.$selitem.selectedIndex].value == "") {
- alert('Choose a subcategory to display');
+ alert('$alert');
return false;
}
}
@@ -139,7 +144,6 @@
$r->print('<form name="'.$formname.
'" method="post" action="/adm/coursecatalog">'.
&additional_filters($codedom,$has_subcats)."\n");
- my ($currdepth,$deeper) = &get_depth_values();
$r->print('<input type="hidden" name="catalog_maxdepth" value="'.
$deeper.'" />'."\n");
for (my $i=0; $i<$deeper; $i++) {