version 1.82, 2006/05/01 22:15:17
|
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 519 sub colorschanger {
|
Line 520 sub colorschanger {
|
foreach my $item (sort(keys(%colortypes))) { |
foreach my $item (sort(keys(%colortypes))) { |
my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain); |
my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain); |
$chtable.=&Apache::loncommon::start_data_table_row(). |
$chtable.=&Apache::loncommon::start_data_table_row(). |
'<td>'.$colortypes{$item}.'</td><td bgcolor="'.$curcol. |
'<td>'.$colortypes{$item}.'</td><td style="background: '.$curcol. |
'"> </td><td><input name="'.$item. |
'"> </td><td><input name="'.$item. |
'" size="10" value="'.$curcol. |
'" size="10" value="'.$curcol. |
'" /></td><td><a href="javascript:pjump('."'color_custom','".$colortypes{$item}. |
'" /></td><td><a href="javascript:pjump('."'color_custom','".$colortypes{$item}. |
"','".$curcol."','" |
"','".$curcol."','" |
.$item."','parmform.pres','psub'".');">Select</a></td>'. |
.$item."','parmform.pres','psub'".');">Select</a></td>'. |
&Apache::loncommon::end_data_table_row(); |
&Apache::loncommon::end_data_table_row()."\n"; |
} |
} |
my $end_data_table = &Apache::loncommon::end_data_table(); |
my $end_data_table = &Apache::loncommon::end_data_table(); |
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); |
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); |
Line 600 sub verify_and_change_colors {
|
Line 601 sub verify_and_change_colors {
|
$message.='Reset '.$colortypes{$item}.'<br />'; |
$message.='Reset '.$colortypes{$item}.'<br />'; |
} |
} |
} |
} |
|
my $now = time; |
|
&Apache::lonnet::put('environment',{'color.timestamp' => $now}); |
|
&Apache::lonnet::appenv('environment.color.timestamp' => $now); |
|
|
$r->print(<<ENDVCCOL); |
$r->print(<<ENDVCCOL); |
$message |
$message |
<form name="client" action="/adm/preferences" method="POST"> |
<form name="client" action="/adm/preferences" method="POST"> |
Line 1207 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 1273 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'})) { |