[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm /publisher packages.tab

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 17 Aug 2004 20:27:04 -0000


albertel		Tue Aug 17 16:27:04 2004 EDT

  Modified files:              
    /loncom/publisher	packages.tab 
    /loncom/interface	lonparmset.pm 
  Log:
  - hiding 'encrypturl', 'hiddenresource', 'randompick', 'randompickseed'
  
  
Index: loncom/publisher/packages.tab
diff -u loncom/publisher/packages.tab:1.37 loncom/publisher/packages.tab:1.38
--- loncom/publisher/packages.tab:1.37	Tue Jul  6 14:51:46 2004
+++ loncom/publisher/packages.tab	Tue Aug 17 16:27:04 2004
@@ -28,8 +28,10 @@
 part_0&hiddenparts&type:string_any
 part_0&hiddenresource&display:Resource hidden from students
 part_0&hiddenresource&type:string_yesno
+part_0&hiddenresource&hidden:parm
 part_0&encrypturl&type:string_yesno
 part_0&encrypturl&display:Do not show plain URL
+part_0&encrypturl&hidden:parm
 part_0&mapalias&type:string
 part_0&mapalias&display:Resource alias name for conditions
 part_0&interval&display:Time-Limit
@@ -71,13 +73,17 @@
 #parameters for things by extension
 
 extension_sequence&randompick&type:int_pos
+extension_sequence&randompick&hidden:parm
 extension_sequence&randompick&display:Randomly pick number of resources
 extension_sequence&randompickseed&type:int_pos
+extension_sequence&randompickseed&hidden:parm
 extension_sequence&randompickseed&display:Random seed for randomly picking number of resources (optional, only set if you know what you are doing)
 
 extension_page&randompick&type:int_pos
+extension_page&randompick&hidden:parm
 extension_page&randompick&display:Randomly pick number of resources
 extension_page&randompickseed&type:int_pos
+extension_page&randompickseed&hidden:parm
 extension_page&randompickseed&display:Random seed for randomly picking number of resources (optional, only set if you know what you are doing)
 extension_page&contentopen&display:Content Opening Date
 extension_page&contentopen&type:date_start
@@ -90,7 +96,7 @@
 extension_page&discusshide&default:yes
 extension_page&encrypturl&type:string_yesno
 extension_page&encrypturl&display:Do not show plain URL
-
+extension_page&encrypturl&hidden:parm
 
 #default parameters for anything that doesn't have any more specific
 #pacakge defintions
@@ -103,6 +109,7 @@
 default&mapalias&display:Resource alias name for conditions
 default&encrypturl&type:string_yesno
 default&encrypturl&display:Do not show plain URL
+default&encrypturl&hidden:parm
 default&discussend&display:Discussion End Time
 default&discussend&type:date_end
 default&discusshide&display:Hide Closed Discussion
@@ -110,3 +117,4 @@
 default&discusshide&default:yes
 default&hiddenresource&display:Resource Hidden from Students
 default&hiddenresource&type:string_yesno
+default&hiddenresource&hidden:parm
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.172 loncom/interface/lonparmset.pm:1.173
--- loncom/interface/lonparmset.pm:1.172	Tue Aug 10 14:28:55 2004
+++ loncom/interface/lonparmset.pm	Tue Aug 17 16:27:04 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.172 2004/08/10 18:28:55 albertel Exp $
+# $Id: lonparmset.pm,v 1.173 2004/08/17 20:27:04 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -585,8 +585,8 @@
 	    my $resid=$2;
 	    my $id=$mapid.'.'.$resid;
 	    my $srcf=$$bighash{$_};
-#	    if ($srcf=~/\.(problem|exam|quiz|assess|survey|form)$/) {
 	    if (1) {
+		$srcf=~/\.(\w+)$/;
 		$$ids[$#$ids+1]=$id;
 		$$typep{$id}=$1;
 		$$keyp{$id}='';
@@ -595,6 +595,10 @@
                     my $key=$_;
                     my $allkey=$1;
                     $allkey=~s/\_/\./g;
+		    if (&Apache::lonnet::metadata($srcf,$key.'.hidden') eq 
+			'parm') {
+			next; #hide hidden things
+		    }
                     my $display= &Apache::lonnet::metadata($srcf,$key.'.display');
                     my $name=&Apache::lonnet::metadata($srcf,$key.'.name');
                     my $part= &Apache::lonnet::metadata($srcf,$key.'.part');