--- loncom/interface/lonmodifycourse.pm 2015/03/23 13:03:32 1.76 +++ loncom/interface/lonmodifycourse.pm 2016/03/29 14:05:10 1.79 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.76 2015/03/23 13:03:32 droeschl Exp $ +# $Id: lonmodifycourse.pm,v 1.79 2016/03/29 14:05:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -208,7 +208,7 @@ sub print_course_selection_page { my %courses = &Apache::loncommon::search_courses($dom,$type,$filter,$numtitles, undef,undef,undef,\@codetitles); &Apache::lonpickcourse::display_matched_courses($r,$type,0,$action,undef,undef,undef, - %courses); + undef,undef,%courses); return; } @@ -1901,6 +1901,8 @@ function hide_searching() { } elsif ($phase eq 'setquota') { my $invalid = &mt('The quota you entered contained invalid characters.'); my $alert = &mt('You must enter a number'); + &js_escape(\$invalid); + &js_escape(\$alert); my $regexp = '/^\s*(\d+\.?\d*|\.\d+)\s*$/'; $js .= <<"ENDSCRIPT"; @@ -1920,6 +1922,8 @@ ENDSCRIPT } elsif ($phase eq 'setanon') { my $invalid = &mt('The responder threshold you entered is invalid.'); my $alert = &mt('You must enter a positive integer.'); + &js_escape(\$invalid); + &js_escape(\$alert); my $regexp = ' /^\s*\d+\s*$/'; $js .= <<"ENDSCRIPT"; @@ -1945,6 +1949,9 @@ ENDSCRIPT my $invalid = &mt('The choice entered for disabling the submit button is invalid.'); my $invalidtimeout = &mt('The timeout you entered for disabling the submit button is invalid.'); my $alert = &mt('Enter one of: a positive integer, 0 (for no timeout), or leave blank to use domain default'); + &js_escape(\$invalid); + &js_escape(\$invalidtimeout); + &js_escape(\$alert); my $regexp = ' /^\s*\d+\s*$/'; $js .= <<"ENDSCRIPT"; @@ -2129,7 +2136,7 @@ sub hidden_form_elements { sub showcredits { my ($dom) = @_; my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); - if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'} || $domdefaults{'textbokcredits'}) { + if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'} || $domdefaults{'textbookcredits'}) { return 1; } }