Skip to content

Comments

Fix backward truefalse arguments in example.rb#4

Open
bjnord wants to merge 2 commits intosaasbook:masterfrom
bjnord:master
Open

Fix backward truefalse arguments in example.rb#4
bjnord wants to merge 2 commits intosaasbook:masterfrom
bjnord:master

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.

bjnord added 2 commits May 18, 2012 06:43
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