WeBWorK Problems

Errors on problem in Gateway Quiz mode but not in Homework mode

Errors on problem in Gateway Quiz mode but not in Homework mode

by Paul Seeburger -
Number of replies: 1
Can anyone give me insight into what I need to change to allow the following problem to work without errors in a Gateway Quiz?  It seems to work fine without errors in Homework mode, marking the problem correct (when the correct answers are entered) and stating the correct answers.

But in Gateway Quiz mode it does not mark the answers as correct or display the correct answers.  It also gives the following errors.  See the actual problem code below this image.

My guess is that it has something to do with the NAMED_ANS_CHECKBOX I used in the problem.  I need a multiselect problem with graphs, and it seemed to work well to accomplish this in Homework mode.  Is there another way I could accomplish this that would work in Gateway Quiz mode?

Thanks!

Paul

Gateway Quiz Undefined_Set,v1

Your score on this (checked, not recorded) submission is 0/1.
The recorded score for this test is 0/1.

Jump to Problem:[ 1 ]

Problem 1.

ANSWERS ONLY CHECKED -- ANSWERS NOT RECORDED

In the diagrams below, the red vector represents a gradient vector of the function f and the blue vector represents a gradient vector of the constraint function g (treated as a function of x and y).

Which of the diagrams shows a point at which a relative extreme value of f might be found, subject to the given constraint? (Select as many as apply.)

277beead-4df2-38d2-93ef-dad735f680c4___bd0ba53f-da75-3cd4-9c85-ec59735cd9d7.gif 277beead-4df2-38d2-93ef-dad735f680c4___0593ef4a-668d-39ac-8e88-4387cbb2b001.gif 277beead-4df2-38d2-93ef-dad735f680c4___9f95bb22-2275-348c-88d8-17ff906f5159.gif
A B C
277beead-4df2-38d2-93ef-dad735f680c4___104d1280-97e6-33f6-9370-27a6b894a1f6.gif 277beead-4df2-38d2-93ef-dad735f680c4___fc4f9adc-7865-31c3-9fd0-c09a65bb1173.gif 277beead-4df2-38d2-93ef-dad735f680c4___20d85ad2-e012-38ab-b150-918bc03ae745.gif
D E F

Note: You can earn partial credit on this problem.

preview answers

EnteredAnswer PreviewCorrectResult
   0% correct
   0% correct


Jump to Problem:[ 1 ]

Show correct answersShow Solutions

 

WeBWorK Warnings

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.

Warning messages

  • Use of uninitialized value $answerScore in numeric gt (>) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 407.
  • Use of uninitialized value $studentAnswer in pattern match (m//) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 409.
  • Use of uninitialized value $answerScore in numeric ge (>=) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 409.
  • Use of uninitialized value $answerScore in numeric ge (>=) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 412.
  • Use of uninitialized value $answerScore in multiplication (*) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 422.
  • Use of uninitialized value $answerScore in numeric gt (>) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 407.
  • Use of uninitialized value $studentAnswer in pattern match (m//) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 409.
  • Use of uninitialized value $answerScore in numeric ge (>=) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 409.
  • Use of uninitialized value $answerScore in numeric ge (>=) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 412.
  • Use of uninitialized value $answerScore in multiplication (*) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm line 422.

Request information

TimeFri Oct 28 08:28:44 2016
MethodPOST
URI/webwork2/Monroe_CC_MTH_212-Seeburger/quiz_mode/Undefined_Set,v1/


My Problem Code:
## DBsubject(Calculus - multivariable)
## DBchapter(Vector calculus)
## DBsection(Optimization)
## Date(10/25/2016)
## Author(Paul Seeburger)
## Institution(Monroe Community College)
##KEYWORDS('')
## TitleText1('')
## EditionText1('')
## AuthorText1('')
## Section1('')
## Problem1('')

DOCUMENT();  

loadMacros(
"PGstandard.pl",
"PGchoicemacros.pl",
"PGunion.pl",
##"PGcourse.pl",
##"answerHints.pl",
);

TEXT(beginproblem());

##  Colors
$bRed = MODES(TeX => '{\\color{red} ', HTML => '<span style="color:red">'); 
$eRed = MODES( TeX => '}', HTML => '</span>'); 
$bBlue = MODES(TeX => '{\\color{red} ', HTML => '<span style="color:blue">'); 
$eBlue = MODES( TeX => '}', HTML => '</span>'); 

############
#    SETUP    #
############
##$mc = new_checkbox_multiple_choice();

$diagrama = Image('imageP1-2a.gif',size=>[200,200],tex_size=>200,tex_center=>1);
$diagramb = Image('imageP1-2b.gif',size=>[200,200],tex_size=>200,tex_center=>1);
$diagramc = Image('imageP1-2c.gif',size=>[200,200],tex_size=>200,tex_center=>1);
$diagramd = Image('imageP1-2d.gif',size=>[200,200],tex_size=>200,tex_center=>1);
$diagrame = Image('imageP1-2e.gif',size=>[200,200],tex_size=>200,tex_center=>1);
$diagramf = Image('imageP1-2f.gif',size=>[200,200],tex_size=>200,tex_center=>1);

##$ans = '';
$ra = NAMED_ANS_CHECKBOX('checks','A','A');
$rb = NAMED_ANS_CHECKBOX_OPTION('checks','B','B');
$rc = NAMED_ANS_CHECKBOX_OPTION('checks','C','C');
$rd = NAMED_ANS_CHECKBOX_OPTION('checks','D','D');
$re = NAMED_ANS_CHECKBOX_OPTION('checks','E','E');
$rf = NAMED_ANS_CHECKBOX_OPTION('checks','F','F');
$ans = 'AEF';

################
#    MAIN BODY    #
################
#Prints Questions and Answers#


    BEGIN_TEXT
In the diagrams below, the $BBOLD$bRed red vector$eRed$EBOLD represents a $BBOLD gradient vector$EBOLD of the function \(f\) and the $BBOLD$bBlue blue vector$eBlue$EBOLD represents a $BBOLD gradient vector$EBOLD of the $BBOLD$bBlue constraint function$eBlue$EBOLD \(g\) (treated as a function of \(x\) and \(y\)). $PAR
Which of the diagrams shows a point at which a relative extreme value of \(f\) might be found, subject to the given constraint? (Select as many as apply.)
    $PAR


    \{
      BeginTable(spacing=>5).
      AlignedRow([$diagrama, $diagramb, $diagramc]).
      AlignedRow([$ra,$rb, $rc]).
      TableSpace(16,8).
      AlignedRow([$diagramd, $diagrame, $diagramf]).
      AlignedRow([$rd,$re, $rf]).
      EndTable()
    \}
    END_TEXT
##    install_problem_grader(~~&std_problem_grader);

    NAMED_ANS(checks => checkbox_cmp($ans));
    $showPartialCorrectAnswers = 1;

ENDDOCUMENT();

In reply to Paul Seeburger

Re: Errors on problem in Gateway Quiz mode but not in Homework mode

by Paul Seeburger -
The error seems definitely connected to the NAMED_ANS_CHECKBOX.  I adjusted the problem to use a regular multi select approach with the options A-F listed off to the left and the labeled graphs shown in a table to the right, and it works now.

It does not make it quite as easy to navigate for students, but at least there is no longer any error.

If anyone knows of a better way for me to do this so the problem can look like it did before (shown in my first post except the checkboxes should show next to the graph's letter) and still work in the Gateway Quiz, I'd really appreciate it!

Thanks!

Paul