version 1.43, 2013/12/30 00:23:40
|
version 1.49, 2023/04/06 17:36:12
|
Line 71 sub servetext {
|
Line 71 sub servetext {
|
search => 'Search LON-CAPA help', |
search => 'Search LON-CAPA help', |
query => 'Search', |
query => 'Search', |
); |
); |
|
my $goback; |
|
if ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) || |
|
(($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) { |
|
my $backicon = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL').'/').'clickhere.gif'; |
|
$goback = '<a href="javascript:history.go(-1);" class="LC_menubuttons_link" title="Go Back">'. |
|
'<img src="'.$backicon.'" alt="'.&mt('Go Back').'" class="LC_icon" border="0" />'. |
|
'</a> '; |
|
} |
$r->print(<<HEADER); |
$r->print(<<HEADER); |
<h3 style="font: sans-serif"><img align="right" alt="help logo" |
<h3 style="font: sans-serif"><img align="right" alt="help logo" |
src="/adm/help/gif/lonhelpheader.gif" />$lt{'header'}</h3><hr /> |
src="/adm/help/gif/lonhelpheader.gif" />$goback$lt{'header'}</h3><hr /> |
<!-- BEGIN --> |
<!-- BEGIN --> |
HEADER |
HEADER |
if ($is_mobile) { |
if ($is_mobile) { |
Line 102 HEADER
|
Line 110 HEADER
|
</fieldset> |
</fieldset> |
</form> |
</form> |
</div> |
</div> |
<div class=""LC_left_float"> |
<div class="LC_left_float"> |
</div> |
</div> |
<div style="padding:0;clear:both;margin:0;border:0"></div> |
<div style="padding:0;clear:both;margin:0;border:0"></div> |
$bugs |
$bugs |
Line 150 sub render {
|
Line 158 sub render {
|
'\\begin{html}<a href="/adm/help/'. |
'\\begin{html}<a href="/adm/help/'. |
$label . |
$label . |
$ext . |
$ext . |
'"><img src="'.$icon.'" border="0" /></a>' . |
'"><img src="'.$icon.'" border="0" alt="'.&mt('Help').'" /></a>' . |
'\\end{html}' |
'\\end{html}' |
|gxe; |
|gxe; |
|
|
Line 172 sub render {
|
Line 180 sub render {
|
# Fix the pretty quotes |
# Fix the pretty quotes |
$tex =~ s/('')|(``)/"/g; #" to get emacs syntax highlighter happy |
$tex =~ s/('')|(``)/"/g; #" to get emacs syntax highlighter happy |
|
|
|
$tex =~ s/`/'/g; |
|
|
# For some reason all captions come out as "Figure 0:", so |
# For some reason all captions come out as "Figure 0:", so |
# just duck the issue... |
# just duck the issue... |
|
|
Line 244 sub handler {
|
Line 254 sub handler {
|
}; |
}; |
} |
} |
my $firstfile; |
my $firstfile; |
|
$env{'form.texengine'} = 'tth'; |
my $start_page= |
my $start_page= |
&Apache::loncommon::start_page('LON-CAPA Help',undef,$starthash); |
&Apache::loncommon::start_page('LON-CAPA Help',undef,$starthash); |
|
delete($env{'form.texengine'}); |
my $text=''; |
my $text=''; |
my $uri = $r->uri; |
my $uri = $r->uri; |
if ($env{'form.searchterm'}=~/\w/) { |
if ($env{'form.searchterm'}=~/\w/) { |
Line 276 sub handler {
|
Line 288 sub handler {
|
$filenames =~ s/:/,/g; |
$filenames =~ s/:/,/g; |
my @files = split(/,/, $filenames); |
my @files = split(/,/, $filenames); |
$firstfile = '/adm/help/'.$files[0].'.hlp'; |
$firstfile = '/adm/help/'.$files[0].'.hlp'; |
|
my $count = 0; |
|
|
for my $filename (@files) { |
for my $filename (@files) { |
if (-e $docroot.'/adm/help/tex/'. |
if (-e $docroot.'/adm/help/tex/'. |
Line 287 sub handler {
|
Line 300 sub handler {
|
. '/adm/help/tex/'.$filename.'.tex')) |
. '/adm/help/tex/'.$filename.'.tex')) |
or return HTTP_NOT_FOUND; |
or return HTTP_NOT_FOUND; |
$tex .= join('', <$file>); |
$tex .= join('', <$file>); |
|
$count ++; |
|
if (scalar(@files) > $count) { |
|
$tex .= '\hrulefill'; |
|
} |
} |
} |
|
|
$text = &render($tex, $docroot); |
$text = &render($tex, $docroot); |