[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Tue, 02 Aug 2005 21:35:12 -0000
banghart Tue Aug 2 17:35:12 2005 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
Saving work.
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.101 loncom/interface/lonmeta.pm:1.102
--- loncom/interface/lonmeta.pm:1.101 Tue Aug 2 13:01:20 2005
+++ loncom/interface/lonmeta.pm Tue Aug 2 17:35:10 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.101 2005/08/02 17:01:20 banghart Exp $
+# $Id: lonmeta.pm,v 1.102 2005/08/02 21:35:10 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -292,17 +292,14 @@
my ($r)=@_;
$r->print('<h3>Instructor Selected Meta-Data</h3><br />');
$r->print('<form action="" method="post">');
- $r->print('Select your course<br>'.$env{'user.domain'});
+ $r->print('Select your course<br>');
$r->print('<select name="metacourse" >');
- $r->print('<input type="submit" >');
- $r->print('</form>');
-
foreach my $key (keys %env) {
if ($key =~ /\.metadata\./) {
my $course_key = $key;
$course_key =~ s/\.metadata\..*//;
- $r->print('<option>');
+ $r->print('<option value="'.$course_key.'">');
$r->print($env{$course_key.'.description'});
$r->print('</option>');
}
@@ -571,8 +568,12 @@
} elsif ($uri=~/\/portfolio\//) {
$r->print(&Apache::loncommon::bodytag
('Edit Portfolio File Information','','','',$resdomain));
- &present_editable_metadata($r,$uri,'portfolio');
- &select_course($r);
+ if ($env{'form.metacourse'}) {
+ &present_instructor_metadata($r,$uri,'portfolio');
+ } else {
+ &present_editable_metadata($r,$uri,'portfolio');
+ &select_course($r);
+ }
} elsif ($uri=~/^\/\~/) {
# Construction space
@@ -908,6 +909,13 @@
return;
}
+sub present_instructor_metadata {
+ my ($r,$uri, $file_type) = @_;
+ print $r->print('This is the instructor metadata area');
+ return 'ok';
+}
+
+
#####################################################
#####################################################
### ###