GithubHelp home page GithubHelp logo

Comments (4)

Alex-Jordan avatar Alex-Jordan commented on August 20, 2024

What I described is in 2.18.

I just checked devleop, and the graying out issue is not an issue there. However it still does not accept the correct answer selections.

from pg.

drgrice1 avatar drgrice1 commented on August 20, 2024

Checkboxes are supposed to work as a part answer. I will look at it.

from pg.

drgrice1 avatar drgrice1 commented on August 20, 2024

The issue with the checkboxes not graying out correctly was fixed in #930.

It turns out I also knew about the other issue, but I forgot about it. I also don't know how to fix it so that the following workaround is not needed. What you need to do is add checkTypes => 0 to the RadioMultiAnswer object. So that would be

$rma = RadioMultiAnswer(
	[
		['\(H\) is a subspace.'],
		[ '\(H\) is not a subspace because (check all that apply): %s', $checks ] ],
	1,
	checkTypes => 0,
	labels     => [ 'Yes', 'No' ]
);

Note that this is only needed when a CheckboxList is used as a part answer, and the CheckboxList only has one correct answer. The checkTypes => 0 option is not needed if there are more than one correct answer. (Also note that you don't need to use with to add options to a RadioMultiAnswer.)

Also note that the same thing is true for a CheckboxList part answer of a MutliAnswer object from the parserMultiAnswer.pl macro. There you have to provide a custom checker, but the checker doesn't even get a chance to check the answers unless you set checkTypes => 0 when a CheckboxList has only one correct answer.

The issue is that the correct answer always has type "List". A student answer is of type "String" in the case that only one checkbox is checked, but is also of type "List" if multiple checkboxes are checked.

from pg.

pstaabp avatar pstaabp commented on August 20, 2024

Fixed in #1011

from pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.