[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm printout.pl /xml londefdef.pm
www
www at source.lon-capa.org
Tue Oct 25 22:09:46 EDT 2011
www Wed Oct 26 02:09:46 2011 EDT
Modified files:
/loncom/interface lonprintout.pm printout.pl
/loncom/xml londefdef.pm
Log:
Bug #1320: printing from construction space (except sequences - unclear how that worked)
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.600 loncom/interface/lonprintout.pm:1.601
--- loncom/interface/lonprintout.pm:1.600 Fri Oct 21 10:13:57 2011
+++ loncom/interface/lonprintout.pm Wed Oct 26 02:09:42 2011
@@ -2,7 +2,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.600 2011/10/21 10:13:57 foxr Exp $
+# $Id: lonprintout.pm,v 1.601 2011/10/26 02:09:42 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1929,7 +1929,7 @@
} else {
$texversion.='\vskip 0 mm \noindent\textbf{Prints from construction space - there is no title.}\vskip 0 mm ';
my $URLpath=$urlp;
- $URLpath=~s/~([^\/]+)/public_html\/$1\/$1/;
+ #$URLpath=~s/~([^\/]+)/public_html\/$1\/$1/;
$texversion.=&path_to_problem($URLpath,$LaTeXwidth);
}
$texversion.='\vskip 1 mm '.$answer.'\end{document}';
@@ -2269,10 +2269,12 @@
# IF sequence, recurse:
if ($urlp =~ /\.sequence$/) {
+#
+# FIXME: this does not work for co-authors
my $sequence_url = $urlp;
my $domain = $env{'user.domain'}; # Constr. space only on local
my $user = $env{'user.name'};
-
+# FIXME: the substitutions below do not seem to make sense
$sequence_url =~ s/^\/res\/$domain/\/home/;
$sequence_url =~ s/^(\/home\/$user)/$1\/public_html/;
# $sequence_url =~ s|\/~([^\/]+)\/|\/home\/$1\/public_html\/|;
@@ -2515,6 +2517,7 @@
} else {
$texversion.='\vskip 0 mm \noindent\textbf{Prints from construction space - there is no title.}\vskip 0 mm ';
my $URLpath=$cleanURL;
+# FIXME: unclear URL path, not sure when this would occur
$URLpath=~s/~([^\/]+)/public_html\/$1\/$1/;
$texversion.=&path_to_problem($URLpath,$LaTeXwidth);
}
@@ -2550,7 +2553,7 @@
&& $currentURL=~/\.(sequence|page)$/ && $helper->{'VARS'}->{'construction'} eq '1') {
#printing content of sequence from the construction space
-
+# FIXME: unclear how this would work
$currentURL=~s|\/~([^\/]+)\/|\/home\/$1\/public_html\/|;
$result .= &print_construction_sequence($currentURL, $helper, %form,
$LaTeXwidth);
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.149 loncom/interface/printout.pl:1.150
--- loncom/interface/printout.pl:1.149 Wed May 18 11:26:44 2011
+++ loncom/interface/printout.pl Wed Oct 26 02:09:42 2011
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.149 2011/05/18 11:26:44 foxr Exp $
+# $Id: printout.pl,v 1.150 2011/10/26 02:09:42 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -897,8 +897,8 @@
my $status_statement='EPS picture for '.$not_eps;
my $eps_f = $not_eps;
- if ($eps_f=~/\/home\/([^\/]+)\/public_html\//) {
- $eps_f=~s/\/home\/([^\/]+)\/public_html/$1/;
+ if ($eps_f=~/\/home\/httpd\/html\/priv\/[^\/]+\/([^\/]+)\//) {
+ $eps_f=~s/\/home\/httpd\/html\/priv\/[^\/]+\/([^\/]+)/$1/;
} elsif ($eps_f=~/$perlvar{'lonDocRoot'}\/res\//) {
$eps_f=~ s/$perlvar{'lonDocRoot'}\/res\/(.+)/$1/;
} elsif ($eps_f=~/$perlvar{'lonUsersDir'}\//) {
@@ -931,7 +931,6 @@
$not_eps =~ s/ /\\ /g;
my $prettyname=$not_eps;
if ($advanced_role) {
- $prettyname=~s|/home/([^/]+)/public_html|/priv/$1|;
$prettyname=~s|$perlvar{'lonDocRoot'}/|/|;
&Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,
'Converting to EPS '.$prettyname);
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.434 loncom/xml/londefdef.pm:1.435
--- loncom/xml/londefdef.pm:1.434 Sat Oct 1 03:19:06 2011
+++ loncom/xml/londefdef.pm Wed Oct 26 02:09:45 2011
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.434 2011/10/01 03:19:06 raeburn Exp $
+# $Id: londefdef.pm,v 1.435 2011/10/26 02:09:45 www Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -4194,7 +4194,7 @@
close(FILE);
}
$src=~s|/home/httpd/html/res|/home/httpd/prtspool|;
- $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;
+ $src=~s|/home/httpd/html/priv/[^/]+/([^/]*)/|/home/httpd/prtspool/$1/|;
if ($sext ne "") { # Put the ext. back in to uniquify.
$src =~ s/\.eps$/$sext.eps/;
}
@@ -4213,7 +4213,7 @@
print FILE "$src\n";
close FILE;
$src=~s|/home/httpd/html/res|/home/httpd/prtspool|;
- $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;
+ $src=~s|/home/httpd/html/priv/[^/]+/([^/]*)/|/home/httpd/prtspool/$1/|;
}
my ($path,$file)=($src=~m|(.*)/([^/]*)$|);
$path =~ s/ /\_/g;
@@ -4232,7 +4232,7 @@
my $newsrc = $src;
$newsrc =~ s/(\.bmp|\.gif|\.jpg|\.jpeg)$/\.eps/i;
$newsrc=~s{/home/httpd/html/res}{};
- $newsrc=~s{/home/($LONCAPA::username_re)/public_html/}{/$1/};
+ $newsrc=~s{/home/httpd/html/priv/[^/]+/($LONCAPA::username_re)/}{/$1/};
$newsrc=~s{/\./}{/};
$newsrc=~s{/([^/]+)\.(ps|eps)}{/};
if ($newsrc=~m{/home/httpd/lonUsers/}) {
More information about the LON-CAPA-cvs
mailing list