[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Sat, 04 Nov 2006 01:50:32 -0000
banghart Fri Nov 3 20:50:32 2006 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
Saving work in progress.
Now asked for course association only on first time adding
of metadata to portfolio file.
Need next to allow changing course association.
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.185 loncom/interface/lonmeta.pm:1.186
--- loncom/interface/lonmeta.pm:1.185 Mon Oct 23 17:09:21 2006
+++ loncom/interface/lonmeta.pm Fri Nov 3 20:50:31 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.185 2006/10/23 21:09:21 albertel Exp $
+# $Id: lonmeta.pm,v 1.186 2006/11/04 01:50:31 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -746,7 +746,17 @@
if ($env{'form.store'}) {
&present_editable_metadata($r,$uri,'portfolio');
} else {
- &pre_select_course($r,$uri);
+ my $fn=&Apache::lonnet::filelocation('',$uri);
+ %Apache::lonpublisher::metadatafields=();
+ %Apache::lonpublisher::metadatakeys=();
+ my $result=&Apache::lonnet::getfile($fn);
+ &Apache::lonpublisher::metaeval($result);
+ &Apache::lonnet::logthis("restricted is: ".$Apache::lonpublisher::metadatafields{'courserestricted'});
+ if (!$Apache::lonpublisher::metadatafields{'courserestricted'}) {
+ &pre_select_course($r,$uri);
+ } else {
+ &present_editable_metadata($r,$uri,'portfolio');
+ }
}
} elsif ($uri=~m|^/editupload/[^/]+/[^/]+/groups/|) {
$r->print(&Apache::loncommon::start_page('Edit Group Portfolio File Catalog Information',