version 1.296, 2016/06/19 01:08:01
|
version 1.297, 2016/06/19 04:27:57
|
Line 1875 sub phasetwo {
|
Line 1875 sub phasetwo {
|
$metadatafields{'url'} = $distarget; |
$metadatafields{'url'} = $distarget; |
$metadatafields{'version'} = 'current'; |
$metadatafields{'version'} = 'current'; |
|
|
my ($error,$success) = &store_metadata(%metadatafields); |
my $crsauthor; |
if ($success) { |
if ($env{'request.course.id'}) { |
$output .= '<p>'.&mt('Synchronized SQL metadata database').'</p>'; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
print $logfile "\nSynchronized SQL metadata database"; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
} else { |
if ($distarget =~ m{^/res/$cdom/$cnum}) { |
$output .= $error; |
$crsauthor = 1; |
print $logfile "\n".$error; |
} |
} |
} |
unless ($usebuffer) { |
unless ($crsauthor) { |
$r->print($output); |
my ($error,$success) = &store_metadata(%metadatafields); |
$output = ''; |
if ($success) { |
|
$output .= '<p>'.&mt('Synchronized SQL metadata database').'</p>'; |
|
print $logfile "\nSynchronized SQL metadata database"; |
|
} else { |
|
$output .= $error; |
|
print $logfile "\n".$error; |
|
} |
|
unless ($usebuffer) { |
|
$r->print($output); |
|
$output = ''; |
|
} |
} |
} |
# --------------------------------------------- Delete author resource messages |
# --------------------------------------------- Delete author resource messages |
my $delresult=&Apache::lonmsg::del_url_author_res_msg($target); |
my $delresult=&Apache::lonmsg::del_url_author_res_msg($target); |