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

raeburn raeburn at source.lon-capa.org
Wed Aug 26 17:50:16 EDT 2020


raeburn		Wed Aug 26 21:50:16 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface/statistics	lonstathelpers.pm 
  Log:
  - For 2.11
    Remove changes from rev. 1.75 -- LTI Consumer support not included. 
  
  
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.76 loncom/interface/statistics/lonstathelpers.pm:1.76.2.1
--- loncom/interface/statistics/lonstathelpers.pm:1.76	Wed Aug 26 18:13:39 2020
+++ loncom/interface/statistics/lonstathelpers.pm	Wed Aug 26 21:50:16 2020
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.76 2020/08/26 18:13:39 raeburn Exp $
+# $Id: lonstathelpers.pm,v 1.76.2.1 2020/08/26 21:50:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -108,17 +108,10 @@
 ####################################################
 ####################################################
 sub get_resources {
-    my ($navmap,$sequence,$include_tools) = @_;
-    my @resources;
-    if ($include_tools) {
-        @resources = $navmap->retrieveResources($sequence,
-                                                sub { shift->is_gradable(); },
-                                                0,0,0);
-    } else {
-        @resources = $navmap->retrieveResources($sequence,
-                                                sub { shift->is_problem(); },
-                                                0,0,0);
-    }
+    my ($navmap,$sequence) = @_;
+    my @resources = $navmap->retrieveResources($sequence,
+                                               sub { shift->is_problem(); },
+                                               0,0,0);
     return @resources;
 }
 
@@ -165,7 +158,7 @@
     return $navmap if (! ref($navmap)); # error
     foreach my $seq (@sequences) {
         my $seq_str = '';
-        foreach my $res (&get_resources($navmap,$seq,$include_tools)) {
+        foreach my $res (&get_resources($navmap,$seq)) {
             my $title = $res->compTitle;
             if (! defined($title) || $title eq '') {
                 ($title) = ($res->src =~ m:/([^/]*)$:);
@@ -190,14 +183,8 @@
             }
             my %partsseen;
             foreach my $part (@{$res->parts}) {
-                my (@response_ids, at response_types);
-                if ($res->is_tool) {
-                    @response_ids = ();
-                    @response_types = ('tool');
-                } else {
-                    @response_ids   = $res->responseIds($part);
-                    @response_types = $res->responseType($part);
-                }
+                my @response_ids   = $res->responseIds($part);
+                my @response_types = $res->responseType($part);
                 for (my $i=0;$i<scalar(@response_types);$i++){
                     my $respid = $response_ids[$i];
                     my $resptype = $response_types[$i];




More information about the LON-CAPA-cvs mailing list