• Hello again Dylan,

    I’m trying to create a “very simple” template and I believe I made it πŸ™‚
    This template will be like a “page to print”. To get the right settings, I used “WP Pagination”. And I read : “Please note that randomizing the questions is NOT possible if the below WP Pagination feature is being used”.
    But I’d like to randomize question order AND answer order.
    It’s not for a public use, it’s just for me (with a given browser, a unique (secret) website and a stable conditions).
    I know you are a wizard. So, is it possible to get anyway the 3 options (Randomize question order, randomize answer order, and display a given number of questions on the page)?
    I can modify the code of the plugin if you know a trick to make the impossible possible πŸ™‚ And like it’s on a “private” website, no one will know and no one will complain…

    The only solution I see (as a non-developer) is to “randomize” the order of questions in the csv file before uploading it. But it’s not very elegant.
    My goal is to create pdf files to create ebooks with for example 10 random questions per page.

    I found plugins that allow to create ebooks (pdf), I’m not blocked by that πŸ™‚

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Harmonic Design

    (@harmonic_design)

    Sory Michel, but this is not possible BECAUSE random means random.

    Since WP Pagination literally loads a brand new page, WordPress randomly grabs items from the query (in our case, questions). This means that, for example, if you have 10 questions, you could end up getting the same question more than once (in fact, it’s likely that this will happen!). There is no consistent way to ensure that when WordPress grabs the next list of questions it excludes questions that have already appeared. In order the ensure that each question is unique, we need to load all of the questions on the same page.

    I’m not sure why you need to use WP Pagination to begin with (I’m guessing your PDF creator works better with this?), but I do have an idea that might work for your specific usecase.

    So what do we know? We know that you can not use true random and WP Pagination. But we can reorder the questions ourselves (as you know with your CSV idea). But we can extend this in two ways.

    Idea 1: You can randomly reorder the questions from the Quiz page. Just drag-n-drop baby! Depending on how many questions you have, this could be tedious though and wouldn’t be truly “random”. But it’s easy and quick.

    Idea 2: The default order uses a parameter called menu_order which essentially assigns an integer to each question. The quiz then prints out the questions by order of this integer, lowest to highest. By default, the order will be 1,2,3,4,5,6 etc, but MAYBE we can come up with a clever function to randomize this order, so something like 2,5,1,3,7,5 etc. By manupulating this, it’s kind of like automating your CSV export.

    Thread Starter Michel

    (@michel92)

    Thanks a lot for you detailed answer Dylan.
    In the test file, I had more than 700 questions. So, I’ll think about your solutions, maybe by splitting large files into several small ones.
    Maybe the best way to create quality ebooks is to sort question by question, by level, to create a varied and attractive choice for players (primary school level). It’s like for food. Industrial machines can pick, roughly sort and can vegetables. But in luxury boutiques, you find goods sorted by hand. And I want quality, not junk.
    You always find original solutions…

    Thread Starter Michel

    (@michel92)

    I believe the best thing to choose “random” questions is to create fake random lists of questions by hand.

    A good random algorithm could propose 3 quasi similar questions in a row, ou too many simple (or hard) questions on the same page. For example, 1+2, 1+3, 1+5 in a row with a true random choice.
    When you sort questions by hand, you can create a fake random choice, more adapted to the humain brain, by mixing up the questions to “stimulate” the brain of the player. For example, 1+5, 7+2, 3+4 in a row.

    It’s the same thing with 8×8 squares filled with 32 black and 32 white areas. The true random square looks strange (with large black areas for example, or aligned black lines), and the fake randomly filled square looks more “random” to the human brain (better mixed).

    So, I’ll think again… to do a good work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The impossible is always possible ;)’ is closed to new replies.