[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm

banghart lon-capa-cvs@mail.lon-capa.org
Fri, 11 Nov 2005 21:25:52 -0000


banghart		Fri Nov 11 16:25:52 2005 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  	Change title of course selector box
  	Display name of restricting course to user
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.124 loncom/interface/lonmeta.pm:1.125
--- loncom/interface/lonmeta.pm:1.124	Mon Nov  7 22:08:15 2005
+++ loncom/interface/lonmeta.pm	Fri Nov 11 16:25:50 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.124 2005/11/08 03:08:15 albertel Exp $
+# $Id: lonmeta.pm,v 1.125 2005/11/11 21:25:50 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -304,7 +304,7 @@
     }
     $r->print('<h3>Course Related Meta-Data</h3><br />');
     $r->print('<form action="" method="post">');
-    $r->print('Select your test course<br />');
+    $r->print('Select course restrictions<br />');
     $r->print('<select name="metacourse" >');
     my $meta_not_found = 1;
     foreach my $key (keys (%courses)) {    
@@ -494,6 +494,12 @@
             $only_one = 'true';
         }
         if ($type eq 'author') {
+            return 
+            '<input type="text" name="'.$fieldname.'" size="'.$size.'" '.
+            'value="'.$value.'" />'.
+        &relatedfield(1,$relatedsearchflag,$relatedsep,$fieldname,
+                      $relatedvalue); 
+            
         }
         if ($type eq 'courserestricted') {
             return ('<input type="hidden" name="new_courserestricted" value="'.$course_key.'" />');
@@ -519,7 +525,7 @@
             if ($only_one) {
                 return(&Apache::loncommon::select_form($def,'new_keywords',%hash));
             } else {
-                return(&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values,undef,\%hash));
+                return (&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values,undef,\%hash));
             }
         }
         if ($type eq  'notes') {
@@ -1087,6 +1093,10 @@
                 $Apache::lonpublisher::metadatafields{'copyright'}=
                 'default';
         }
+        if ($metacourse ne 'none') {
+             $r->print('Document metadata restricted by :<strong> '.$env{$metacourse.".description"}."</strong><br />");
+        }
+        
         foreach (@fields) {
             if (defined($env{'form.new_'.$_})) {
                 $Apache::lonpublisher::metadatafields{$_}=