Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.1200 and 1.1201

version 1.1200, 2012/11/29 03:23:52 version 1.1201, 2012/11/29 20:37:19
Line 2732  sub can_edit_resource { Line 2732  sub can_edit_resource {
                 $incourse = 1;                  $incourse = 1;
                 if ($file =~/\.(htm|html|css|js|txt)$/) {                  if ($file =~/\.(htm|html|css|js|txt)$/) {
                     $cfile = &hreflocation('',$file);                      $cfile = &hreflocation('',$file);
                     $forceedit = 1;                      if ($env{'form.forceedit'}) {
                           $forceview = 1;
                       } else {
                           $forceedit = 1;
                       }
                 }                  }
             } elsif ($resurl =~ m{^/public/$cdom/$cnum/syllabus}) {              } elsif ($resurl =~ m{^/public/$cdom/$cnum/syllabus}) {
                 $incourse = 1;                  $incourse = 1;
Line 2820  sub is_course_upload { Line 2824  sub is_course_upload {
     my ($file,$cnum,$cdom) = @_;      my ($file,$cnum,$cdom) = @_;
     my $uploadpath = &LONCAPA::propath($cdom,$cnum);      my $uploadpath = &LONCAPA::propath($cdom,$cnum);
     $uploadpath =~ s{^\/}{};      $uploadpath =~ s{^\/}{};
     if (($file =~ m{^\Q$uploadpath\E/userfiles/docs/}) ||      if (($file =~ m{^\Q$uploadpath\E/userfiles/(docs|supplemental)/}) ||
         ($file =~ m{^userfiles/\Q$cdom\E/\Q$cnum\E/docs/})) {          ($file =~ m{^userfiles/\Q$cdom\E/\Q$cnum\E/(docs|supplemental)/})) {
         return 1;          return 1;
     }      }
     return;      return;

Removed from v.1.1200  
changed lines
  Added in v.1.1201


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>