-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Added multiple choice feature and several minor scoring bug fixes. #549
base: dev
Are you sure you want to change the base?
Conversation
Fixed facebookarchive#82 (Level Bonus not reset). Fixed facebookarchive#421 (hint points now subtracted only after scoring level). Added facebookarchive#218 (multiple choice option for quizes). As part of facebookarchive#218, added ability to set a "wrong answer penalty" to quizes and flags (required so could not spam multiple choice answers). Enabled bonus and bonus dec to be set initially (fixed half of facebookarchive#19). Updated to pass hh_client (test cases updated to handle new parameters) Recommend a new test-case be added to validate multiple choice functionality.
Fixed facebookarchive#82 (Level Bonus not reset). Fixed facebookarchive#421 (hint points now subtracted only after scoring level). Added facebookarchive#218 (multiple choice option for quizes). As part of facebookarchive#218, added ability to set a "wrong answer penalty" to quizes and flags (required so could not spam multiple choice answers). Enabled bonus and bonus dec to be set initially (fixed half of facebookarchive#19). Updated to pass hh_client (test cases updated to handle new parameters) Recommend a new test-case be added to validate multiple choice functionality.
Fixed facebookarchive#82 (Level Bonus not reset). Fixed facebookarchive#421 (hint points now subtracted only after scoring level). Added facebookarchive#218 (multiple choice option for quizes). As part of facebookarchive#218, added ability to set a "wrong answer penalty" to quizes and flags (required so could not spam multiple choice answers). Enabled bonus and bonus dec to be set initially (fixed half of facebookarchive#19). Updated to pass hh_client (test cases updated to handle new parameters) Recommend a new test-case be added to validate multiple choice functionality.
Updated displayed scoring to include bonus and made users unable to submit an answer again on an already solved level.
Thank you for your contribution! Please rebase this PR to the latest copy of the |
Fixed facebookarchive#82 (Level Bonus not reset). Fixed facebookarchive#421 (hint points now subtracted only after scoring level). Added facebookarchive#218 (multiple choice option for quizes). As part of facebookarchive#218, added ability to set a "wrong answer penalty" to quizes and flags (required so could not spam multiple choice answers). Enabled bonus and bonus dec to be set initially (fixed half of facebookarchive#19). Updated to pass hh_client (test cases updated to handle new parameters) Recommend a new test-case be added to validate multiple choice functionality.
Updated displayed scoring to include bonus and made users unable to submit an answer again on an already solved level.
… add_multiple_choice
Looks like you'll need to update the |
I updated LevelTest.php inside tests/models to reflect the new fields I added in my PR. Do I need to update the phpunit tests somehow else as well? |
I see you made changes to Additionally, if you have specific expectations from a data standpoint in the test database, at the time of the unit test processing, you will need to update |
@archang31 First these Javascript errors need to be resolved. They come up during the grunt process. You can re-run grunt by going to /var/www/fbctf and typing grunt --force after making your code changes (on development). At present the only Javascript errors that should be displayed during the grunt process come up after the run:flow task - we implemented --force on grunt to override these issues which were more or less cosmetic dependency issues that have not affected functionality. However we should fix those in the near future.
|
@archang31 Also make sure you rebase this PR so it has the latest node.js fixes. That will fix the provision issue. |
…hanges made on functions I did not modify like commenting out getCapturedByMarkup and using data in the error function call.
Installed successfully and these changes look pretty good! Obviously this is a large PR and there is plenty more testing to do. As for the extra Javascript code we need to track down where that came from and remove the commented lines altogether or implement them. Here are my current notes:
|
I tested this function. It works fine:)) My suggestion: FBCTF team marge this PR. If changes are needed, other contributor will make another PR on this function. @stevcoll Your note can be moved to open issue. I post this suggetion because it is hard to fix every problems... |
Added multiple choice feature and fixed several other small bugs regarding scoring.
In order to implement multiple choice, we need to add the ability to set a "wrong answer penalty". We also had to add several fields to the levels database to store the multiple choice answers and the question type (multiple choice or short answer). Some of these new fields names many need to be optimized for multiple language support and then added to each supported language.
One issue that still needs to be addressed is submitting a blank answer (either short answer or not checking a multiple choice box). Also, might want to add the bonus score and the original level score to level. I did this initially, but it started to get visually cluttered so removed them (not sure what the best design solution is). With all the possible modifiers (bonus, hint, wrong answer), its hard to know exactly why you received the score you did.