Replies: 2 comments 6 replies
-
Yes it would be easy to implement. But I have to think about adding a configuration for enable / disable shuffle feature for notes because some decks have questions that come in order. Like this: A. Option 1 If we shuffle all quetions then "2 options above" will have a chance to be in the first and will cause confusion. |
Beta Was this translation helpful? Give feedback.
5 replies
-
I've implemeted the feature on #54. Please try it out! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am wondering whether you do not shuffle the options of multiple choice questions on purpose.
I have never used elixir yet. But as far as I understand the concept in order to shuffle it should be sufficient to add.
note.options = Enum.shuffle note.options
in memoet/lib/memoet_web/controllers/note_controller.ex
most probably in this part
@SPEC show(Plug.Conn.t(), map) :: Plug.Conn.t()
def show(conn, %{"id" => id, "deck_id" => deck_id}) do
user = Pow.Plug.current_user(conn)
deck = Decks.get_deck!(deck_id)
note = Notes.get_note!(id)
++++ SHOULD BE ADDED HERE?! ++++
note.options = Enum.shuffle note.options
++++ SHOULD BE ADDED HERE?! ++++
if note.user_id != user.id do
Am I right with that assumption? If so, would you accept that change?
Beta Was this translation helpful? Give feedback.
All reactions