--- loncom/interface/lonhtmlcommon.pm 2007/10/10 00:02:19 1.167 +++ loncom/interface/lonhtmlcommon.pm 2007/11/16 06:31:26 1.170 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.167 2007/10/10 00:02:19 albertel Exp $ +# $Id: lonhtmlcommon.pm,v 1.170 2007/11/16 06:31:26 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -486,8 +486,8 @@ sub build_url { my ($base, $fields)=@_; my $url; $url = $base.'?'; - foreach my $key(keys(%$fields)) { - $url.=$key.'='.$$fields{$key}.'&'; + foreach my $key (keys(%$fields)) { + $url.=&escape($key).'='.&escape($$fields{$key}).'&'; } $url =~ s/&$//; return $url; @@ -868,7 +868,7 @@ sub Create_PrgWin { function openpopwin () { popwin=open(\'\',\'popwin\',\'width=400,height=100\');". "popwin.document.writeln(\'".$start_page. - "

$heading<\/h4>". + "

".&mt("$heading")."<\/h4>". "
". '<\\/form>'.$end_page. @@ -887,8 +887,7 @@ sub Create_PrgWin { } if (!$inputname) { $prog_state{'inputname'}=&get_uniq_name(); - &r_print($r,$heading.' '); + &r_print($r,&mt("$heading [_1]",' ')); } else { $prog_state{'inputname'}=$inputname; @@ -1473,7 +1472,14 @@ sub course_select_row { my ($title,$formname,$totcodes,$codetitles,$idlist,$idlist_titles, $css_class) = @_; my $output = &row_title($title,$css_class); - $output .= qq| + $output .= &course_selection($formname,$totcodes,$codetitles,$idlist,$idlist_titles); + $output .= &row_closure(); + return $output; +} + +sub course_selection { + my ($formname,$totcodes,$codetitles,$idlist,$idlist_titles) = @_; + my $output = qq|