[LON-CAPA-cvs] cvs: rat / lonuserstate.pm loncom/publisher packages.tab

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 06 May 2005 19:11:50 -0000


albertel		Fri May  6 15:11:50 2005 EDT

  Modified files:              
    /loncom/publisher	packages.tab 
    /rat	lonuserstate.pm 
  Log:
  - can now modify the sequence resource parameters in PARM
  
  - setting hiddenresource to no, makes sure the resource is not hidden by
      making sure the resource is not in the hidden hash
  
  
Index: loncom/publisher/packages.tab
diff -u loncom/publisher/packages.tab:1.42 loncom/publisher/packages.tab:1.43
--- loncom/publisher/packages.tab:1.42	Fri Apr  1 13:08:14 2005
+++ loncom/publisher/packages.tab	Fri May  6 15:11:49 2005
@@ -76,13 +76,14 @@
 
 
 #parameters for things by extension
-
+extension_sequence&encrypturl&type:string_yesno
+extension_sequence&encrypturl&display:Do not show plain URL
+extension_sequence&hiddenresource&display:Resource Hidden from Students
+extension_sequence&hiddenresource&type:string_yesno
 extension_sequence&randompick&type:int_pos
-extension_sequence&randompick&hidden:parm
+#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
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.90 rat/lonuserstate.pm:1.91
--- rat/lonuserstate.pm:1.90	Thu May  5 16:43:28 2005
+++ rat/lonuserstate.pm	Fri May  6 15:11:49 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construct and maintain state and binary representation of course for user
 #
-# $Id: lonuserstate.pm,v 1.90 2005/05/05 20:43:28 albertel Exp $
+# $Id: lonuserstate.pm,v 1.91 2005/05/06 19:11:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -338,13 +338,14 @@
 	my ($mapid,$resid)=split(/\./,$rid);
 	my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},$resid,$hash{'src_'.$rid});
 	my $hidden=&Apache::lonnet::EXT('resource.0.hiddenresource',$symb);
+
 	if ($hdnflag || lc($hidden) eq 'yes') {
 	    $hiddenurl{$rid}=1;
-	} else {
-	    # shouldn't be hidden, but might have had a parm set on it
-            # saying to
+	}
+	if (!$hdnflag && lc($hidden) eq 'no') {
 	    delete($hiddenurl{$rid});
 	}
+
 	my $encrypt=&Apache::lonnet::EXT('resource.0.encrypturl',$symb);
 	if ($encflag || lc($encrypt) eq 'yes') { $encurl{$rid}=1; }
 	if (($retfurl eq '') && ($hash{'src_'.$rid})