Diff for /loncom/interface/courseprefs.pm between versions 1.49.2.26 and 1.49.2.29

version 1.49.2.26, 2021/12/12 21:52:15 version 1.49.2.29, 2022/01/16 18:27:09
Line 464  sub handler { Line 464  sub handler {
                      help => 'Course_Prefs_Display',                       help => 'Course_Prefs_Display',
                      ordered => ['default_xml_style','pageseparators',                       ordered => ['default_xml_style','pageseparators',
                                  'disable_receipt_display','texengine',                                   'disable_receipt_display','texengine',
                                  'tthoptions','uselcmath','usejsme'],                                   'tthoptions','uselcmath','usejsme','inline_chem'],
                       itemtext => {                        itemtext => {
                           default_xml_style       => 'Default XML style file',                            default_xml_style       => 'Default XML style file',
                           pageseparators          => 'Visibly Separate Items on Pages',                            pageseparators          => 'Visibly Separate Items on Pages',
Line 473  sub handler { Line 473  sub handler {
                           tthoptions              => 'Default set of options to pass to tth/m when converting TeX',                            tthoptions              => 'Default set of options to pass to tth/m when converting TeX',
                           uselcmath               => 'Student formula entry uses inline preview, not DragMath pop-up',                            uselcmath               => 'Student formula entry uses inline preview, not DragMath pop-up',
                           usejsme                 => 'Molecule editor uses JSME (HTML5) in place of JME (Java)',                            usejsme                 => 'Molecule editor uses JSME (HTML5) in place of JME (Java)',
                             inline_chem             => 'Chemical reaction response uses inline preview, not pop-up',
                                   },                                    },
                   },                    },
         'grading' =>          'grading' =>
Line 943  sub process_changes { Line 944  sub process_changes {
                                         $autocoowner = $domconf{'autoenroll'}{'co-owners'};                                          $autocoowner = $domconf{'autoenroll'}{'co-owners'};
                                     }                                      }
                                 }                                  }
                                 unless ($autocoowner) {                                  if ($autocoowner) {
                                       $newvalues{'co-owners'} = $values->{'internal.co-owners'}; 
                                   } else {
                                     my @keepcoowners = &Apache::loncommon::get_env_multiple('form.coowners');                                      my @keepcoowners = &Apache::loncommon::get_env_multiple('form.coowners');
                                     my @pendingcoowners = &Apache::loncommon::get_env_multiple('form.pendingcoowners');                                      my @pendingcoowners = &Apache::loncommon::get_env_multiple('form.pendingcoowners');
                                     my @invitecoowners =  &Apache::loncommon::get_env_multiple('form.invitecoowners');                                      my @invitecoowners =  &Apache::loncommon::get_env_multiple('form.invitecoowners');
Line 988  sub process_changes { Line 991  sub process_changes {
                                     if ($pendingcoowners ne '') {                                      if ($pendingcoowners ne '') {
                                         @newpending = @pendingcoown;                                          @newpending = @pendingcoown;
                                     }                                      }
                                   } else {
                                       @newcoown = @currcoown;
                                 }                                  }
                                 $newvalues{'pendingco-owners'} = join(',',sort(@newpending));                                  $newvalues{'pendingco-owners'} = join(',',sort(@newpending));
                                 $newvalues{'co-owners'} = join(',',sort(@newcoown));                                  $newvalues{'co-owners'} = join(',',sort(@newcoown));
Line 1475  sub store_changes { Line 1480  sub store_changes {
                                         $displayval = &Apache::lonlocal::locallocaltime($displayval);                                          $displayval = &Apache::lonlocal::locallocaltime($displayval);
                                     } elsif ($key eq 'categories') {                                      } elsif ($key eq 'categories') {
                                         $displayval = $env{'form.categories_display'};                                          $displayval = $env{'form.categories_display'};
                                     } elsif (($key eq 'canuse_pdfforms') || ($key eq 'usejsme') || ($key eq 'uselcmath')) {                                      } elsif (($key eq 'canuse_pdfforms') || ($key eq 'usejsme') ||
                                                ($key eq 'uselcmath') || ($key eq 'inline_chem')) {
                                         if ($changes->{$item}{$key} eq '1') {                                          if ($changes->{$item}{$key} eq '1') {
                                             $displayval = &mt('Yes');                                              $displayval = &mt('Yes');
                                         } elsif ($changes->{$item}{$key} eq '0') {                                          } elsif ($changes->{$item}{$key} eq '0') {
Line 3171  sub coowner_invitations { Line 3177  sub coowner_invitations {
         @pendingcoown = split(',',$pendingcoowners);          @pendingcoown = split(',',$pendingcoowners);
     }      }
     if (ref($currcoownref) eq 'ARRAY') {      if (ref($currcoownref) eq 'ARRAY') {
         @currcoown == @{$currcoownref};          @currcoown = @{$currcoownref};
     }      }
     my $disabled;      my $disabled;
     if ($noedit) {      if ($noedit) {
Line 3235  sub manage_coownership  { Line 3241  sub manage_coownership  {
         @pendingcoown = split(',',$pendingcoowners);          @pendingcoown = split(',',$pendingcoowners);
     }      }
     if (ref($currcoownref) eq 'ARRAY') {      if (ref($currcoownref) eq 'ARRAY') {
         @currcoown == @{$currcoownref};          @currcoown = @{$currcoownref};
     }      }
     my $disabled;      my $disabled;
     if ($noedit) {      if ($noedit) {
Line 4016  sub print_appearance { Line 4022  sub print_appearance {
                    text => '<b>'.&mt($itemtext->{'usejsme'}).'</b>',                     text => '<b>'.&mt($itemtext->{'usejsme'}).'</b>',
                    input => 'radio',                     input => 'radio',
                  },                   },
            'inline_chem' => {
                      text => '<b>'.&mt($itemtext->{'inline_chem'}).'</b>',
                      input => 'radio',
                    },
     );      );
     return &make_item_rows($cdom,\%items,$ordered,$settings,$rowtotal,$crstype,'appearance',$noedit);      return &make_item_rows($cdom,\%items,$ordered,$settings,$rowtotal,$crstype,'appearance',$noedit);
 }  }
Line 4228  sub print_other { Line 4238  sub print_other {
                             input => 'textbox',                              input => 'textbox',
                             size  => '30',                              size  => '30',
                            };                             };
     my $output = &make_item_rows($cdom,\%items,\@ordered,$settings,$rowtotal,$crstype,'other',$noedit);      return &make_item_rows($cdom,\%items,\@ordered,$settings,$rowtotal,$crstype,'other',$noedit);
 }  }
   
 sub get_other_items {  sub get_other_items {
Line 4398  sub make_item_rows { Line 4408  sub make_item_rows {
                                                        $settings->{$item},$disabled);                                                         $settings->{$item},$disabled);
             } elsif ($items->{$item}{input} eq 'radio') {              } elsif ($items->{$item}{input} eq 'radio') {
                 my ($unsetdefault,$valueyes,$valueno);                  my ($unsetdefault,$valueyes,$valueno);
                 if (($item eq 'usejsme') || ($item eq 'uselcmath')) {                  if (($item eq 'usejsme') || ($item eq 'uselcmath') || ($item eq 'inline_chem')) {
                      my %domdefs = &Apache::lonnet::get_domain_defaults($cdom);                       my %domdefs = &Apache::lonnet::get_domain_defaults($cdom);
                      unless ($domdefs{$item} eq '0') {                       unless ($domdefs{$item} eq '0') {
                          $unsetdefault = 1;                           $unsetdefault = 1;

Removed from v.1.49.2.26  
changed lines
  Added in v.1.49.2.29


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