[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstathelpers.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Thu, 16 Sep 2004 14:28:19 -0000
matthew Thu Sep 16 10:28:19 2004 EDT
Modified files:
/loncom/interface/statistics lonstathelpers.pm
Log:
Modified &analyze_problem_as_student to deal with navmaps resource objects
in addition to the current support for the statistics object hash.
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.21 loncom/interface/statistics/lonstathelpers.pm:1.22
--- loncom/interface/statistics/lonstathelpers.pm:1.21 Wed Sep 15 17:07:34 2004
+++ loncom/interface/statistics/lonstathelpers.pm Thu Sep 16 10:28:19 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstathelpers.pm,v 1.21 2004/09/15 21:07:34 matthew Exp $
+# $Id: lonstathelpers.pm,v 1.22 2004/09/16 14:28:19 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -602,6 +602,16 @@
#####################################################
sub analyze_problem_as_student {
my ($resource,$sname,$sdom,$partid,$respid) = @_;
+ if (ref($resource) ne 'HASH') {
+ my $res = $resource;
+ $resource = { 'src' => $res->src,
+ 'symb' => $res->symb,
+ 'parts' => $res->parts };
+ foreach my $part (@{$resource->{'parts'}}) {
+ $resource->{'partdata'}->{$part}->{'ResponseIds'}=
+ [$res->responseIds($part)];
+ }
+ }
my $returnvalue;
my $url = $resource->{'src'};
my $symb = $resource->{'symb'};