Diff for /loncom/interface/lonconfigsettings.pm between versions 1.22 and 1.26

version 1.22, 2012/10/30 10:39:02 version 1.26, 2013/09/07 00:19:00
Line 39  use Apache::lonparmset(); Line 39  use Apache::lonparmset();
   
 sub print_header {  sub print_header {
     my ($r,$phase,$context,$jscript,$container) = @_;      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') {      if ($context eq 'domain') {
         ($pagetitle, $brcrumtitle) = ('View/Modify Domain Settings','View/Modify Domain Settings');          ($pagetitle, $brcrumtitle) = ('View/Modify Domain Settings','View/Modify Domain Settings');
         $action = '/adm/domainprefs';          $action = '/adm/domainprefs';
Line 56  sub print_header { Line 56  sub print_header {
             }              }
         }          }
     } else {      } else {
         if (&Apache::loncommon::course_type() eq 'Community') {          $crstype = &Apache::loncommon::course_type();
           if ($crstype eq 'Community') {
             ($pagetitle,$brcrumtitle) = ('Community Configuration','Community Configuration');              ($pagetitle,$brcrumtitle) = ('Community Configuration','Community Configuration');
         } else {          } else {
             ($pagetitle,$brcrumtitle) = ('Course Configuration','Course Configuration');              ($pagetitle,$brcrumtitle) = ('Course Configuration','Course Configuration');
Line 130  $jscript Line 131  $jscript
 </form>  </form>
 ');  ');
     if ($container) {      if ($container) {
        &Apache::lonparmset::startSettingsScreen($r,$container);         &Apache::lonparmset::startSettingsScreen($r,$container,$crstype);
     }      }
     $r->print('<form method="post" name="'.$phase.'" action="'.$action.'"'.      $r->print('<form method="post" name="'.$phase.'" action="'.$action.'"'.
               ' enctype="multipart/form-data">');                ' enctype="multipart/form-data">');
Line 153  sub print_footer { Line 154  sub print_footer {
     }      }
     my $dest='"javascript:changePage(document.'.$phase.','."'$newphase'".')"';      my $dest='"javascript:changePage(document.'.$phase.','."'$newphase'".')"';
     if ($phase eq 'process') {      if ($phase eq 'process') {
         $r->print('<p><a href='.$dest.'>'.$button_text.'</a></p>');          $r->print(
               &Apache::lonhtmlcommon::actionbox(
                   ['<a href='.$dest.'>'.$button_text.'</a>']));
     } else {      } else {
         my $onclick;          my $onclick;
         if ($phase eq 'display') {          if ($phase eq 'display') {
Line 185  sub make_changes { Line 188  sub make_changes {
        {href=>"javascript:changePage(document.$phase,'$phase')",         {href=>"javascript:changePage(document.$phase,'$phase')",
         text=>"Updated"});          text=>"Updated"});
     &print_header($r,$phase,$context,undef,$container);      &print_header($r,$phase,$context,undef,$container);
     my $crstype;      my ($crstype,$lastact);
     if ($context eq 'course') {      if ($context eq 'course') {
         $crstype = &Apache::loncommon::course_type();          $crstype = &Apache::loncommon::course_type();
     }      }
Line 196  sub make_changes { Line 199  sub make_changes {
                 if ($context eq 'domain') {                  if ($context eq 'domain') {
                     $r->print('<h3>'.&mt($prefs->{$item}{'text'}).'</h3>'.                      $r->print('<h3>'.&mt($prefs->{$item}{'text'}).'</h3>'.
                               &Apache::domainprefs::process_changes($r,$dom,                                &Apache::domainprefs::process_changes($r,$dom,
                                           $confname,$item,$roles,$values));                                            $confname,$item,$roles,$values,\$lastact));
                 } else {                  } else {
                     $changes{$item} = {};                      $changes{$item} = {};
                     &Apache::courseprefs::process_changes($dom,$item,$values,                      &Apache::courseprefs::process_changes($dom,$item,$values,
Line 241  sub make_changes { Line 244  sub make_changes {
     }      }
     &print_footer($r,$phase,'display',$footer_text,\@actions,$container);      &print_footer($r,$phase,'display',$footer_text,\@actions,$container);
     $r->print('</p>');      $r->print('</p>');
       return $lastact;
 }  }
   
 sub display_settings {  sub display_settings {
Line 292  sub display_settings { Line 296  sub display_settings {
         }          }
         $r->print('</form>');          $r->print('</form>');
     }      }
       if ($container) {
           &Apache::lonparmset::endSettingsScreen($r);
       }
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     return;      return;
 }  }
Line 348  sub display_choices { Line 355  sub display_choices {
     }      }
     $r->print(&print_footer($r,$phase,'display','Display',undef,$container));      $r->print(&print_footer($r,$phase,'display','Display',undef,$container));
     $r->print('</form>');      $r->print('</form>');
       if ($container) {
           &Apache::lonparmset::endSettingsScreen($r);
       }
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     return;      return;
 }  }

Removed from v.1.22  
changed lines
  Added in v.1.26


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>