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

banghart lon-capa-cvs@mail.lon-capa.org
Mon, 31 Oct 2005 21:11:45 -0000


banghart		Mon Oct 31 16:11:45 2005 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  	A step toward handling course restricted metadata.
  	Now saves <courserestricted>course</courserestricted>
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.120 loncom/interface/lonmeta.pm:1.121
--- loncom/interface/lonmeta.pm:1.120	Sun Oct 30 20:49:21 2005
+++ loncom/interface/lonmeta.pm	Mon Oct 31 16:11:45 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.120 2005/10/31 01:49:21 banghart Exp $
+# $Id: lonmeta.pm,v 1.121 2005/10/31 21:11:45 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -495,6 +495,9 @@
         }
         if ($type eq 'author') {
         }
+        if ($type eq 'courserestricted') {
+            return ('<input type="hidden" name="new_courserestricted" value="'.$course_key.'" />');
+        }
         if ($type eq 'authorspace') {
         }
         if ($type eq 'modifyinguser') {
@@ -1086,7 +1089,8 @@
             }
             if ($metacourse ne 'none') {
                 # handle restrictions here
-                if ($env{$metacourse.'.metadata.'.$_.'.options'} =~ m/active/) {
+                if (($env{$metacourse.'.metadata.'.$_.'.options'} =~ m/active/)||
+                    ($_ eq 'courserestricted'))  {
                     $output.=('<p>'.$lt{$_}.': '.
                             &prettyinput($_,
 				   $Apache::lonpublisher::metadatafields{$_},