version 1.17, 2004/06/25 21:02:41
|
version 1.20, 2004/08/25 17:23:06
|
Line 126 sub ProblemSelector {
|
Line 126 sub ProblemSelector {
|
next if ($res->{'type'} ne 'assessment'); |
next if ($res->{'type'} ne 'assessment'); |
foreach my $part (@{$res->{'parts'}}) { |
foreach my $part (@{$res->{'parts'}}) { |
my $partdata = $res->{'partdata'}->{$part}; |
my $partdata = $res->{'partdata'}->{$part}; |
next if ($partdata->{'Survey'}); |
|
for (my $i=0;$i<scalar(@{$partdata->{'ResponseTypes'}});$i++){ |
for (my $i=0;$i<scalar(@{$partdata->{'ResponseTypes'}});$i++){ |
my $respid = $partdata->{'ResponseIds'}->[$i]; |
my $respid = $partdata->{'ResponseIds'}->[$i]; |
my $resptype = $partdata->{'ResponseTypes'}->[$i]; |
my $resptype = $partdata->{'ResponseTypes'}->[$i]; |
Line 262 sub get_prev_curr_next {
|
Line 261 sub get_prev_curr_next {
|
next if ($res->{'type'} ne 'assessment'); |
next if ($res->{'type'} ne 'assessment'); |
foreach my $part (@{$res->{'parts'}}) { |
foreach my $part (@{$res->{'parts'}}) { |
my $partdata = $res->{'partdata'}->{$part}; |
my $partdata = $res->{'partdata'}->{$part}; |
if ($partdata->{'Survey'}) { |
if ($partdata->{'Survey'} && ($granularity eq 'part_survey')){ |
if ($granularity eq 'part_survey'){ |
push (@Resource, |
push (@Resource, |
{ symb => $res->{symb}, |
{ symb => $res->{symb}, |
part => $part, |
part => $part, |
resource => $res, |
resource => $res, |
} ); |
} ); |
|
} |
|
} elsif ($granularity eq 'part') { |
} elsif ($granularity eq 'part') { |
push (@Resource, |
push (@Resource, |
{ symb => $res->{symb}, |
{ symb => $res->{symb}, |
Line 639 sub ensure_proper_cache {
|
Line 636 sub ensure_proper_cache {
|
my ($symb) = @_; |
my ($symb) = @_; |
my $cid = $ENV{'request.course.id'}; |
my $cid = $ENV{'request.course.id'}; |
my $new_filename = '/home/httpd/perl/tmp/'. |
my $new_filename = '/home/httpd/perl/tmp/'. |
'problemanalsysis_'.$cid.'answer_cache.db'; |
'problemanalysis_'.$cid.'_answer_cache.db'; |
if (! defined($cache_filename) || |
if (! defined($cache_filename) || |
$cache_filename ne $new_filename || |
$cache_filename ne $new_filename || |
! defined($current_symb) || |
! defined($current_symb) || |