Diff for /loncom/interface/domainprefs.pm between versions 1.242 and 1.243

version 1.242, 2014/05/09 15:02:31 version 1.243, 2014/05/09 17:43:13
Line 2135  sub print_textbookcourses { Line 2135  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 2169  sub print_textbookcourses { Line 2170  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 2212  sub print_textbookcourses { Line 2215  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 6968  sub modify_quotas { Line 6973  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 7014  sub modify_quotas { Line 7020  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 7429  sub modify_quotas { Line 7436  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 />';

Removed from v.1.242  
changed lines
  Added in v.1.243


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