[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Mon Aug 19 22:32:59 EDT 2013
raeburn Tue Aug 20 02:32:59 2013 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- Building path to file in "turned-in" are of a user's portfolio for file
uploaded directly to a dropbox in a course.
- Truncate directory name, if more than 12 characters, except for first
sub-directory (course title).
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1148 loncom/interface/loncommon.pm:1.1149
--- loncom/interface/loncommon.pm:1.1148 Tue Aug 20 01:51:50 2013
+++ loncom/interface/loncommon.pm Tue Aug 20 02:32:59 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1148 2013/08/20 01:51:50 raeburn Exp $
+# $Id: loncommon.pm,v 1.1149 2013/08/20 02:32:59 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -12162,6 +12162,9 @@
my $title = $res->compTitle();
$title =~ s/\W+/_/g;
if ($title ne '') {
+ if (($pc > 1) && (length($title) > 12)) {
+ $title = substr($title,0,12);
+ }
push(@pathitems,$title);
}
}
@@ -12170,6 +12173,9 @@
my $maptitle = $mapres->compTitle();
$maptitle =~ s/\W+/_/g;
if ($maptitle ne '') {
+ if (length($maptitle) > 12) {
+ $maptitle = substr($maptitle,0,12);
+ }
push(@pathitems,$maptitle);
}
unless ($env{'request.state'} eq 'construct') {
@@ -12210,6 +12216,9 @@
$restitle = time;
}
}
+ if (length($restitle) > 12) {
+ $restitle = substr($restitle,0,12);
+ }
push(@pathitems,$restitle);
$path .= join('/', at pathitems);
}
More information about the LON-CAPA-cvs
mailing list