version 1.412, 2003/09/15 18:43:54
|
version 1.413, 2003/09/16 17:54:50
|
Line 2606 sub is_on_map {
|
Line 2606 sub is_on_map {
|
if ($match) { |
if ($match) { |
return (1,$1); |
return (1,$1); |
} else { |
} else { |
return (0,0); |
my ($name,$ext)=($filename=~/^(.+)\.(\w+)$/); |
|
$ENV{'acc.res.'.$ENV{'request.course.id'}.'.'.$pathname}=~ |
|
/\&(\Q$name\E\.\d+\.$ext)\:([\d\|]+)\&/; |
|
return (0,$2,$pathname.'/'.$1); |
} |
} |
} |
} |
|
|
Line 3879 sub symbclean {
|
Line 3882 sub symbclean {
|
# ---------------------------------------------- Split symb to find map and url |
# ---------------------------------------------- Split symb to find map and url |
|
|
sub decode_symb { |
sub decode_symb { |
return split(/\_\_\_/,shift); |
my ($map,$resid,$url)=split(/\_\_\_/,shift); |
|
return (&fixversion($map),$resid,&fixversion($url)); |
|
} |
|
|
|
sub fixversion { |
|
my $fn=shift; |
|
if ($fn=~/^(adm|uploaded|public)/) { return $fn; } |
|
my ($match,$cond,$versioned)=&is_on_map($fn); |
|
unless ($match) { |
|
$fn=$versioned; |
|
} |
|
return $fn; |
} |
} |
|
|
# ------------------------------------------------------ Return symb list entry |
# ------------------------------------------------------ Return symb list entry |