--- loncom/interface/lonpreferences.pm 2006/05/01 22:15:17 1.82
+++ loncom/interface/lonpreferences.pm 2006/05/08 22:25:17 1.86
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.82 2006/05/01 22:15:17 albertel Exp $
+# $Id: lonpreferences.pm,v 1.86 2006/05/08 22:25:17 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -33,6 +33,7 @@
package Apache::lonpreferences;
use strict;
+use LONCAPA;
use Apache::Constants qw(:common);
use Apache::File;
use Crypt::DES;
@@ -519,13 +520,13 @@ sub colorschanger {
foreach my $item (sort(keys(%colortypes))) {
my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain);
$chtable.=&Apache::loncommon::start_data_table_row().
- '
'.$colortypes{$item}.' | | | Select | '.
- &Apache::loncommon::end_data_table_row();
+ &Apache::loncommon::end_data_table_row()."\n";
}
my $end_data_table = &Apache::loncommon::end_data_table();
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
@@ -600,6 +601,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 +1212,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 +1291,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'})) {