version 1.135, 2010/03/25 17:38:52
|
version 1.137.2.1, 2011/10/06 23:30:06
|
Line 126 sub loadmap {
|
Line 126 sub loadmap {
|
my $lpc=$pc; |
my $lpc=$pc; |
$hash{'map_pc_'.$uri}=$lpc; |
$hash{'map_pc_'.$uri}=$lpc; |
$hash{'map_id_'.$lpc}=$uri; |
$hash{'map_id_'.$lpc}=$uri; |
|
if ($parent_rid =~ /^(\d+)\.\d+$/) { |
|
my $parent_pc = $1; |
|
if (defined($hash{'map_hierarchy_'.$parent_pc})) { |
|
$hash{'map_hierarchy_'.$lpc}=$hash{'map_hierarchy_'.$parent_pc}.','. |
|
$parent_pc; |
|
} else { |
|
$hash{'map_hierarchy_'.$lpc}=$parent_pc; |
|
} |
|
} |
|
|
# Determine and check filename |
# Determine and check filename |
my $fn=&Apache::lonnet::filelocation('',&putinversion($uri)); |
my $fn=&Apache::lonnet::filelocation('',&putinversion($uri)); |
Line 428 sub simplify {
|
Line 437 sub simplify {
|
# 8&8=8 |
# 8&8=8 |
$expression=~s/([^_\.\d])([_\.\d]+)\&\2([^_\.\d])/$1$2$3/g; |
$expression=~s/([^_\.\d])([_\.\d]+)\&\2([^_\.\d])/$1$2$3/g; |
# 8|8=8 |
# 8|8=8 |
$expression=~s/([^_\.\d])([_\.\d]+)\|\2([^_\.\d])/$1$2$3/g; |
$expression=~s/([^_\.\d])([_\.\d]+)(?:\|\2)+([^_\.\d])/$1$2$3/g; |
# (5&3)&4=5&3&4 |
# (5&3)&4=5&3&4 |
$expression=~s/\(([_\.\d]+)((?:\&[_\.\d]+)+)\)\&([_\.\d]+[^_\.\d])/$1$2\&$3/g; |
$expression=~s/\(([_\.\d]+)((?:\&[_\.\d]+)+)\)\&([_\.\d]+[^_\.\d])/$1$2\&$3/g; |
# (((5&3)|(4&6)))=((5&3)|(4&6)) |
# (((5&3)|(4&6)))=((5&3)|(4&6)) |
Line 897 sub build_tmp_hashes {
|
Line 906 sub build_tmp_hashes {
|
|
|
sub unlink_tmpfiles { |
sub unlink_tmpfiles { |
my ($fn) = @_; |
my ($fn) = @_; |
if ($fn =~ m{^\Q$Apache::lonnet::perlvar{'lonUsersDir'}\E/tmp/}) { |
if ($fn =~ m{^\Q$Apache::lonnet::perlvar{'lonDaemons'}\E/tmp/}) { |
my @files = qw (.db _symb.db .state _parms.db); |
my @files = qw (.db _symb.db .state _parms.db); |
foreach my $file (@files) { |
foreach my $file (@files) { |
if (-e $fn.$file) { |
if (-e $fn.$file) { |