Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backward truefalse arguments in example.rb #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix backward truefalse arguments in example.rb #4

wants to merge 2 commits into from

Conversation

bjnord
Copy link
Contributor

@bjnord bjnord commented May 18, 2012

The two truefalse examples in example.rb have the text and answer arguments backwards.

This might also suggest the need for validation of the answer argument for truefalse questions (should only accept a boolean?); let me know if you would find that helpful and I'll create a patch with code and spec.

1. Replace time_limit (minutes) with duration (seconds), rather than
   maintaining two quantities (since the former can be derived from
   the latter).
2. Make duration available to the HTML5 template as a local variable
   (replace the fixed '30 minutes' in the template with this).
@bjnord
Copy link
Contributor Author

bjnord commented May 18, 2012

Sorry; I learned something today, which is that I should have made branches for these two commits, so they could have been two separate pull requests. :-) I didn't realize it would automatically add the second commit into this pull request.

The second commit changes the code to use duration everywhere, rather than have a separate time_limit option (in minutes) -- since the latter can be derived easily from the former. And then duration is used in the HTML5 template (rather than emitting a fixed "30 minutes").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant