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

banghart lon-capa-cvs@mail.lon-capa.org
Fri, 06 Oct 2006 19:04:30 -0000


banghart		Fri Oct  6 15:04:30 2006 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  	Don't show deleted fields to students.
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.180 loncom/interface/lonmeta.pm:1.181
--- loncom/interface/lonmeta.pm:1.180	Fri Sep 29 14:11:49 2006
+++ loncom/interface/lonmeta.pm	Fri Oct  6 15:04:29 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.180 2006/09/29 18:11:49 albertel Exp $
+# $Id: lonmeta.pm,v 1.181 2006/10/06 19:04:29 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1246,6 +1246,7 @@
 	    }
 	}
         foreach my $field_name(keys (%$added_metadata_fields)) {
+            
             push (@fields,$field_name);
             $lt{$field_name} = $$added_metadata_fields{$field_name};
         }
@@ -1257,8 +1258,12 @@
             if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none'
 		&& exists($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'})) {
                 # handle restrictions here
-                if (($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/active/) ||
-                    ($field_name eq 'courserestricted')){
+                if ($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/deleted/) {
+                    &Apache::lonnet::logthis("the options field ".$env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'});
+                }
+                if ((($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/active/) ||
+                    ($field_name eq 'courserestricted'))&&
+                    (!($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/deleted/))){
                     $output.=("\n".'<p>'.$lt{$field_name}.': '.
                               &prettyinput($field_name,
 				   $Apache::lonpublisher::metadatafields{$field_name},