version 1.564, 2004/11/08 19:19:12
|
version 1.566, 2004/11/10 06:02:11
|
Line 1188 sub ssi_body {
|
Line 1188 sub ssi_body {
|
my ($filelink,%form)=@_; |
my ($filelink,%form)=@_; |
my $output=($filelink=~/^http\:/?&externalssi($filelink): |
my $output=($filelink=~/^http\:/?&externalssi($filelink): |
&ssi($filelink,%form)); |
&ssi($filelink,%form)); |
$output=~ |
$output=~s|//(\s*<!--)? BEGIN LON-CAPA Internal.+// END LON-CAPA Internal\s*(-->)?\s||gs; |
s/\/\/ BEGIN LON\-CAPA Internal.+\/\/ END LON\-CAPA Internal\s//gs; |
|
$output=~s/^.*?\<body[^\>]*\>//si; |
$output=~s/^.*?\<body[^\>]*\>//si; |
$output=~s/(.*)\<\/body\s*\>.*?$/$1/si; |
$output=~s/(.*)\<\/body\s*\>.*?$/$1/si; |
return $output; |
return $output; |
Line 3781 sub diskusage {
|
Line 3780 sub diskusage {
|
return $listing; |
return $listing; |
} |
} |
|
|
|
sub is_locked { |
|
my ($file_name, $domain, $user) = @_; |
|
my @check; |
|
my $is_locked; |
|
push @check, $file_name; |
|
my %locked = &Apache::lonnet::get('file_permissions',\@check, |
|
$ENV{'user.domain'},$ENV{'user.name'}); |
|
if (ref($locked{$file_name}) eq 'ARRAY') { |
|
$is_locked = 'true'; |
|
} else { |
|
$is_locked = 'false'; |
|
} |
|
} |
|
|
# ------------------------------------------------------------- Mark as Read Only |
# ------------------------------------------------------------- Mark as Read Only |
|
|
sub mark_as_readonly { |
sub mark_as_readonly { |
Line 3800 sub get_marked_as_readonly {
|
Line 3813 sub get_marked_as_readonly {
|
my %current_permissions = &Apache::lonnet::dump('file_permissions',$domain,$user); |
my %current_permissions = &Apache::lonnet::dump('file_permissions',$domain,$user); |
my @readonly_files; |
my @readonly_files; |
while (my ($file_name,$value) = each(%current_permissions)) { |
while (my ($file_name,$value) = each(%current_permissions)) { |
&logthis("found $file_name"); |
|
if (ref($value) eq "ARRAY"){ |
if (ref($value) eq "ARRAY"){ |
&logthis("found array"); |
|
foreach my $stored_what (@{$value}) { |
foreach my $stored_what (@{$value}) { |
if ($stored_what eq $what) { |
if ($stored_what eq $what) { |
push(@readonly_files, $file_name); |
push(@readonly_files, $file_name); |
&logthis("defined pushed $file_name"); |
|
} elsif (!defined($what)) { |
} elsif (!defined($what)) { |
push(@readonly_files, $file_name); |
push(@readonly_files, $file_name); |
&logthis("undef pushed $file_name"); |
|
} |
} |
} |
} |
} |
} |