Only Multiple Choice?
-
Call me slow, but I just figured out that this plugin only supports multiple choice.
That is just too limiting for my purposes.
Do you ever plan to support a “type in the answer” mode?
-
@mirgcire- The quiz is set up to allow multiple choice in the form of checkboxes and radio buttons. Checkboxes are used if there are more than one correct answer and radio buttons are used if there is only one correct answer.
I’ve thought about fill-in-the-blank type questions a great deal in the past and unfortunately, I don’t plan on adding that sort of functionality to the quiz.
The reason being that the answer validation functionality would have to be much more robust, accounting for many variations of the response. Capitalization (north vs. North), localization (color vs. colour), spacing (DeLong vs. De Long), etc.
It’s generally been my opinion that most simple fill-in-the-blank type questions would work just as well as multiple choice, if not better.
I will give you an example where fill in the blank is better than multiple choice.
I teach Mandarin Chinese. I will make recordings and ask the students to write what they hear. It is a listening exercise. With multiple choice it will be very easy to guess the correct one. But fill-in-the-blank will place more of a demand on listening skills, and hence be of more value.
One way you could avoid worrying about all the possible variations is to do a character by character compare .. and provide an action hook to allow the integrator to add in additional logic if needed.
I love the simplicity of this plugin, and creating additional hooks would be in keeping with its character.
The hook is a good idea. I’ll make a todo and think about this more. I can’t guarantee any near-future change though. Thanks for all your feedback!
Hi Julie,
Is there any chance I can pay you to make these changes? Or get some suggestions from you about how to make the changes my self?
It seems relatively straight forward. The admin panel would only need one tweak, to indicate if it is fill-in-the-blank or multiple-choice. The test of correctness would be a character by character comparison between the takers answer and the “correct” answers.
Thanks!
@mirgcire I do not have the bandwidth to take on any side projects right now.
It seems like you have an idea of how to approach the problem. You’d need to modify
admin.js
to include a checkbox on each question that would store the FITB setting. You’d need to modifyslickquiz-front.php
orslickquiz.js
to render the input instead of checkboxes. And you’d need to modifyslickquiz.js
to do the answer comparison.I took your suggestion and started deciphering the plugin. As a first step I successfully added support for resolving shortcodes in the the question. Now I am trying to figure out how to replace the choices with an input field.
The file slickquiz.js is puzzling me. Clearly I am a novice, and answering this type of question beyond the scope of “support”, but I have been checking online and printed resources and I just can’t seem to wrap my head around this …
(function($){ $.slickQuiz = function(element, options) {}; $.fn.slickQuiz = function(options) {}; })(jQuery);
There are three syntax patterns here that I don’t understand:
1: ( ) (jQuery);
2: function ($) { }
3: $.name = function () {};Any clues would be greatly appreciated
Okay … it looks like someone answered numbers 1 and 2 here on stackoverflow.com. Although I am still not sure why it is necessary to alias the dollar sign. Maybe the answer to that is in the use of $ in number 3.
Is this the case of $ being used as a variable name?
I finally used “jquery dollar dot in function name” on google and found this stackoverflow.com post.
Apparently, $.name adds a property to the $ functor, but I am still in the dark as to why anyone would want to add a property to $, but maybe it will make sense later.
@mirgcire Sorry for not getting back to you sooner. Honestly, you probably won’t have to worry about that portion of the quiz plugin to make the changes that you want. You’d need to focus more on the internal methods that generate the quiz content for the page.
Agree. It seems like these are some advanced tricks for creating class objects in a language that does not support classes.
I did manage to surgically add about 30 lines of code to achieve two effects.
1) Added shortcode expansion to the questions.
2) Allow for free text answers in addition to multiple choice.The second involved
– Adding an option for free text on each question in admin window
– Adding HTML logic to display a text input window when free text option is selected.
– Adding Compare text functions, optimized for pinyin, a phonetic representation of Mandarin.BTW, I really appreciate the super clean coding. Except for the fact that it is written in javascript it is logically laid out and easy to follow.
It seems to me that my changes could be dovetailed in with some well thought out hooks. Maybe one hook for each of the three steps mentioned above.
Thanks!
@mirgcire Glad to hear you got it working! If you’re interested in sharing you code modifications, I might be able to use them to add these features for other users.
Feel free to submit a pull request or create an issue here: https://github.com/jewlofthelotus/SlickQuiz-WordPress
- The topic ‘Only Multiple Choice?’ is closed to new replies.