--- loncom/interface/lonmodifycourse.pm 2013/07/19 18:24:16 1.62 +++ loncom/interface/lonmodifycourse.pm 2014/02/27 11:44:40 1.67 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.62 2013/07/19 18:24:16 bisitz Exp $ +# $Id: lonmodifycourse.pm,v 1.67 2014/02/27 11:44:40 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -449,6 +449,8 @@ sub print_setquota { $uploadquota = $domdefs{$lctype.'quota'}; } elsif ($settings{'internal.instcode'}) { $uploadquota = $domdefs{'officialquota'}; + } elsif ($settings{'internal.textbook'}) { + $uploadquota = $domdefs{'textbookquota'}; } else { $uploadquota = $domdefs{'unofficialquota'}; } @@ -994,18 +996,19 @@ sub modify_course { $reply = '

'.$mainheader.' '.$cdesc.'

'."\n". '

'.$reply.'

'."\n". '
'. - &hidden_form_elements(). - ''. - &mt('Pick another action').''; + &hidden_form_elements(); + my @actions = + (''. + &mt('Pick another action').''); if ($numwarnings) { my $newrole = $ccrole.'./'.$cdom.'/'.$cnum; my $escuri = &HTML::Entities::encode('/adm/roles?selectrole=1&'.$newrole. '=1&destinationurl=/adm/populate','&<>"'); - $reply .= '
'. - &mt('Go to Automated Enrollment Manager for course').''; + push(@actions, ''. + &mt('Go to Automated Enrollment Manager for course').''); } - $reply .= '
'; + $reply .= &Apache::lonhtmlcommon::actionbox(\@actions).''; $r->print($reply); return; } @@ -1238,10 +1241,10 @@ sub modify_quota { } $r->print('

'); if ($type eq 'Community') { - $r->print(&mt('Disk usage [_1] exceeds the quota for this community.',$newoverquota).' '. + $r->print(&mt("Disk usage $newoverquota exceeds the quota for this community.").' '. &mt('Upload of new portfolio files and assignment of a non-zero MB quota to new groups in the community will not be possible until some files have been deleted, and total usage is below community quota.')); } else { - $r->print(&mt('Disk usage [_1] exceeds the quota for this course.',$newoverquota).' '. + $r->print(&mt("Disk usage $newoverquota exceeds the quota for this course.").' '. &mt('Upload of new portfolio files and assignment of a non-zero MB quota to new groups in the course will not be possible until some files have been deleted, and total usage is below course quota.')); } $r->print('

'); @@ -1252,7 +1255,7 @@ sub modify_quota { ''.$updatedsettings{'internal.uploadquota'}.'').'
'); } } else { - $r->print(&mt('An error occurred storing the quota(s) for group portfolio files and/or uploaded content.'). + $r->print(&mt('An error occurred storing the quota(s) for group portfolio files and/or uploaded content: '). $putreply); } } @@ -1636,7 +1639,7 @@ sub hidden_form_elements { sub showcredits { my ($dom) = @_; my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); - if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'}) { + if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'} || $domdefaults{'textbokcredits'}) { return 1; } }