-
Notifications
You must be signed in to change notification settings - Fork 98
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
Feature: Allow shuffling of answer options | Sort options #1271
Conversation
1f4dd39
to
1727167
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1271 +/- ##
============================================
+ Coverage 36.83% 36.84% +0.01%
- Complexity 507 512 +5
============================================
Files 47 48 +1
Lines 1960 1973 +13
============================================
+ Hits 722 727 +5
- Misses 1238 1246 +8 |
dd5d2ba
to
ba32e89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fine, i think 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
64cbafb
to
f68b582
Compare
Oh yes that happens if there are no settings as the empty array would be serialized as an array instead of an object (assoc. array). This is now fixed. |
Top 👍 |
f68b582
to
226d3d5
Compare
Hm while editing (at least in the editing view) options should not be shuffled (only in the submit view). |
When editing a single question, i'm totally with you. Then they should be ordered.
Do you know |
226d3d5
to
2cd3bc6
Compare
Fixed that. One general thing I noticed: Currently every interaction is debounced, resulting in a slight UI latency. Would it not be smoother to just debounce the request to the server? (As the UI is currently also not checking the request for success, meaning there is no rollback if that request failed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Old Questions are not loaded/shown (i.e. Questions with
ExtraSettingsJson = NULL
) - The way of sorting is quite biased, no? Can we get to a Fisher-Yates here? Should be of same Order, but much more effective.
- Can you please test it on your own properly? Takes also quite much time for me, to do this...
Hmm, i don't think the delay is much of a problem. It is anyways only visible on the two boolean switches and if we fix the actions to be inside of the Editing-Mode, then it even won't be visible that much. (#1329) I also have in mind, that chaning this would also increase the load on the browser due to permanently updating and triggering corresponding reactivities. |
2cd3bc6
to
f3f26e0
Compare
@jotoeri Fixed your comments. Sorry for the inconvenience, I will try to test better. |
f3f26e0
to
217d12a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fine now. 👍
@Chartman123 wanna double-check here? 😉 |
46c95f5
to
ee62a5b
Compare
This introduces an question option to randomize the order of the answer options by using the Fisher-Yates algorithm. Shuffling the order of the answer choices reduces bias in responses. Implements #1067 If no shuffling is enabled the options are sorted in the order they were created, as currently they are shown as returned by the database which is not necessarily sorted. Fixes #1007 Signed-off-by: Ferdinand Thiessen <[email protected]>
ee62a5b
to
641a003
Compare
This introduces an question option to randomize the order of the answer options.
Shuffling the order of the answer choices reduces bias in responses. (#1067)
If no shuffling is enabled the options are sorted in the order they were
created, as currently they are shown as returned by the database which
is not necessarily sorted. (#1007)