--- loncom/interface/lonpreferences.pm 2006/05/08 18:50:27 1.84 +++ loncom/interface/lonpreferences.pm 2006/05/08 22:22:48 1.85 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.84 2006/05/08 18:50:27 albertel Exp $ +# $Id: lonpreferences.pm,v 1.85 2006/05/08 22:22:48 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1211,6 +1211,19 @@ sub handler { text => 'Change Math Preferences'}, 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'}) || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/' .$env{'request.course.sec'})) { @@ -1277,9 +1290,10 @@ sub handler { foreach my $option(@Options) { my $optiontext = ''; if (exists($option->{'href'})) { - $optiontext .= - ''. + $option->{'href_args'}{'action'}=$option->{'action'}; + $optiontext .= + ''. &mt($option->{'linktext'}).''; } if (exists($option->{'text'})) {