[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Sun Jun 22 09:31:53 EDT 2014
raeburn Sun Jun 22 13:31:53 2014 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface loncommon.pm
Log:
- For 2.11
- Backport 1.1195
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.78 loncom/interface/loncommon.pm:1.1075.2.79
--- loncom/interface/loncommon.pm:1.1075.2.78 Fri Jun 20 02:47:40 2014
+++ loncom/interface/loncommon.pm Sun Jun 22 13:31:52 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1075.2.78 2014/06/20 02:47:40 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.79 2014/06/22 13:31:52 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -9906,7 +9906,15 @@
($path) =
($toplevel =~ m{^(\Q/uploaded/$cdom/$cnum/\E(?:docs|supplemental)/(?:default|\d+)/\d+)/});
}
- $fileloc = &Apache::lonnet::filelocation('',$toplevel);
+ if ($toplevel=~/^\/*(uploaded|editupload)/) {
+ $fileloc = $toplevel;
+ $fileloc=~ s/^\s*(\S+)\s*$/$1/;
+ my ($udom,$uname,$fname) =
+ ($fileloc=~ m{^/+(?:uploaded|editupload)/+($match_domain)/+($match_name)/+(.*)$});
+ $fileloc = propath($udom,$uname).'/userfiles/'.$fname;
+ } else {
+ $fileloc = &Apache::lonnet::filelocation('',$toplevel);
+ }
$fileloc =~ s{^/}{};
($filename) = ($fileloc =~ m{.+/([^/]+)$});
$heading = &mt('Status of dependencies in [_1]',"$title ($filename)");
More information about the LON-CAPA-cvs
mailing list