--- loncom/interface/printout.pl 2010/04/29 10:51:37 1.146 +++ loncom/interface/printout.pl 2011/02/08 12:53:39 1.147 @@ -1,7 +1,7 @@ #!/usr/bin/perl # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc. # -# $Id: printout.pl,v 1.146 2010/04/29 10:51:37 foxr Exp $ +# $Id: printout.pl,v 1.147 2011/02/08 12:53:39 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -911,8 +911,8 @@ sub convert_figure { $not_eps =~ s/^\s+//; $not_eps =~ s/\s+$//; $not_eps =~ s/ /\\ /g; + my $prettyname=$not_eps; if ($advanced_role) { - my $prettyname=$not_eps; $prettyname=~s|/home/([^/]+)/public_html|/priv/$1|; $prettyname=~s|$perlvar{'lonDocRoot'}/|/|; &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state, @@ -935,6 +935,13 @@ sub convert_figure { system("pdftops $not_eps $eps_f"); } else { system("convert $not_eps $eps_f"); + if($? and $advanced_role){ + print "

" + .mt("An error occured during the conversion of [_1].[_2]" + ."If possible try to save this image using different settings and republish it.", + "".$prettyname."", "
") + ."

"; + } } if (not -e $eps_f) {