version 1.1, 2009/03/31 16:59:01
|
version 1.2, 2009/04/22 12:42:16
|
Line 37 use Apache::lonhtmlcommon();
|
Line 37 use Apache::lonhtmlcommon();
|
use Apache::lonlocal; |
use Apache::lonlocal; |
|
|
sub print_header { |
sub print_header { |
my ($r,$phase,$context) = @_; |
my ($r,$phase,$context,$jscript) = @_; |
my ($pagetitle,$brcrumtitle,$action); |
my ($pagetitle,$brcrumtitle,$action); |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
($pagetitle, $brcrumtitle) = ('View/Modify Domain Settings','Domain Settings'); |
($pagetitle, $brcrumtitle) = ('View/Modify Domain Settings','Domain Settings'); |
Line 83 function changePage(formname,newphase) {
|
Line 83 function changePage(formname,newphase) {
|
$js .= &Apache::loncommon::viewport_size_js().' |
$js .= &Apache::loncommon::viewport_size_js().' |
</script> |
</script> |
'; |
'; |
|
if ($jscript) { |
|
$js .= " |
|
|
|
$jscript |
|
|
|
"; |
|
} |
my $additem; |
my $additem; |
if ($phase eq 'pickactions') { |
if ($phase eq 'pickactions') { |
my %loaditems = ( |
my %loaditems = ( |
Line 162 sub make_changes {
|
Line 169 sub make_changes {
|
if ($context eq 'domain') { |
if ($context eq 'domain') { |
$r->print(&Apache::domainprefs::process_changes($r,$dom,$confname,$item,$roles,$values)); |
$r->print(&Apache::domainprefs::process_changes($r,$dom,$confname,$item,$roles,$values)); |
} else { |
} else { |
$r->print(&Apache::domainprefs::process_changes($r,$dom,$item,$values)); |
$r->print(&Apache::courseprefs::process_changes($r,$dom,$item,$values)); |
} |
} |
} |
} |
} |
} |
Line 173 sub make_changes {
|
Line 180 sub make_changes {
|
} |
} |
|
|
sub display_settings { |
sub display_settings { |
my ($r,$dom,$phase,$context,$prefs_order,$prefs,$values,$confname) = @_; |
my ($r,$dom,$phase,$context,$prefs_order,$prefs,$values,$confname,$jscript) = @_; |
my %brcrumtext = &get_crumb_text(); |
my %brcrumtext = &get_crumb_text(); |
my @actions = &Apache::loncommon::get_env_multiple('form.actions'); |
my @actions = &Apache::loncommon::get_env_multiple('form.actions'); |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"javascript:changePage(document.$phase,'display')", |
({href=>"javascript:changePage(document.$phase,'display')", |
text=>"Course Settings"}); |
text=>"Course Settings"}); |
&print_header($r,$phase,$context); |
&print_header($r,$phase,$context,$jscript); |
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH') && (ref($values) eq 'HASH')) { |
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH') && (ref($values) eq 'HASH')) { |
if (@actions > 0) { |
if (@actions > 0) { |
my $rowsum = 0; |
my $rowsum = 0; |
Line 195 sub display_settings {
|
Line 202 sub display_settings {
|
} else { |
} else { |
($output{$item},$rowtotal{$item}) = |
($output{$item},$rowtotal{$item}) = |
&Apache::courseprefs::print_config_box($r,$dom,$phase, |
&Apache::courseprefs::print_config_box($r,$dom,$phase, |
$item,$prefs->{$item},$values->{$item}); |
$item,$prefs->{$item},$values); |
} |
} |
$rowsum += $rowtotal{$item}; |
$rowsum += $rowtotal{$item}; |
} |
} |