[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm lonnavmaps.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Tue, 15 Jun 2004 14:12:57 -0000
matthew Tue Jun 15 10:12:57 2004 EDT
Modified files:
/loncom/interface loncoursedata.pm lonnavmaps.pm
Log:
lonnavmaps: Added is_survey method
loncoursedata: get_sequence_assessment_data: checks for surveys.
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.134 loncom/interface/loncoursedata.pm:1.135
--- loncom/interface/loncoursedata.pm:1.134 Fri Jun 4 13:46:10 2004
+++ loncom/interface/loncoursedata.pm Tue Jun 15 10:12:56 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursedata.pm,v 1.134 2004/06/04 17:46:10 matthew Exp $
+# $Id: loncoursedata.pm,v 1.135 2004/06/15 14:12:56 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -199,6 +199,7 @@
my @Ids = $curRes->responseIds($part);
$partdata{$part}->{'ResponseTypes'}= \@Responses;
$partdata{$part}->{'ResponseIds'} = \@Ids;
+ $partdata{$part}->{'Survey'} = $curRes->is_survey($part);
# Count how many responses of each type there are in this part
foreach (@Responses) {
$partdata{$part}->{$_}++;
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.260 loncom/interface/lonnavmaps.pm:1.261
--- loncom/interface/lonnavmaps.pm:1.260 Thu May 27 18:25:14 2004
+++ loncom/interface/lonnavmaps.pm Tue Jun 15 10:12:56 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.260 2004/05/27 22:25:14 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.261 2004/06/15 14:12:56 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3241,6 +3241,17 @@
return $self->navHash("is_map_", 1) &&
$self->navHash("map_type_" . $self->map_pc()) eq 'sequence';
}
+sub is_survey {
+ my $self = shift();
+ my $part = shift();
+ if ($self->src() =~ /\.(survey)$/) {
+ return 1;
+ }
+ if ($self->parmval('type',$part) eq 'survey') {
+ return 1;
+ }
+ return 0;
+}
# Private method: Shells out to the parmval in the nav map, handler parts.
sub parmval {