[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface/statistics lonstathelpers.pm

raeburn raeburn at source.lon-capa.org
Sat Sep 12 16:36:11 EDT 2020


raeburn		Sat Sep 12 20:36:11 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface/statistics	lonstathelpers.pm 
  Log:
  - For 2.11
    Backport 1.79
  
  
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.76.2.3 loncom/interface/statistics/lonstathelpers.pm:1.76.2.4
--- loncom/interface/statistics/lonstathelpers.pm:1.76.2.3	Mon Sep  7 02:58:25 2020
+++ loncom/interface/statistics/lonstathelpers.pm	Sat Sep 12 20:36:11 2020
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.76.2.3 2020/09/07 02:58:25 raeburn Exp $
+# $Id: lonstathelpers.pm,v 1.76.2.4 2020/09/12 20:36:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -249,8 +249,8 @@
                             $seq_str .= (' 'x2).
                                         '<a target="preview" href="'.$link.'">'.&mt('view').'</a>';
                             $seq_str .= "</td>". &Apache::loncommon::end_data_table_row()."\n";
-                            $rb_count++;
                         }
+                        $rb_count++;
                     }
                 }
             }
@@ -277,6 +277,15 @@
         }
     }
     $Str .= &Apache::loncommon::end_data_table().&Apache::loncommon::end_scrollbox()."\n";
+    if (!$rb_count) {
+        if ($byres) {
+            $Str = '<p class="LC_info">'.&mt('No gradable problems found').'</p>';
+        } elsif ($AcceptedResponseTypes eq '.') {
+            $Str = '<p class="LC_info">'.&mt('No problems found').'</p>';
+        } else {
+            $Str = '<p class="LC_info">'.&mt('No analyzable problems found').'</p>';
+        }
+    }
     return $Str;
 }
 




More information about the LON-CAPA-cvs mailing list