--- loncom/interface/lonconfigsettings.pm 2012/10/30 10:39:02 1.22 +++ loncom/interface/lonconfigsettings.pm 2013/09/07 00:19:00 1.26 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: lonconfigsettings.pm,v 1.22 2012/10/30 10:39:02 foxr Exp $ +# $Id: lonconfigsettings.pm,v 1.26 2013/09/07 00:19:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,7 +39,7 @@ use Apache::lonparmset(); sub print_header { my ($r,$phase,$context,$jscript,$container) = @_; - my ($pagetitle,$brcrumtitle,$action,$call_category_check); + my ($pagetitle,$brcrumtitle,$action,$call_category_check,$crstype); if ($context eq 'domain') { ($pagetitle, $brcrumtitle) = ('View/Modify Domain Settings','View/Modify Domain Settings'); $action = '/adm/domainprefs'; @@ -56,7 +56,8 @@ sub print_header { } } } else { - if (&Apache::loncommon::course_type() eq 'Community') { + $crstype = &Apache::loncommon::course_type(); + if ($crstype eq 'Community') { ($pagetitle,$brcrumtitle) = ('Community Configuration','Community Configuration'); } else { ($pagetitle,$brcrumtitle) = ('Course Configuration','Course Configuration'); @@ -130,7 +131,7 @@ $jscript '); if ($container) { - &Apache::lonparmset::startSettingsScreen($r,$container); + &Apache::lonparmset::startSettingsScreen($r,$container,$crstype); } $r->print('
'); @@ -153,7 +154,9 @@ sub print_footer { } my $dest='"javascript:changePage(document.'.$phase.','."'$newphase'".')"'; if ($phase eq 'process') { - $r->print('

'.$button_text.'

'); + $r->print( + &Apache::lonhtmlcommon::actionbox( + [''.$button_text.''])); } else { my $onclick; if ($phase eq 'display') { @@ -185,7 +188,7 @@ sub make_changes { {href=>"javascript:changePage(document.$phase,'$phase')", text=>"Updated"}); &print_header($r,$phase,$context,undef,$container); - my $crstype; + my ($crstype,$lastact); if ($context eq 'course') { $crstype = &Apache::loncommon::course_type(); } @@ -196,7 +199,7 @@ sub make_changes { if ($context eq 'domain') { $r->print('

'.&mt($prefs->{$item}{'text'}).'

'. &Apache::domainprefs::process_changes($r,$dom, - $confname,$item,$roles,$values)); + $confname,$item,$roles,$values,\$lastact)); } else { $changes{$item} = {}; &Apache::courseprefs::process_changes($dom,$item,$values, @@ -241,6 +244,7 @@ sub make_changes { } &print_footer($r,$phase,'display',$footer_text,\@actions,$container); $r->print('

'); + return $lastact; } sub display_settings { @@ -292,6 +296,9 @@ sub display_settings { } $r->print('
'); } + if ($container) { + &Apache::lonparmset::endSettingsScreen($r); + } $r->print(&Apache::loncommon::end_page()); return; } @@ -348,6 +355,9 @@ sub display_choices { } $r->print(&print_footer($r,$phase,'display','Display',undef,$container)); $r->print(''); + if ($container) { + &Apache::lonparmset::endSettingsScreen($r); + } $r->print(&Apache::loncommon::end_page()); return; }