version 1.38, 2008/03/24 01:11:36
|
version 1.40, 2011/01/04 21:53:23
|
Line 106 sub render {
|
Line 106 sub render {
|
$tex =~ s| \\ref\{([^}]*)\} |
$tex =~ s| \\ref\{([^}]*)\} |
| |
| |
my $label=$1; |
my $label=$1; |
|
my $icon='/adm/help/help.png'; |
|
my $ext; |
if ($1!~/\.hlp$/) { |
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"); |
&Apache::lonnet::logthis("ERROR: $1 not a valid help label"); |
$label='Error'; |
$label='Error'; |
} else { |
} else { |
$label=substr($fragmentLabels{$1}, 0, -4); |
$label=substr($fragmentLabels{$1}, 0, -4); |
|
$ext = '.hlp#' . &processLabelName($1); |
} |
} |
} else { |
} else { |
$label=~s/\.hlp$//; |
$label=~s/\.hlp$//; |
|
$ext = '.hlp#' . &processLabelName($1); |
} |
} |
'\\begin{html}<a href="/adm/help/'. |
'\\begin{html}<a href="/adm/help/'. |
$label . |
$label . |
'.hlp#' . &processLabelName($1) . |
$ext . |
'"><img src="/res/adm/pages/help.png" border="0" /></a>' . |
'"><img src="'.$icon.'" border="0" /></a>' . |
'\\end{html}' |
'\\end{html}' |
|gxe; |
|gxe; |
|
|