version 1.84, 2006/05/08 18:50:27
|
version 1.86, 2006/05/08 22:25:17
|
Line 33
|
Line 33
|
package Apache::lonpreferences; |
package Apache::lonpreferences; |
|
|
use strict; |
use strict; |
|
use LONCAPA; |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::File; |
use Apache::File; |
use Crypt::DES; |
use Crypt::DES; |
Line 1211 sub handler {
|
Line 1212 sub handler {
|
text => 'Change Math Preferences'}, |
text => 'Change Math Preferences'}, |
printmenu => 'yes', |
printmenu => 'yes', |
})); |
})); |
|
|
|
if ($env{'environment.remote'} eq 'off') { |
|
push (@Options,({ action => 'launch', |
|
linktext => 'Launch Remote Control', |
|
href => '/adm/remote?url=/adm/preferences', |
|
})); |
|
} else { |
|
push (@Options,({ action => 'collapse', |
|
linktext => 'Collapse Remote Control', |
|
href => '/adm/remote?url=/adm/preferences', |
|
})); |
|
} |
|
|
if (&Apache::lonnet::allowed('whn',$env{'request.course.id'}) |
if (&Apache::lonnet::allowed('whn',$env{'request.course.id'}) |
|| &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/' |
|| &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/' |
.$env{'request.course.sec'})) { |
.$env{'request.course.sec'})) { |
Line 1277 sub handler {
|
Line 1291 sub handler {
|
foreach my $option(@Options) { |
foreach my $option(@Options) { |
my $optiontext = ''; |
my $optiontext = ''; |
if (exists($option->{'href'})) { |
if (exists($option->{'href'})) { |
$optiontext .= |
$option->{'href_args'}{'action'}=$option->{'action'}; |
'<a href="'.$option->{'href'}. |
$optiontext .= |
'?action='.$option->{'action'}.'">'. |
'<a href="'.&add_get_param($option->{'href'}, |
|
$option->{'href_args'}).'">'. |
&mt($option->{'linktext'}).'</a>'; |
&mt($option->{'linktext'}).'</a>'; |
} |
} |
if (exists($option->{'text'})) { |
if (exists($option->{'text'})) { |