--- rat/map.pm 2006/08/17 22:35:51 1.1 +++ rat/map.pm 2007/01/03 20:46:04 1.4 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # routines for modyfing .sequence and .page files # -# $Id: map.pm,v 1.1 2006/08/17 22:35:51 albertel Exp $ +# $Id: map.pm,v 1.4 2007/01/03 20:46:04 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -475,6 +475,8 @@ sub loadmap { } if ($instr eq -2) { $errtext.='Map not loaded: An error occured while trying to load the map.'; + } elsif ($instr eq '-1') { + # Map doesn't exist } elsif ($instr) { my $parser = HTML::TokeParser->new(\$instr); my $token; @@ -688,7 +690,7 @@ sub savemap { } } $outstr.="\n"; - if ($fn=~/^\/*uploaded\/(\w+)\/(\w+)\/(.*)$/) { + if ($fn=~m{^/*uploaded/($LONCAPA::domain_re)/($LONCAPA::courseid_re)/(.*)$}) { $env{'form.output'}=$outstr; my $result=&Apache::lonnet::finishuserfileupload($2,$1, 'output',$3);