--- loncom/interface/loncommon.pm 2006/12/01 20:17:47 1.482 +++ loncom/interface/loncommon.pm 2006/12/08 20:09:29 1.489 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.482 2006/12/01 20:17:47 raeburn Exp $ +# $Id: loncommon.pm,v 1.489 2006/12/08 20:09:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2855,8 +2855,8 @@ sub findallcourses { } } else { foreach my $key (keys(%env)) { - if ( $key=~m{^user\.role\.(\w+)\./($match_domain)/($match_username)/?(\w*)$} || - $key=~m{^user\.role\.(cr/$match_domain/$match_username/\w+)\./($match_domain)/($match_username)/?(\w*)$}) { + if ( $key=~m{^user\.role\.(\w+)\./($match_domain)/($match_courseid)/?(\w*)$} || + $key=~m{^user\.role\.(cr/$match_domain/$match_username/\w+)\./($match_domain)/($match_courseid)/?(\w*)$}) { my ($role,$cdom,$cnum,$sec) = ($1,$2,$3,$4); next if ($role eq 'ca' || $role eq 'aa'); next if (%roles && !exists($roles{$role})); @@ -2942,7 +2942,7 @@ sub blockcheck { last; } } - } else { + } else { if (&Apache::lonnet::allowed('evb',undef,undef,$checkrole)) { $no_ownblock = 1; last; @@ -3503,6 +3503,7 @@ sub standard_css { my $mail_other = '#99BBBB'; my $mail_other_hover = '#669999'; my $table_header = '#DDDDDD'; + my $feedback_link_bg = '#BBBBBB'; my $border = ($env{'browser.type'} eq 'explorer') ? '0px 2px 0px 2px' : '0px 3px 0px 4px'; @@ -4034,6 +4035,13 @@ table.LC_descriptive_input td.LC_descrip text-align: right; font-weight: bold; } +table.LC_feedback_link { + background: $feedback_link_bg; +} +span.LC_feedback_link { + background: $feedback_link_bg; + font-size: larger; +} END } @@ -5225,7 +5233,6 @@ sub record_sep { } } else { my @allfields; - &Apache::lonnet::logthis("file type is ".$env{'form.upfiletype'}); if ($env{'form.upfiletype'} eq 'semisv') { @allfields=split(/;/,$record); } else { @@ -6290,9 +6297,11 @@ sub construct_course { # if specified, key authority is not course, but user # only active if keyaccess is yes if ($args->{'keyauth'}) { - $args->{'keyauth'}=~s/[^\w\@]//g; - if ($args->{'keyauth'}) { - $cenv{'keyauth'}=$args->{'keyauth'}; + my ($user,$domain) = split(':',$args->{'keyauth'}); + $user = &LONCAPA::clean_username($user); + $domain = &LONCAPA::clean_username($domain); + if ($user ne '' && $domain ne '') { + $cenv{'keyauth'}=$user.':'.$domain; } }