Diff for /loncom/interface/domainprefs.pm between versions 1.160.6.46 and 1.160.6.49

version 1.160.6.46, 2014/05/09 15:23:28 version 1.160.6.49, 2014/05/23 09:00:22
Line 412  sub handler { Line 412  sub handler {
         'coursedefaults' =>           'coursedefaults' => 
                  {text => 'Course/Community defaults',                   {text => 'Course/Community defaults',
                   help => 'Domain_Configuration_Course_Defaults',                    help => 'Domain_Configuration_Course_Defaults',
                   header => [{col1 => 'Defaults which can be overridden in each course by a CC',                    header => [{col1 => 'Defaults which can be overridden for each course by a DC',
                               col2 => 'Value',},  
                              {col1 => 'Defaults which can be overridden for each course by a DC',  
                               col2 => 'Value',},],                                col2 => 'Value',},],
                   print => \&print_coursedefaults,                    print => \&print_coursedefaults,
                   modify => \&modify_coursedefaults,                    modify => \&modify_coursedefaults,
Line 723  sub print_config_box { Line 721  sub print_config_box {
                 $output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);                  $output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);
             }              }
             $rowtotal ++;              $rowtotal ++;
         } elsif (($action eq 'usermodification') || ($action eq 'coursedefaults') ||          } elsif (($action eq 'usermodification') || ($action eq 'defaults')) {
                   ($action eq 'defaults')) {  
             $output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);              $output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);
         } elsif ($action eq 'login') {          } elsif ($action eq 'login') {
             if ($numheaders == 3) {              if ($numheaders == 3) {
Line 865  sub print_config_box { Line 862  sub print_config_box {
             $output .= &print_scantronformat($r,$dom,$confname,$settings,\$rowtotal);              $output .= &print_scantronformat($r,$dom,$confname,$settings,\$rowtotal);
         } elsif ($action eq 'helpsettings') {          } elsif ($action eq 'helpsettings') {
             $output .= &print_helpsettings($dom,$confname,$settings,\$rowtotal);              $output .= &print_helpsettings($dom,$confname,$settings,\$rowtotal);
           } elsif ($action eq 'coursedefaults') {
               $output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);
         }          }
     }      }
     $output .= '      $output .= '
