--- loncom/interface/loncommon.pm 2003/09/17 14:30:13 1.118 +++ loncom/interface/loncommon.pm 2003/10/16 19:59:00 1.130 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.118 2003/09/17 14:30:13 www Exp $ +# $Id: loncommon.pm,v 1.130 2003/10/16 19:59:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -80,6 +80,7 @@ my $readit; # ----------------------------------------------- Filetypes/Languages/Copyright my %language; +my %supported_language; my %cprtag; my %fe; my %fd; my %category_extensions; @@ -146,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; + } } } } @@ -348,17 +352,18 @@ sub selectstudent_link { return ''; } 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) { @@ -369,6 +374,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'; @@ -384,7 +395,7 @@ ENDSTDBRW sub selectcourse_link { my ($form,$unameele,$udomele)=@_; return "Select Course"; + '","'.$udomele.'");'."'>".&mt('Select Course').""; } =pod @@ -516,7 +527,7 @@ END foreach my $value (sort(keys(%$hashref))) { $result.=" \n"; } $result .= "\n"; my %select2 = %{$hashref->{$firstdefault}->{'select2'}}; @@ -526,7 +537,7 @@ END foreach my $value (sort(keys(%select2))) { $result.="