--- loncom/interface/domainprefs.pm 2014/05/09 15:02:31 1.242 +++ loncom/interface/domainprefs.pm 2014/05/09 17:43:13 1.243 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.242 2014/05/09 15:02:31 raeburn Exp $ +# $Id: domainprefs.pm,v 1.243 2014/05/09 17:43:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2135,11 +2135,12 @@ sub print_textbookcourses { my $key = $ordered{$items[$i]}; my %coursehash=&Apache::lonnet::coursedescription($key); 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') { $subject = $bookshash->{$key}->{'subject'}; $title = $bookshash->{$key}->{'title'}; if ($type eq 'textbooks') { + $publisher = $bookshash->{$key}->{'publisher'}; $author = $bookshash->{$key}->{'author'}; $image = $bookshash->{$key}->{'image'}; if ($image ne '') { @@ -2169,6 +2170,8 @@ sub print_textbookcourses { ''.&mt('Title:').' '; if ($type eq 'textbooks') { $datatable .= (' 'x2). + ''.&mt('Publisher:').' '. + (' 'x2). ''.&mt('Author(s):').' '. (' 'x2). ''.&mt('Thumbnail:'); @@ -2212,7 +2215,9 @@ sub print_textbookcourses { ''.&mt('Title:').' '."\n". (' 'x2); if ($type eq 'textbooks') { - $datatable .= ''.&mt('Author(s):').' '."\n". + $datatable .= ''.&mt('Publisher:').' '."\n". + (' 'x2). + ''.&mt('Author(s):').' '."\n". (' 'x2). ''.&mt('Image:').' '; if ($switchserver) { @@ -6968,8 +6973,9 @@ sub modify_quotas { } else { my $newpos = $env{'form.'.$itemid}; $newpos =~ s/\D+//g; - foreach my $item ('subject','title','author') { - next if (($item eq 'author') && ($type eq 'templates')); + foreach my $item ('subject','title','publisher','author') { + next if ((($item eq 'author') || ($item eq 'publisher')) && + ($type eq 'templates')); $confhash{$type}{$key}{$item} = $env{'form.'.$type.'_'.$item.'_'.$i}; if ($domconfig{$action}{$type}{$key}{$item} ne $confhash{$type}{$key}{$item}) { $changes{$type}{$key} = 1; @@ -7014,8 +7020,9 @@ sub modify_quotas { foreach my $type ('textbooks','templates') { if ($newbook{$type}) { $changes{$type}{$newbook{$type}} = 1; - foreach my $item ('subject','title','author') { - next if (($item eq 'author') && ($type eq 'template')); + foreach my $item ('subject','title','publisher','author') { + next if ((($item eq 'author') || ($item eq 'publisher')) && + ($type eq 'template')); $env{'form.'.$type.'_addbook_'.$item} =~ s/(`)/'/g; if ($env{'form.'.$type.'_addbook_'.$item}) { $confhash{$type}{$newbook{$type}}{$item} = $env{'form.'.$type.'_addbook_'.$item}; @@ -7429,8 +7436,9 @@ sub modify_quotas { my $coursetitle = $coursehash{'description'}; my $position = $confhash{$type}{$key}{'order'} + 1; $resulttext .= '
  • '; - foreach my $item ('subject','title','author') { - next if (($item eq 'author') && ($type eq 'templates')); + foreach my $item ('subject','title','publisher','author') { + next if ((($item eq 'author') || ($item eq 'publisher')) && + ($type eq 'templates')); my $name = $item.':'; $name =~ s/^(\w)/\U$1/; $resulttext .= &mt($name).' '.$confhash{$type}{$key}{$item}.'
    ';