+
+The answerable method differs from the completable method in its handling of problem parts
+for which feedback on correctness is suppressed, but the student still has tries left, and
+the problem part is not past due, (i.e., the student could submit a different answer if
+he/she so chose). For that case completable will return 0, whereas answerable will return 1.
+
+=cut
+
+sub answerable {
+ my $self = shift;
+ if (!$self->is_problem()) { return 0; }
+ my $partCount = $self->countParts();
+ foreach my $part (@{$self->parts()}) {
+ if ($part eq '0' && $partCount != 1) { next; }
+ my $status = $self->status($part);
+ if ($self->getCompletionStatus($part) == ATTEMPTED() ||
+ $self->getCompletionStatus($part) == CREDIT_ATTEMPTED() ||
+ $status == ANSWER_SUBMITTED() ) {
+ if ($self->tries($part) < $self->maxtries($part) || !$self->maxtries($part)) {
+ return 1;
+ }
+ }
+ if ($status == OPEN() || $status == TRIES_LEFT() || $status == NETWORK_FAILURE()) {
+ return 1;
+ }
+ }
+ # None of the parts were answerable, so neither is this problem.
+ return 0;
+}
+
+=pod
+
=head2 Resource/Nav Map Navigation
=over 4
@@ -5657,12 +5861,14 @@ sub getPrevious {
sub browsePriv {
my $self = shift;
+ my $noblockcheck = shift;
if (defined($self->{BROWSE_PRIV})) {
return $self->{BROWSE_PRIV};
}
$self->{BROWSE_PRIV} = &Apache::lonnet::allowed('bre',$self->src(),
- $self->symb());
+ $self->{SYMB},undef,
+ undef,$noblockcheck);
}
=pod
500 Internal Server Error
Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator at
root@localhost to inform them of the time this error occurred,
and the actions you performed just before this error.
More information about this error may be available
in the server error log.