[LON-CAPA-cvs] cvs: rat / lonuserstate.pm loncom/interface lonparmset.pm loncom/lonnet/perl lonnet.pm

www lon-capa-cvs@mail.lon-capa.org
Wed, 29 Jun 2005 11:57:19 -0000


www		Wed Jun 29 07:57:19 2005 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
    /loncom/lonnet/perl	lonnet.pm 
    /rat	lonuserstate.pm 
  Log:
  parmset shows correct part numbers in descriptions
  pprm has "show all" button
  versioning works again
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.237 loncom/interface/lonparmset.pm:1.238
--- loncom/interface/lonparmset.pm:1.237	Tue Jun 28 12:28:16 2005
+++ loncom/interface/lonparmset.pm	Wed Jun 29 07:57:17 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.237 2005/06/28 16:28:16 albertel Exp $
+# $Id: lonparmset.pm,v 1.238 2005/06/29 11:57:17 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1330,7 +1330,9 @@
     } else {
         my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb);
         $r->print(&mt('Specific Resource').": ".$resource.
-                  '<input type="hidden" value="'.$pssymb.'" name="symb"><br />');
+                  '<input type="hidden" value="'.$pssymb.'" name="symb">'.
+		  '<br /><label><b>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'.
+		  ($env{'form.psprt'}?' checked="checked"':'').' /></b></label><br />');
     }
     &usermenu($r,$uname,$id,$udom,$csec);    
 
@@ -1475,12 +1477,7 @@
 
                         $r->print('<td bgcolor='.$defbgone.
                                       ' rowspan='.$totalparms.
-                                      '><tt><font size=-1>');
-
-                        $r->print(' / res / ');
-                        $r->print(join(' / ', split(/\//,$mapp{$rid})));
-
-                        $r->print('</font></tt></td>');
+                                      '>'.$maptitles{$mapp{$rid}}.'</td>');
 
                         foreach (&keysinorder_bytype(\%name,\%keyorder)) {
                             unless ($firstrow) {
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.643 loncom/lonnet/perl/lonnet.pm:1.644
--- loncom/lonnet/perl/lonnet.pm:1.643	Sat Jun 18 20:41:33 2005
+++ loncom/lonnet/perl/lonnet.pm	Wed Jun 29 07:57:17 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.643 2005/06/19 00:41:33 www Exp $
+# $Id: lonnet.pm,v 1.644 2005/06/29 11:57:17 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4885,7 +4885,7 @@
 					   '.type'};
       my $olddis=$$metacache{':parameter_'.$allnames{$name}.'_'.$name.
 			     '.display'};
-      my $expr='\\[Part: '.$allnames{$name}.'\\]';
+      my $expr='[Part: '.$allnames{$name}.']';
       $olddis=~s/\Q$expr\E/\[Part: 0\]/;
       $$metacache{"$key.display"}=$olddis;
     }
@@ -4990,7 +4990,7 @@
         if ($ids) {
 # ------------------------------------------------------------------- Has ID(s)
 	    foreach (split(/\,/,$ids)) {
-               my ($mapid,$resid)=split(/\./,$_);
+	       my ($mapid,$resid)=split(/\./,$_);
                if (
   &symbclean(&declutter($bighash{'map_id_'.$mapid}).'___'.$resid.'___'.$thisfn)
    eq $symb) { 
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.92 rat/lonuserstate.pm:1.93
--- rat/lonuserstate.pm:1.92	Wed Jun  8 14:49:38 2005
+++ rat/lonuserstate.pm	Wed Jun 29 07:57:17 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.92 2005/06/08 18:49:38 www Exp $
+# $Id: lonuserstate.pm,v 1.93 2005/06/29 11:57:17 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -73,6 +73,7 @@
 
 sub putinversion {
     my $uri=shift;
+    my $key=$env{'request.course.id'}.'_'.&Apache::lonnet::clutter($uri);
     if ($hash{'version_'.$uri}) {
 	my $version=$hash{'version_'.$uri};
 	if ($version eq 'mostrecent') { return $uri; }
@@ -81,6 +82,7 @@
 	             { return $uri; }
 	$uri=~s/\.(\w+)$/\.$version\.$1/;
     }
+    &Apache::lonnet::do_cache_new('courseresversion',$key,&Apache::lonnet::declutter($uri),600);
     return $uri;
 }