--- loncom/interface/lonpreferences.pm 2006/05/01 22:54:43 1.83
+++ 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.83 2006/05/01 22:54:43 albertel Exp $
+# $Id: lonpreferences.pm,v 1.85 2006/05/08 22:22:48 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -600,6 +600,10 @@ sub verify_and_change_colors {
$message.='Reset '.$colortypes{$item}.'
';
}
}
+ my $now = time;
+ &Apache::lonnet::put('environment',{'color.timestamp' => $now});
+ &Apache::lonnet::appenv('environment.color.timestamp' => $now);
+
$r->print(<
@@ -1207,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'})) {
@@ -1273,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'})) {