--- loncom/lonnet/perl/lonnet.pm 2010/11/11 20:56:04 1.1056.2.9 +++ loncom/lonnet/perl/lonnet.pm 2010/11/11 21:03:30 1.1056.2.11 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1056.2.9 2010/11/11 20:56:04 raeburn Exp $ +# $Id: lonnet.pm,v 1.1056.2.11 2010/11/11 21:03:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2195,7 +2195,7 @@ sub resizeImage { # --------------- Take an uploaded file and put it into the userfiles directory # input: $formname - the contents of the file are in $env{"form.$formname"} -# the desired filenam is in $env{"form.$formname.filename"} +# the desired filename is in $env{"form.$formname.filename"} # $coursedoc - if true up to the current course # if false # $subdir - directory in userfile to store the file into @@ -2254,7 +2254,7 @@ sub userfileupload { } if ($subdir eq 'scantron') { $fname = 'scantron_orig_'.$fname; - } else { + } else { # Create the directory if not present $fname="$subdir/$fname"; } @@ -7118,7 +7118,7 @@ sub is_locked { my ($file_name, $domain, $user) = @_; my @check; my $is_locked; - push @check, $file_name; + push(@check,$file_name); my %locked = &get('file_permissions',\@check, $env{'user.domain'},$env{'user.name'}); my ($tmp)=keys(%locked); @@ -7135,6 +7135,7 @@ sub is_locked { } else { $is_locked = 'false'; } + return $is_locked; } sub declutter_portfile { @@ -8284,7 +8285,7 @@ sub metadata { if (($uri eq '') || (($uri =~ m|^/*adm/|) && ($uri !~ m|^adm/includes|) && ($uri !~ m|/bulletinboard$|)) || - ($uri =~ m|/$|) || ($uri =~ m|/.meta$|) ) { + ($uri =~ m|/$|) || ($uri =~ m|/.meta$|) || ($uri =~ /^\*uploaded\/.+\.sequence$/) ) { return undef; } if (($uri =~ /^~/ || $uri =~ m{home/$match_username/public_html/})