[ww-bugs] Bug 3302: New: custom answer checker

bugzilla-daemon at webwork.maa.org bugzilla-daemon at webwork.maa.org
Sat Jan 24 17:11:44 EST 2015


http://bugs.webwork.maa.org/show_bug.cgi?id=3302

           Summary: custom answer checker
           Product: Problem libraries
           Version: unspecified
          Platform: PC
               URL: [TMPL]/Library/MiamiUOhio/DiffEq/Definitions_and_Termi
                    nology/Problem04.pg_with_problemSeed=211
        OS/Version: Mac OS
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Library (OPL)
        AssignedTo: jj at asu.edu
        ReportedBy: abalogh at utpa.edu
        Web browser Chrome
           version:


This, and most other problems in the directory
MiamiUOhio/DiffEq/Definitions_and_Terminology
have custom answer checker  with  line  if ( ($numOfAttempts < 1 ...
Since after the first submission $numOfAttempts =1, this results in never
accepting the correct answer.

foreach my $i (0..1) {
ANS( $answer[$i]->cmp(
  checker=>sub {
    my ( $correct, $student, $ansHash ) = @_;
    if ( ($numOfAttempts < 1) && ($correct == $student) ) { 
       return 1; 
    } elsif ( ($numOfAttempts > 0) && ($correct == $student) ) {
       Value->Error("Your answer is correct, but your score did not change
since you used up the attempts allowed."); 
    } else {
       return 0;
    };
  }
));

-- 
Configure bugmail: http://bugs.webwork.maa.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the webwork-bugs mailing list