--- loncom/interface/lonpickcourse.pm 2009/05/05 05:30:00 1.80 +++ loncom/interface/lonpickcourse.pm 2009/05/14 09:58:31 1.82 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a course # -# $Id: lonpickcourse.pm,v 1.80 2009/05/05 05:30:00 raeburn Exp $ +# $Id: lonpickcourse.pm,v 1.82 2009/05/14 09:58:31 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -51,7 +51,6 @@ sub handler { ($ENV{'QUERY_STRING'},['domainfilter','form','cnumelement', 'cdomelement','cnameelement','roleelement', 'multiple','type','setroles','fixeddom']); - my ($type,$title,$jscript,$multelement,$multiple,$roleelement, $lastaction,$autosubmit,$submitopener); @@ -60,13 +59,13 @@ sub handler { if (!defined($env{'form.type'})) { $type = 'Course'; } - $title = &mt('Selecting a [_1]',$type); + $title = 'Selecting a '.$type; # Setup for multiple course selections, if flag for multiples set. $multiple = $env{'form.multiple'}; if ($multiple) { ($jscript,$multelement) = &multiples_tag(); - $title = &mt('Selecting [_1](s)',lc($type)); + $title = 'Selecting '.$type.'(s)'; } # if called when a DC is selecting a course @@ -423,12 +422,14 @@ sub multiples_tag { sub build_filters { my ($filterlist,$type,$roleelement,$multelement,$filter,$action, - $numtitlesref) = @_; + $numtitlesref,$caller) = @_; my $list; my $formname; my ($fixeddom,$codedom,$jscript); if (defined($env{'form.form'})) { - $formname = $env{'form.form'}; + $formname = $env{'form.form'}; + } else { + $formname = $caller; } my ($domainselectform,$sincefilterform,$ownerdomselectform,$persondomselectform, $instcodeform,$typeselectform,$instcodetitle); @@ -954,10 +955,10 @@ Side Effects: None =item * X -B: +B: -Input: 7 - anonymous array of search criteria; course type; $roleelement ; $multelement ; anonymous hash of criteria and their values; form action; ref to scalar (count of number of elements in institutional codes -- e.g., 4 for year, semester, department, and number). +Input: 7 - anonymous array of search criteria; course type; $roleelement ; $multelement ; anonymous hash of criteria and their values; form action; ref to scalar (count of number of elements in institutional codes -- e.g., 4 for year, semester, department, and number); caller context (e.g., set to 'modifycourse' when routine is called from lonmodifycourse.pm). Output: 1 - $output - HTML for display of search criteria, and hidden form elements.