Problems with Insert Randomized Lists (multiple choice)

Hi, I tried to install Insert Randomized Lists (multiple choice) on both Mac and Windows using newest Anki 2.1.56 but I got this error.

When loading '<U+2068>Insert Randomized Lists multiple choice<U+2069>':
<U+2068>Traceback (most recent call last):
File "aqt.addons", line 247, in loadAddons
File "/Users/marek/Library/Application Support/Anki2/addons21/1280092568/__init__.py", line 9, in <module>
from . import editor_random_list
File "/Users/marek/Library/Application Support/Anki2/addons21/1280092568/editor_random_list.py", line 81, in <module>
editor._html = editor._html + editor_style
AttributeError: module 'aqt.editor' has no attribute '_html'

Could please anyone of you confirm that they can install the plugin successfully based on the official ReadMe

I followed the guide but maybe I did something wrong.
Thank you for any help!

2 Likes

By the comments, the Randomized Lists (multiple choice) wasn’t working since 2.1.41+

Currently the alternatives are
Multiple Choice Support
Multiple Choice for Anki

1 Like

I had installed “Insert Randomized Lists (multiple choice)” for an earlier version of Anki some time before. I also had the same error as you in the new version. I disabled the plugin, however I discovered that the main functionality of the plugin still works. If you have <ul class="shuffle"> in the HTML code of the card, it gets shuffled even after the plugin was disabled. I believe it works, because the main functionality is in JavaScript and it still there in your note template. Please note that I had installed both “Insert Randomized Lists (multiple choice)” and “Cookie monster” as was described in their README files. To be exact, it fully works in Ankidroid, but partly works in the Desktop version: it gets shuffled in the question but does not so in the answer.

Alternatively the following code can be used for shuffling items in lists without a plugin:

<ul class="shuffle">
    <li>a</li>
    <li>b</li>
    <li>c</li>
    <li>d</li>
    <li>e</li>
</ul>

<script>
    var ul = document.querySelector('.shuffle');
    for (var i = ul.children.length; i >= 0; i--) {
        ul.appendChild(ul.children[Math.random() * i | 0]);
    }
</script>

Thank you, I tried the alternatives but they don’t fully suit my needs. It did not manage to adjust the number of question so this list randomized still looks like a more viable option for me.

Wow, thank you Andrej, that is a useful and important piece of info because randomizing the questions order is basically all I need.
I am going to try right away both of your solutions.
Cheers!

1 Like

Here is another template for multiple choice. Not my work except for the quirky highlighting addition and formatting.

Dropbox Link: download 1 card deck apkg with card template

Notes:

  • Usage: Options field must use bullets. The bullets will be randomized. Underline the bullet that is the correct answer.
  • This version has highlighting (on desktop) on front of card by selecting text w/ mouse like a standardized test.
  • Template supports tippy addon.
  • During review, bolded text on the front of a card appears the same as normal text. The bold text is highlighted when you flip the card to the answer side.

    The idea is to bold the most important parts of a question (used to determine the answer) without giving it away when viewing the front.

    Ideally, when you flip the card, the part you highlighted while reading will match the part you bolded when creating the card.
1 Like