--- loncom/interface/loncommon.pm 2003/03/26 19:34:42 1.90 +++ loncom/interface/loncommon.pm 2003/05/04 21:20:17 1.98 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.90 2003/03/26 19:34:42 www Exp $ +# $Id: loncommon.pm,v 1.98 2003/05/04 21:20:17 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -151,8 +151,8 @@ BEGIN { while (<$fh>) { next if /^\#/; chomp; - my ($key,$val)=(split(/\s+/,$_,2)); - $language{$key}=$val; + my ($key,$two,$country,$three,$enc,$val)=(split(/\t/,$_)); + $language{$key}=$val.' - '.$enc; } } } @@ -346,7 +346,37 @@ sub selectstudent_link { return ''; } return "Select"; + '","'.$udomele.'");'."'>Select User"; +} + +sub coursebrowser_javascript { + return (<<'ENDSTDBRW'); + +ENDSTDBRW +} + +sub selectcourse_link { + my ($form,$unameele,$udomele)=@_; + return "Select Course"; } ############################################################### @@ -1317,6 +1347,26 @@ sub languagedescription { return $language{shift(@_)}; } +# ----------------------------------------------------------- Display Languages +# returns a hash with all desired display languages +# + +sub display_languages { + my %languages=(); + if ($ENV{'environment.languages'}) { + foreach (split(/\s*(\,|\;|\:)\s*/,$ENV{'environment.languages'})) { + $languages{$_}=1; + } + } + &get_unprocessed_cgi($ENV{'QUERY_STRING'},['displaylanguage']); + if ($ENV{'form.displaylanguage'}) { + foreach (split(/\s*(\,|\;|\:)\s*/,$ENV{'form.displaylanguage'})) { + $languages{$_}=1; + } + } + return %languages; +} + # --------------------------------------------------------------- Copyright IDs sub copyrightids { return sort(keys(%cprtag)); @@ -1605,6 +1655,9 @@ Returns: value of designparamter $which ############################################## sub designparm { my ($which,$domain)=@_; + if ($ENV{'environment.color.'.$which}) { + return $ENV{'environment.color.'.$which}; + } $domain=&determinedomain($domain); if ($designhash{$domain.'.'.$which}) { return $designhash{$domain.'.'.$which}; @@ -1685,19 +1738,32 @@ sub bodytag { END + my $upperleft=''; if ($bodyonly) { return $bodytag; } elsif ($ENV{'browser.interface'} eq 'textual') { +# Accessibility return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web', $forcereg). '

LON-CAPA: '.$title.'

'; - } else { - return(<'.$title. +''; + } + +# +# Top frame rendering, Remote is up +# + return(< - - -$messages + +$upperleft +$messages  @@ -1718,7 +1784,6 @@ $bodytag $realm 
ENDBODY - } } ###############################################