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

raeburn raeburn at source.lon-capa.org
Wed Jun 1 21:43:46 EDT 2016


raeburn		Thu Jun  2 01:43:46 2016 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - Bug 6763. 
    - For single part problems, explicitly include part id when determining if 
      tries have been made.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.449 loncom/interface/lonmenu.pm:1.450
--- loncom/interface/lonmenu.pm:1.449	Mon May 23 17:38:55 2016
+++ loncom/interface/lonmenu.pm	Thu Jun  2 01:43:46 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.449 2016/05/23 17:38:55 raeburn Exp $
+# $Id: lonmenu.pm,v 1.450 2016/06/02 01:43:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1650,10 +1650,8 @@
                  nokey    => 'A proctor key is required', 
     );
     my $navmap = Apache::lonnavmaps::navmap->new(); 
-    my ($missing,$tried);
+    my ($missing,$tried) = (0,0);
     if (ref($navmap)) {
-        $missing=0;
-        $tried=0;
         my @resources=();
         if ($type eq 'map') {
             my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($env{'request.symb'});
@@ -1667,13 +1665,7 @@
             }
         }
         foreach my $res (@resources) {
-            if ($res->singlepart()) {
-                if (!$res->tries()) {
-                    $missing++;
-                } else {
-                    $tried++;
-                }
-            } else {
+            if (ref($res->parts()) eq 'ARRAY') {
                 foreach my $part (@{$res->parts()}) {
                     if (!$res->tries($part)) {
                         $missing++;




More information about the LON-CAPA-cvs mailing list