version 1.312, 2017/08/25 00:07:45
|
version 1.313, 2017/08/25 00:33:14
|
Line 9269 sub modify_quotas {
|
Line 9269 sub modify_quotas {
|
#FIXME need to obsolete item in RES space |
#FIXME need to obsolete item in RES space |
} elsif ($env{'form.'.$type.'_image_'.$i.'.filename'}) { |
} elsif ($env{'form.'.$type.'_image_'.$i.'.filename'}) { |
my ($cdom,$cnum) = split(/_/,$key); |
my ($cdom,$cnum) = split(/_/,$key); |
my ($imgurl,$error) = &process_textbook_image($r,$dom,$confname,$type.'_image_'.$i, |
if (&Apache::lonnet::homeserver($cnum,$cdom) eq 'no_host') { |
$cdom,$cnum,$type,$configuserok, |
$errors .= '<li><span class="LC_error">'.&mt('Image not saved: could not find textbook course').'</li>'; |
$switchserver,$author_ok); |
} else { |
if ($imgurl) { |
my ($imgurl,$error) = &process_textbook_image($r,$dom,$confname,$type.'_image_'.$i, |
$confhash{$type}{$key}{'image'} = $imgurl; |
$cdom,$cnum,$type,$configuserok, |
$changes{$type}{$key} = 1; |
$switchserver,$author_ok); |
|
if ($imgurl) { |
|
$confhash{$type}{$key}{'image'} = $imgurl; |
|
$changes{$type}{$key} = 1; |
|
} |
|
if ($error) { |
|
&Apache::lonnet::logthis($error); |
|
$errors .= '<li><span class="LC_error">'.$error.'</span></li>'; |
|
} |
} |
} |
if ($error) { |
|
&Apache::lonnet::logthis($error); |
|
$errors .= '<li><span class="LC_error">'.$error.'</span></li>'; |
|
} |
|
} elsif ($domconfig{$action}{$type}{$key}{'image'}) { |
} elsif ($domconfig{$action}{$type}{$key}{'image'}) { |
$confhash{$type}{$key}{'image'} = |
$confhash{$type}{$key}{'image'} = |
$domconfig{$action}{$type}{$key}{'image'}; |
$domconfig{$action}{$type}{$key}{'image'}; |
Line 9312 sub modify_quotas {
|
Line 9316 sub modify_quotas {
|
if ($type eq 'textbooks') { |
if ($type eq 'textbooks') { |
if ($env{'form.'.$type.'_addbook_image.filename'} ne '') { |
if ($env{'form.'.$type.'_addbook_image.filename'} ne '') { |
my ($cdom,$cnum) = split(/_/,$newbook{$type}); |
my ($cdom,$cnum) = split(/_/,$newbook{$type}); |
my ($imageurl,$error) = |
if (&Apache::lonnet::homeserver($cnum,$cdom) eq 'no_host') { |
&process_textbook_image($r,$dom,$confname,$type.'_addbook_image',$cdom,$cnum,$type, |
$errors .= '<li><span class="LC_error">'.&mt('Image not saved: could not find textbook course').'</li>'; |
$configuserok,$switchserver,$author_ok); |
} else { |
if ($imageurl) { |
my ($imageurl,$error) = |
$confhash{$type}{$newbook{$type}}{'image'} = $imageurl; |
&process_textbook_image($r,$dom,$confname,$type.'_addbook_image',$cdom,$cnum,$type, |
} |
$configuserok,$switchserver,$author_ok); |
if ($error) { |
if ($imageurl) { |
&Apache::lonnet::logthis($error); |
$confhash{$type}{$newbook{$type}}{'image'} = $imageurl; |
$errors .= '<li><span class="LC_error">'.$error.'</span></li>'; |
} |
|
if ($error) { |
|
&Apache::lonnet::logthis($error); |
|
$errors .= '<li><span class="LC_error">'.$error.'</span></li>'; |
|
} |
} |
} |
} |
} |
} |
} |