[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Sun Jun 22 09:26:20 EDT 2014
raeburn Sun Jun 22 13:26:20 2014 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- Use &ask_for_embedded_content() on an access server for management of
dependencies in an HTML file uploaded directly to a course.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1194 loncom/interface/loncommon.pm:1.1195
--- loncom/interface/loncommon.pm:1.1194 Wed Jun 18 06:06:50 2014
+++ loncom/interface/loncommon.pm Sun Jun 22 13:26:19 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1194 2014/06/18 06:06:50 raeburn Exp $
+# $Id: loncommon.pm,v 1.1195 2014/06/22 13:26:19 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -9909,7 +9909,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