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

banghart lon-capa-cvs@mail.lon-capa.org
Tue, 22 Nov 2005 23:20:43 -0000


banghart		Tue Nov 22 18:20:43 2005 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  	Make things work:
  	- echo responses when student cannot type
  	- display choices in pulldown`
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.132 loncom/interface/lonmeta.pm:1.133
--- loncom/interface/lonmeta.pm:1.132	Tue Nov 22 14:43:53 2005
+++ loncom/interface/lonmeta.pm	Tue Nov 22 18:20:40 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.132 2005/11/22 19:43:53 banghart Exp $
+# $Id: lonmeta.pm,v 1.133 2005/11/22 23:20:40 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -243,6 +243,7 @@
          'authorspace' => 'Author Space',
          'modifyinguser' => 'Last Modifying User',
          'subject' => 'Subject',
+         'standards' => 'Standards',
          'keywords' => 'Keyword(s)',
          'notes' => 'Notes',
          'abstract' => 'Abstract',
@@ -254,7 +255,6 @@
         %fields = 
         (%fields,
          'domain' => 'Domain',
-         'standards' => 'Standards',
          'mime' => 'MIME Type',
          'language' => 'Language',
          'creationdate' => 'Creation Date',
@@ -284,7 +284,7 @@
          'stdno'      => 'Total number of students who have worked on this problem',
          'difficulty' => 'Degree of difficulty',
          'disc'       => 'Degree of discrimination',
-	 'dependencies' => 'Resources used by this resource',
+	     'dependencies' => 'Resources used by this resource',
          );
     }
     return &Apache::lonlocal::texthash(%fields);
@@ -499,10 +499,10 @@
         }
         # need to take instructor values out of list where instructor and student
         # values may be mixed.
-        if ($values && $stu_add) {
+        if ($values) {
             foreach my $item (split(/,/,$values)) {
                 $item =~ s/^\s+//;
-                $meta_options{$item} = $type;
+                $meta_options{$item} = $item;
             }
             foreach my $item (split(/,/,$value)) {
                 $item =~ s/^\s+//;
@@ -520,7 +520,7 @@
         }
         if (($type eq 'keywords') || ($type eq 'subject')
              || ($type eq 'author')||($type eq  'notes')
-             || ($type eq  'abstract')|| ($type eq  'title')) {
+             || ($type eq  'abstract')|| ($type eq  'title')|| ($type eq  'standards')) {
             if ($values) {
                 if ($only_one) {
                     $output .= (&Apache::loncommon::select_form($value,'new_'.$type,%meta_options));
@@ -1071,7 +1071,7 @@
 	my @fields;
 	if ($file_type eq 'portfolio') {
 	    @fields =  ('author','title','subject','keywords','abstract','notes','lowestgradelevel',
-	                'highestgradelevel','courserestricted');
+	                'highestgradelevel','standards','courserestricted');
 	} else {
 	    @fields = ('author','title','subject','keywords','abstract','notes',
                  'copyright','customdistributionfile','language',