version 1.54.4.1, 2018/09/03 12:43:00
|
version 1.58, 2018/05/02 19:34:58
|
Line 32 use Apache::lonnet;
|
Line 32 use Apache::lonnet;
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::loncleanup; |
use Apache::loncleanup; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use LWP::UserAgent; |
|
use HTTP::Request::Common; |
use HTTP::Request::Common; |
use LONCAPA::Configuration; |
use LONCAPA::Configuration; |
|
use LONCAPA::LWPReq; |
use strict; |
use strict; |
|
|
sub ims_config { |
sub ims_config { |
Line 4963 sub retrieve_image {
|
Line 4963 sub retrieve_image {
|
my ($context,$res,$dirname,$cdom,$cname,$docroot,$destdir,$urlpath,$filename) = @_; |
my ($context,$res,$dirname,$cdom,$cname,$docroot,$destdir,$urlpath,$filename) = @_; |
my $contents; |
my $contents; |
my $url = $urlpath.$filename; |
my $url = $urlpath.$filename; |
my $ua=new LWP::UserAgent; |
my $lonhost = $Apache::lonnet::perlvar{'lonHostID'}; |
my $request=new HTTP::Request('GET',$url); |
my $request=new HTTP::Request('GET',$url); |
my $response=$ua->request($request); |
my $response=&LONCAPA::LWPReq::makerequest($lonhost,$request); |
if ($response->is_success) { |
if ($response->is_success) { |
$contents = $response->content; |
$contents = $response->content; |
if (!-e "$docroot/$res") { |
if (!-e "$docroot/$res") { |