version 1.160.6.84.2.6, 2017/10/17 14:08:48
|
version 1.160.6.84.2.7, 2017/11/01 03:00:31
|
Line 8782 sub modify_quotas {
|
Line 8782 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) { |
if ($error) { |
$confhash{$type}{$key}{'image'} = $imgurl; |
&Apache::lonnet::logthis($error); |
$changes{$type}{$key} = 1; |
$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'} = |
Line 9325 sub process_textbook_image {
|
Line 9329 sub process_textbook_image {
|
} elsif ($author_ok eq 'ok') { |
} elsif ($author_ok eq 'ok') { |
my ($result,$imageurl) = |
my ($result,$imageurl) = |
&publishlogo($r,'upload',$caller,$dom,$confname, |
&publishlogo($r,'upload',$caller,$dom,$confname, |
"$type/$dom/$cnum/cover",$width,$height); |
"$type/$cdom/$cnum/cover",$width,$height); |
if ($result eq 'ok') { |
if ($result eq 'ok') { |
$url = $imageurl; |
$url = $imageurl; |
} else { |
} else { |
Line 9471 sub modify_ltitools {
|
Line 9475 sub modify_ltitools {
|
my $maxnum = $env{'form.ltitools_maxnum'}; |
my $maxnum = $env{'form.ltitools_maxnum'}; |
for (my $i=0; $i<=$maxnum; $i++) { |
for (my $i=0; $i<=$maxnum; $i++) { |
my $itemid = $env{'form.ltitools_id_'.$i}; |
my $itemid = $env{'form.ltitools_id_'.$i}; |
|
$itemid =~ s/\D+//g; |
if (ref($domconfig{$action}{$itemid}) eq 'HASH') { |
if (ref($domconfig{$action}{$itemid}) eq 'HASH') { |
if ($deletions{$itemid}) { |
if ($deletions{$itemid}) { |
if ($domconfig{$action}{$itemid}{'image'}) { |
if ($domconfig{$action}{$itemid}{'image'}) { |