--- loncom/publisher/lonpublisher.pm 2007/07/13 20:11:27 1.227
+++ loncom/publisher/lonpublisher.pm 2008/05/12 23:47:49 1.234
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.227 2007/07/13 20:11:27 albertel Exp $
+# $Id: lonpublisher.pm,v 1.234 2008/05/12 23:47:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -143,6 +143,8 @@ my $cudom;
my $registered_cleanup;
my $modified_urls;
+my $lock;
+
=pod
=item B $title:".
" '.
&mt('If this resource is in active use, student performance data from the previous version may become inaccessible.').'
".
''.
- 'Select '.
- 'Search';
+ ''.&mt('Select').' '.
+ ''.&mt('Search').'';
}
@@ -841,8 +843,9 @@ sub store_metadata {
if (($metadata{'obsolete'}) || ($metadata{'copyright'} eq 'priv') ||
($metadata{'copyright'} eq 'custom')) {
# remove this entry
- $status=&LONCAPA::lonmetadata::delete_metadata($dbh,undef,
- $metadata{'url'});
+ my $delitem = 'url = '.$dbh->quote($metadata{'url'});
+ $status = &LONCAPA::lonmetadata::delete_metadata($dbh,undef,$delitem);
+
} else {
$status = &LONCAPA::lonmetadata::update_metadata($dbh,undef,undef,
\%metadata);
@@ -963,18 +966,23 @@ sub publish {
$scrout.=''.&mt('Dependencies').'
';
my $allowstr='';
- foreach (sort(keys(%allow))) {
- my $thisdep=$_;
+ foreach my $thisdep (sort(keys(%allow))) {
if ($thisdep !~ /[^\s]/) { next; }
+ if ($thisdep =~/\$/) {
+ $scrout.='
'
+ .&mt('The resource depends on another resource with variable filename, i.e., [_1].',''.$thisdep.'').'
'
+ .&mt('You likely need to explicitly allow access to all possible dependencies using the [_1]-tag.','<allow>')
+ .'
';
+ }
unless ($style eq 'rat') {
$allowstr.="\n".'
';
- if ($thisdep!~/\*/ && $thisdep!~m|^/adm/|) {
+ if ($thisdep!~/[\*\$]/ && $thisdep!~m|^/adm/|) {
$scrout.='';
}
$scrout.=''.$thisdep.'';
- if ($thisdep!~/\*/ && $thisdep!~m|^/adm/|) {
+ if ($thisdep!~/[\*\$]/ && $thisdep!~m|^/adm/|) {
$scrout.='';
if (
&Apache::lonnet::getfile($Apache::lonnet::perlvar{'lonDocRoot'}.'/'.
@@ -1130,6 +1138,11 @@ sub publish {
'
';
}
+ if ($metadatafields{'copyright'} eq 'priv') {
+ $scrout.='
'. + &mt('Copyright/distribution option "Private" is no longer supported. Select another option from below. Consider "Custom Rights" for maximum control over the usage of your resource.').'