--- loncom/interface/loncommon.pm 2003/04/03 03:08:12 1.93 +++ loncom/interface/loncommon.pm 2003/08/13 20:40:31 1.111 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.93 2003/04/03 03:08:12 www Exp $ +# $Id: loncommon.pm,v 1.111 2003/08/13 20:40:31 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -79,7 +79,7 @@ use strict; use Apache::lonnet(); use GDBM_File; use POSIX qw(strftime mktime); -use Apache::Constants qw(:common); +use Apache::Constants qw(:common :http :methods); use Apache::lonmsg(); use Apache::lonmenu(); my $readit; @@ -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; } } } @@ -311,14 +311,15 @@ END } sub studentbrowser_javascript { - unless ($ENV{'request.course.id'}) { return ''; } - unless (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) { - return ''; - } + unless ( + (($ENV{'request.course.id'}) && + (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) + || ($ENV{'request.role'}=~/^(au|dc|su)/) + ) { return ''; } return (<<'ENDSTDBRW');