## WeBWorK Problems

### Multiple Choice with Fill in the Blank

by Brittni Lorton -
Number of replies: 7

I tried to find something like this in the forum but I was coming up blank.

Is is possible to have a question be multiple choice (i.e. Raidio or Checkbox ) and ALSO include fill in the blank. Something that would look like:

Determine the solution to the given system of equations.

• The system has one unique solution at ____(student would have to select this one AND fill in the blank of the solution point)
• The system has no solutions
• The system has infinitely many solutions.

Any thoughts?

Thank you,

*Brittni

### Re: Multiple Choice with Fill in the Blank

by Glenn Rice -

Yes it is possible.  It is not easy though.  I have a macro that I use for this that makes it a little easier.  It works much like the multi answer macro, and you have to provide a checker routine.  It takes a little more work to set up the problem as well.  Due to the nature of the structure used the checker is a little more complex.  At some point I plan to add it to the PG macros.

I have attached the macro and an example if you would like to try it out.  There is documentation in the file.  Feel free to ask if you need additional help.

### Re: Multiple Choice with Fill in the Blank

by Glenn Rice -
Here is another example that uses the macro in a simpler way. The format and tex_format options are not required.

I realized that both this example and the previously attached example use the default checker, and to not need to provide one. For some simpler problems this is possible.

### Re: Multiple Choice with Fill in the Blank

by Glenn Rice -

Here is another example that does need a checker routine.

### Re: Multiple Choice with Fill in the Blank

by Brittni Lorton -

This is very helpful! The examples are really helping me understand the concepts, so I appreciate it. I am wondering what would be best for me in terms of including the macro on my server. I do not have server access so I will reach out to our sys admin and see where he puts all the macros and if this one proves to be helpful then I'll have him add it where the other ones are - unless someone has a different suggestion? This will be the first time I've had to use an additional macro not already included so I am unfamiliar with best practices here.

Thank you!

### Re: Multiple Choice with Fill in the Blank

by Paul Seeburger -

Hi, Brittni!

You should be able to add new or adjusted macros to your macros folder in the templates folder for your course.  They will only affect problems in your course this way, but it will allow you to make use of them.

Paul

### Re: Multiple Choice with Fill in the Blank

by Brittni Lorton -

Hi Paul! Yes I am doing that right now but I am thinking of best practices if we want to use this for all of our courses and colleges here, where is the best location for these additional macros? Maybe each school does it a little differently but I was just curious if there was a best practices in terms of where to put these on teh servers so that we dont have to upload them separately to each course.

### Re: Multiple Choice with Fill in the Blank

by Alex Jordan -

You have a lot of options for where you could put a common version of a macro file, assuming you have access to the server side of things.

In localOverrides.conf, you have this line:

$pg{directories}{macrosPath} = [@{$pg{directories}{macrosPath}},"/opt/webwork/courses/developmentCourse/templates/macros"];