--- loncom/interface/lonhelp.pm 2008/03/24 01:11:36 1.38
+++ loncom/interface/lonhelp.pm 2011/01/04 21:53:23 1.40
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonhelp.pm,v 1.38 2008/03/24 01:11:36 www Exp $
+# $Id: lonhelp.pm,v 1.40 2011/01/04 21:53:23 raeburn Exp $
#
# .tex help system web server handler
#
@@ -106,20 +106,26 @@ sub render {
$tex =~ s| \\ref\{([^}]*)\}
|
my $label=$1;
+ my $icon='/adm/help/help.png';
+ my $ext;
if ($1!~/\.hlp$/) {
- if ((!exists($fragmentLabels{$1})) && ($1!~/\.hlp$/)) {
+ if (($1 =~ /^\w+\.manual\.pdf$/) && (-e $docroot.'/adm/help/'.$1)) {
+ $icon = '/adm/lonIcons/pdf.gif';
+ } elsif ((!exists($fragmentLabels{$1})) && ($1!~/\.hlp$/)) {
&Apache::lonnet::logthis("ERROR: $1 not a valid help label");
$label='Error';
} else {
$label=substr($fragmentLabels{$1}, 0, -4);
+ $ext = '.hlp#' . &processLabelName($1);
}
} else {
$label=~s/\.hlp$//;
+ $ext = '.hlp#' . &processLabelName($1);
}
'\\begin{html}
' .
+ $ext .
+ '">
' .
'\\end{html}'
|gxe;