Log Message:
-----------
fix error in defining $attempts
Tags:
----
rel-2-4-patches
Modified Files:
--------------
pg/macros:
PGbasicmacros.pl
Revision Data
-------------
Index: PGbasicmacros.pl
===================================================================
RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v
retrieving revision 1.47.2.2.2.5
retrieving revision 1.47.2.2.2.6
diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.47.2.2.2.5 -r1.47.2.2.2.6
--- macros/PGbasicmacros.pl
+++ macros/PGbasicmacros.pl
@@ -1003,7 +1003,8 @@
my $showHint = PG_restricted_eval(q!$main::showHint!);
my $displayHint = PG_restricted_eval(q!$envir->{'displayHintsQ'}!);
PG_restricted_eval(q!$main::hintExists =1!);
- my $attempts = PG_restricted_eval(q!$main::numOfAttempts = 0 unless defined($main::numOfAttempts);!);
+ PG_restricted_eval(q!$main::numOfAttempts = 0 unless defined($main::numOfAttempts);!);
+ my $attempts = PG_restricted_eval(q!$main::numOfAttempts!);
if ($displayMode eq 'TeX') {
if ($printHintForInstructor) {
@@ -1023,26 +1024,6 @@
$out ;
}
-# sub hint {
-# my @in = @_;
-# my $out = '';
-#
-# PG_restricted_eval(q!$main::hintExists =1;
-# $main::numOfAttempts = 0 unless defined($main::numOfAttempts);
-# !);
-#
-# if ($displayMode eq 'TeX') {
-# $out = ''; # do nothing since hints are not available for download
-# } elsif (($envir->{'displayHintsQ'}) and
-# PG_restricted_eval(q!($main::numOfAttempts >= $main::showHint)!))
-#
-# ## the second test above prevents a hint being shown if a doctored form is submitted
-#
-# {$out = join(' ',@in);} # show hint
-#
-# $out ;
-# }
-
sub HINT {
TEXT("$BR" . hint(@_) . "$BR") if hint(@_);
|