--- loncom/interface/loncommon.pm 2003/08/20 18:18:45 1.112 +++ loncom/interface/loncommon.pm 2003/10/27 21:21:08 1.136 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.112 2003/08/20 18:18:45 bowersj2 Exp $ +# $Id: loncommon.pm,v 1.136 2003/10/27 21:21:08 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -68,6 +68,8 @@ use POSIX qw(strftime mktime); use Apache::Constants qw(:common :http :methods); use Apache::lonmsg(); use Apache::lonmenu(); +use Apache::lonlocal; + my $readit; =pod @@ -78,6 +80,7 @@ my $readit; # ----------------------------------------------- Filetypes/Languages/Copyright my %language; +my %supported_language; my %cprtag; my %fe; my %fd; my %category_extensions; @@ -144,8 +147,11 @@ BEGIN { while (<$fh>) { next if /^\#/; chomp; - my ($key,$two,$country,$three,$enc,$val)=(split(/\t/,$_)); + my ($key,$two,$country,$three,$enc,$val,$sup)=(split(/\t/,$_)); $language{$key}=$val.' - '.$enc; + if ($sup) { + $supported_language{$key}=$sup; + } } } } @@ -268,7 +274,7 @@ of the element the selection from the se sub browser_and_searcher_javascript { return <Select User"; + '","'.$udomele.'");'."'>".&mt('Select User').""; } if ($ENV{'request.role'}=~/^(au|dc|su)/) { return "Select User"; + '","'.$udomele.'",1);'."'>".&mt('Select User').""; } return ''; } sub coursebrowser_javascript { - return (<<'ENDSTDBRW'); + my ($domainfilter)=@_; + return (< var stdeditbrowser; function opencrsbrowser(formname,uname,udom) { @@ -367,6 +380,12 @@ sub coursebrowser_javascript { url += 'filter='+filter+'&'; } } + var domainfilter='$domainfilter'; + if (domainfilter != null) { + if (domainfilter != '') { + url += 'domainfilter='+domainfilter+'&'; + } + } url += 'form=' + formname + '&cnumelement='+uname+ '&cdomelement='+udom; var title = 'Course_Browser'; @@ -382,7 +401,7 @@ ENDSTDBRW sub selectcourse_link { my ($form,$unameele,$udomele)=@_; return "Select Course"; + '","'.$udomele.'");'."'>".&mt('Select Course').""; } =pod @@ -514,7 +533,7 @@ END foreach my $value (sort(keys(%$hashref))) { $result.=" \n"; } $result .= "\n"; my %select2 = %{$hashref->{$firstdefault}->{'select2'}}; @@ -524,7 +543,7 @@ END foreach my $value (sort(keys(%select2))) { $result.="