[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Tue Aug 20 08:02:32 EDT 2013
raeburn Tue Aug 20 12:02:32 2013 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface loncommon.pm
Log:
- For 2.11
- Backport 1.1148, 1.1149.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.47 loncom/interface/loncommon.pm:1.1075.2.48
--- loncom/interface/loncommon.pm:1.1075.2.47 Mon Aug 19 07:44:32 2013
+++ loncom/interface/loncommon.pm Tue Aug 20 12:02:31 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1075.2.47 2013/08/19 07:44:32 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.48 2013/08/20 12:02:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -10681,6 +10681,7 @@
my $numchg = ($content =~ s{($attrib_regexp\s*=\s*['"]?)\Q$ref\E(['"]?)}{$1$newname$2}gi);
$count += $numchg;
$allfiles{$newname} = $allfiles{$ref};
+ delete($allfiles{$ref});
}
if ($env{'form.embedded_codebase_'.$i} ne '') {
$codebase = &unescape($env{'form.embedded_codebase_'.$i});
@@ -12151,6 +12152,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);
}
}
@@ -12159,6 +12163,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') {
@@ -12199,6 +12206,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