version 1.999, 2009/05/08 14:33:16
|
version 1.1000, 2009/05/13 01:30:49
|
Line 1904 sub ssi {
|
Line 1904 sub ssi {
|
&Apache::lonenc::check_encrypt(\$fn); |
&Apache::lonenc::check_encrypt(\$fn); |
if (%form) { |
if (%form) { |
$request=new HTTP::Request('POST',&absolute_url().$fn); |
$request=new HTTP::Request('POST',&absolute_url().$fn); |
$request->content(join('&',map { &escape($_).'='.&escape($form{$_}) } keys %form)); |
$request->content(join('&',map { &escape($_).'='.&escape($form{$_}) } keys(%form))); |
} else { |
} else { |
$request=new HTTP::Request('GET',&absolute_url().$fn); |
$request=new HTTP::Request('GET',&absolute_url().$fn); |
} |
} |
Line 2554 sub flushcourselogs {
|
Line 2554 sub flushcourselogs {
|
# Reverse lookup of domain roles (dc, ad, li, sc, au) |
# Reverse lookup of domain roles (dc, ad, li, sc, au) |
# |
# |
my %domrolebuffer = (); |
my %domrolebuffer = (); |
foreach my $entry (keys %domainrolehash) { |
foreach my $entry (keys(%domainrolehash)) { |
my ($role,$uname,$udom,$runame,$rudom,$rsec)=split(/:/,$entry); |
my ($role,$uname,$udom,$runame,$rudom,$rsec)=split(/:/,$entry); |
if ($domrolebuffer{$rudom}) { |
if ($domrolebuffer{$rudom}) { |
$domrolebuffer{$rudom}.='&'.&escape($entry). |
$domrolebuffer{$rudom}.='&'.&escape($entry). |
Line 2735 sub get_course_adv_roles {
|
Line 2735 sub get_course_adv_roles {
|
&dump('nohist_userroles',$coursehash{'domain'},$coursehash{'num'}); |
&dump('nohist_userroles',$coursehash{'domain'},$coursehash{'num'}); |
my $now=time; |
my $now=time; |
my %privileged; |
my %privileged; |
foreach my $entry (keys %dumphash) { |
foreach my $entry (keys(%dumphash)) { |
my ($tend,$tstart)=split(/\:/,$dumphash{$entry}); |
my ($tend,$tstart)=split(/\:/,$dumphash{$entry}); |
if (($tstart) && ($tstart<0)) { next; } |
if (($tstart) && ($tstart<0)) { next; } |
if (($tend) && ($tend<$now)) { next; } |
if (($tend) && ($tend<$now)) { next; } |
Line 3445 sub tmpreset {
|
Line 3445 sub tmpreset {
|
if (tie(%hash,'GDBM_File', |
if (tie(%hash,'GDBM_File', |
$path.'/tmpstore_'.$stuname.'_'.$domain.'_'.$namespace.'.db', |
$path.'/tmpstore_'.$stuname.'_'.$domain.'_'.$namespace.'.db', |
&GDBM_WRCREAT(),0640)) { |
&GDBM_WRCREAT(),0640)) { |
foreach my $key (keys %hash) { |
foreach my $key (keys(%hash)) { |
if ($key=~ /:$symb/) { |
if ($key=~ /:$symb/) { |
delete($hash{$key}); |
delete($hash{$key}); |
} |
} |
Line 3881 sub set_userprivs {
|
Line 3881 sub set_userprivs {
|
my $adv=0; |
my $adv=0; |
my %grouproles = (); |
my %grouproles = (); |
if (keys(%{$allgroups}) > 0) { |
if (keys(%{$allgroups}) > 0) { |
foreach my $role (keys %{$allroles}) { |
foreach my $role (keys(%{$allroles})) { |
my ($trole,$area,$sec,$extendedarea); |
my ($trole,$area,$sec,$extendedarea); |
if ($role =~ m-^(\w+|cr/$match_domain/$match_username/\w+)\.(/$match_domain/$match_courseid)(/?\w*)\.-) { |
if ($role =~ m-^(\w+|cr/$match_domain/$match_username/\w+)\.(/$match_domain/$match_courseid)(/?\w*)\.-) { |
$trole = $1; |
$trole = $1; |
Line 5041 sub allowed {
|
Line 5041 sub allowed {
|
|
|
my $envkey; |
my $envkey; |
if ($thisallowed=~/L/) { |
if ($thisallowed=~/L/) { |
foreach $envkey (keys %env) { |
foreach $envkey (keys(%env)) { |
if ($envkey=~/^user\.role\.(st|ta)\.([^\.]*)/) { |
if ($envkey=~/^user\.role\.(st|ta)\.([^\.]*)/) { |
my $courseid=$2; |
my $courseid=$2; |
my $roleid=$1.'.'.$2; |
my $roleid=$1.'.'.$2; |
Line 5332 sub fetch_enrollment_query {
|
Line 5332 sub fetch_enrollment_query {
|
} |
} |
my $host=&hostname($homeserver); |
my $host=&hostname($homeserver); |
my $cmd = ''; |
my $cmd = ''; |
foreach my $affiliate (keys %{$affiliatesref}) { |
foreach my $affiliate (keys(%{$affiliatesref})) { |
$cmd .= $affiliate.'='.join(",",@{$$affiliatesref{$affiliate}}).'%%'; |
$cmd .= $affiliate.'='.join(",",@{$$affiliatesref{$affiliate}}).'%%'; |
} |
} |
$cmd =~ s/%%$//; |
$cmd =~ s/%%$//; |
Line 7840 sub symblist {
|
Line 7840 sub symblist {
|
if (($env{'request.course.fn'}) && (%newhash)) { |
if (($env{'request.course.fn'}) && (%newhash)) { |
if (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db', |
if (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db', |
&GDBM_WRCREAT(),0640)) { |
&GDBM_WRCREAT(),0640)) { |
foreach my $url (keys %newhash) { |
foreach my $url (keys(%newhash)) { |
next if ($url eq 'last_known' |
next if ($url eq 'last_known' |
&& $env{'form.no_update_last_known'}); |
&& $env{'form.no_update_last_known'}); |
$hash{declutter($url)}=&encode_symb($mapname, |
$hash{declutter($url)}=&encode_symb($mapname, |