Line 2117  sub print_textbookcourses { Line 2116  sub print_textbookcourses {
             my $key = $ordered{$items[$i]};              my $key = $ordered{$items[$i]};
             my %coursehash=&Apache::lonnet::coursedescription($key);              my %coursehash=&Apache::lonnet::coursedescription($key);
             my $coursetitle = $coursehash{'description'};              my $coursetitle = $coursehash{'description'};
             my ($subject,$title,$author,$image,$imgsrc,$cdom,$cnum);              my ($subject,$title,$author,$publisher,$image,$imgsrc,$cdom,$cnum);
             if (ref($bookshash->{$key}) eq 'HASH') {              if (ref($bookshash->{$key}) eq 'HASH') {
                 $subject = $bookshash->{$key}->{'subject'};                  $subject = $bookshash->{$key}->{'subject'};
                 $title = $bookshash->{$key}->{'title'};                  $title = $bookshash->{$key}->{'title'};
                 if ($type eq 'textbooks') {                  if ($type eq 'textbooks') {
                       $publisher = $bookshash->{$key}->{'publisher'};
                     $author = $bookshash->{$key}->{'author'};                      $author = $bookshash->{$key}->{'author'};
                     $image = $bookshash->{$key}->{'image'};                      $image = $bookshash->{$key}->{'image'};
                     if ($image ne '') {                      if ($image ne '') {
Line 2151  sub print_textbookcourses { Line 2151  sub print_textbookcourses {
                 '<span class="LC_nobreak">'.&mt('Title:').'<input type="text" size="30" name="'.$type.'_title_'.$i.'" value="'.$title.'" /></span> ';                  '<span class="LC_nobreak">'.&mt('Title:').'<input type="text" size="30" name="'.$type.'_title_'.$i.'" value="'.$title.'" /></span> ';
             if ($type eq 'textbooks') {              if ($type eq 'textbooks') {
                 $datatable .= ('&nbsp;'x2).                  $datatable .= ('&nbsp;'x2).
                                 '<span class="LC_nobreak">'.&mt('Publisher:').'<input type="text" size="10" name="'.$type.'_publisher_'.$i.'" value="'.$publisher.'" /></span> '.
                                 ('&nbsp;'x2).
                               '<span class="LC_nobreak">'.&mt('Author(s):').'<input type="text" size="25" name="'.$type.'_author_'.$i.'" value="'.$author.'" /></span> '.                                '<span class="LC_nobreak">'.&mt('Author(s):').'<input type="text" size="25" name="'.$type.'_author_'.$i.'" value="'.$author.'" /></span> '.
                               ('&nbsp;'x2).                                ('&nbsp;'x2).
                               '<span class="LC_nobreak">'.&mt('Thumbnail:');                                '<span class="LC_nobreak">'.&mt('Thumbnail:');
Line 2194  sub print_textbookcourses { Line 2196  sub print_textbookcourses {
                   '<span class="LC_nobreak">'.&mt('Title:').'<input type="text" size="30" name="'.$type.'_addbook_title" value="" /></span> '."\n".                    '<span class="LC_nobreak">'.&mt('Title:').'<input type="text" size="30" name="'.$type.'_addbook_title" value="" /></span> '."\n".
                   ('&nbsp;'x2);                    ('&nbsp;'x2);
     if ($type eq 'textbooks') {      if ($type eq 'textbooks') {
         $datatable .= '<span class="LC_nobreak">'.&mt('Author(s):').'<input type="text" size="25" name="'.$type.'_addbook_author" value="" /></span> '."\n".          $datatable .= '<span class="LC_nobreak">'.&mt('Publisher:').'<input type="text" size="10" name="'.$type.'_addbook_publisher" value="" /></span> '."\n".
                         ('&nbsp;'x2).
                         '<span class="LC_nobreak">'.&mt('Author(s):').'<input type="text" size="25" name="'.$type.'_addbook_author" value="" /></span> '."\n".
                       ('&nbsp;'x2).                        ('&nbsp;'x2).
                       '<span class="LC_nobreak">'.&mt('Image:').'&nbsp;';                        '<span class="LC_nobreak">'.&mt('Image:').'&nbsp;';
         if ($switchserver) {          if ($switchserver) {
Line 6950  sub modify_quotas { Line 6954  sub modify_quotas {
                                 } else {                                  } else {
                                     my $newpos = $env{'form.'.$itemid};                                      my $newpos = $env{'form.'.$itemid};
                                     $newpos =~ s/\D+//g;                                      $newpos =~ s/\D+//g;
                                     foreach my $item ('subject','title','author') {                                      foreach my $item ('subject','title','publisher','author') {
                                         next if (($item eq 'author') && ($type eq 'templates'));                                          next if ((($item eq 'author') || ($item eq 'publisher')) &&
                                                    ($type eq 'templates'));
                                         $confhash{$type}{$key}{$item} = $env{'form.'.$type.'_'.$item.'_'.$i};                                          $confhash{$type}{$key}{$item} = $env{'form.'.$type.'_'.$item.'_'.$i};
                                         if ($domconfig{$action}{$type}{$key}{$item} ne $confhash{$type}{$key}{$item}) {                                          if ($domconfig{$action}{$type}{$key}{$item} ne $confhash{$type}{$key}{$item}) {
                                             $changes{$type}{$key} = 1;                                              $changes{$type}{$key} = 1;
Line 6996  sub modify_quotas { Line 7001  sub modify_quotas {
             foreach my $type ('textbooks','templates') {              foreach my $type ('textbooks','templates') {
                 if ($newbook{$type}) {                  if ($newbook{$type}) {
                     $changes{$type}{$newbook{$type}} = 1;                      $changes{$type}{$newbook{$type}} = 1;
                     foreach my $item ('subject','title','author') {                      foreach my $item ('subject','title','publisher','author') {
                         next if (($item eq 'author') && ($type eq 'template'));                          next if ((($item eq 'author') || ($item eq 'publisher')) &&
                                    ($type eq 'template'));
                         $env{'form.'.$type.'_addbook_'.$item} =~ s/(`)/'/g;                          $env{'form.'.$type.'_addbook_'.$item} =~ s/(`)/'/g;
                         if ($env{'form.'.$type.'_addbook_'.$item}) {                          if ($env{'form.'.$type.'_addbook_'.$item}) {
                             $confhash{$type}{$newbook{$type}}{$item} = $env{'form.'.$type.'_addbook_'.$item};                              $confhash{$type}{$newbook{$type}}{$item} = $env{'form.'.$type.'_addbook_'.$item};
Line 7411  sub modify_quotas { Line 7417  sub modify_quotas {
                             my $coursetitle = $coursehash{'description'};                              my $coursetitle = $coursehash{'description'};
                             my $position = $confhash{$type}{$key}{'order'} + 1;                              my $position = $confhash{$type}{$key}{'order'} + 1;
                             $resulttext .= '<li>';                              $resulttext .= '<li>';
                             foreach my $item ('subject','title','author') {                              foreach my $item ('subject','title','publisher','author') {
                                 next if (($item eq 'author') && ($type eq 'templates'));                                  next if ((($item eq 'author') || ($item eq 'publisher')) &&
                                            ($type eq 'templates'));
                                 my $name = $item.':';                                  my $name = $item.':';
                                 $name =~ s/^(\w)/\U$1/;                                  $name =~ s/^(\w)/\U$1/;
                                 $resulttext .= &mt($name).' '.$confhash{$type}{$key}{$item}.'<br />';                                  $resulttext .= &mt($name).' '.$confhash{$type}{$key}{$item}.'<br />';
Line 8504  sub modify_selfcreation { Line 8511  sub modify_selfcreation {
 # value set to one), if self-creation with e-mail address permitted, where $type is user type: faculty, staff, student etc.  # value set to one), if self-creation with e-mail address permitted, where $type is user type: faculty, staff, student etc.
 #  #
   
     if ($env{'form.cancreate_email'} eq 'email') {      if ($env{'form.cancreate_email'}) {
         push(@contexts,'emailusername');          push(@contexts,'emailusername');
         if (ref($types) eq 'ARRAY') {          if (ref($types) eq 'ARRAY') {
             foreach my $type (@{$types}) {              foreach my $type (@{$types}) {

Removed from v.1.160.6.46  
changed lines
  Added in v.1.160.6.49


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