Diff for /loncom/interface/lonconfigsettings.pm between versions 1.33 and 1.34

version 1.33, 2016/10/11 22:58:55 version 1.34, 2017/07/26 19:45:45
Line 40  use Apache::courseclassifier(); Line 40  use Apache::courseclassifier();
 use LONCAPA qw(:DEFAULT :match);   use LONCAPA qw(:DEFAULT :match); 
   
 sub print_header {  sub print_header {
     my ($r,$phase,$context,$jscript,$container) = @_;      my ($r,$phase,$context,$jscript,$container,$instcode,$dom) = @_;
     my ($pagetitle,$brcrumtitle,$action,$call_category_check,$instcode_check,      my ($pagetitle,$brcrumtitle,$action,$call_category_check,$instcode_check,
         $crstype,@actions,@code_order);          $crstype,@actions,@code_order);
     if ($phase eq 'display') {      if ($phase eq 'display') {
Line 177  $jscript Line 177  $jscript
         $additem = {'add_entries' => \%loaditems,};          $additem = {'add_entries' => \%loaditems,};
     } elsif ($phase eq 'display') {      } elsif ($phase eq 'display') {
         if ($context eq 'domain') {          if ($context eq 'domain') {
               my $onload;
             if (grep(/^coursedefaults$/,@actions)) {              if (grep(/^coursedefaults$/,@actions)) {
                   $onload = "toggleDisplay(document.display,'cloneinstcode');".
                             "toggleDisplay(document.display,'credits');".
                             "toggleDisplay(document.display,'studentsubmission');";
               }
               if (grep(/^selfcreation$/,@actions)) {
                   my $prefix = 'cancreate_emailverified';
                   my %domdefaults = &Apache::lonnet::get_domain_defaults($dom);
                   if (ref($domdefaults{'inststatusguest'}) eq 'ARRAY') {
                       my $order = $domdefaults{'inststatusguest'};
                       if (ref($order) eq 'ARRAY') {
                           foreach my $type (@{$order}) {
                               if (($type ne '') && ($type ne 'default')) {
                                   my $name = $prefix.'_'.$type;
                                   $onload .= "toggleDisplay(document.display,'$name');";
                               }
                           }
                       }
                   }
                   $onload .= "toggleDisplay(document.display,'$prefix');".
                              "toggleDisplay(document.display,'emailoptions');".
               }
               if ($onload) {
                 my %loaditems = (                  my %loaditems = (
                     '             onload' => "toggleDisplay(document.display,'cloneinstcode');".                                    'onload' => $onload;
                                              "toggleDisplay(document.display,'credits');".  
                                              "toggleDisplay(document.display,'studentsubmission');",  
                                 );                                  );
                 $additem = {'add_entries' => \%loaditems,};                  $additem = {'add_entries' => \%loaditems,};
             }              }
Line 342  sub display_settings { Line 363  sub display_settings {
     if (ref($values) eq 'HASH') {      if (ref($values) eq 'HASH') {
         $instcode = $values->{'internal.coursecode'};          $instcode = $values->{'internal.coursecode'};
     }      }
     &print_header($r,$phase,$context,$jscript,$container,$instcode);      &print_header($r,$phase,$context,$jscript,$container,$instcode,$dom);
     my $divwidth = 900;      my $divwidth = 900;
     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) {

Removed from v.1.33  
changed lines
  Added in v.1.34


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