# Problems with Insert Randomized Lists (multiple choice)

**URL:** <https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821>\
**Category:** Add-ons\
**Created:** [January 27, 2023, 10:09am UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821 "2023-01-27T10:09:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marek1221](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Marek1221](https://forums.ankiweb.net/u/Marek1221)\
**Post date:** [January 27, 2023, 10:09am UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821/1 "2023-01-27T10:09:48Z")

</div>

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.

```auto
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!

---

<div class="post-metadata">

**Author:** ![NameLessGO](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/namelessgo/32/34298_2.png) [@NameLessGO](https://forums.ankiweb.net/u/NameLessGO)\
**Post date:** [January 27, 2023, 3:29pm UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821/2 "2023-01-27T15:29:38Z")

</div>

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

Currently the alternatives are  
[Multiple Choice Support](https://ankiweb.net/shared/info/1497603664)  
[Multiple Choice for Anki](https://ankiweb.net/shared/info/1566095810)

---

<div class="post-metadata">

**Author:** ![Andr](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/andr/32/1449_2.png) [@Andr](https://forums.ankiweb.net/u/Andr)\
**Post date:** [February 5, 2023, 9:42am UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821/3 "2023-02-05T09:42:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andr](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/andr/32/1449_2.png) [@Andr](https://forums.ankiweb.net/u/Andr)\
**Post date:** [February 5, 2023, 9:47am UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821/4 "2023-02-05T09:47:35Z")

</div>

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

```auto
<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>

```

---

<div class="post-metadata">

**Author:** ![Marek1221](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Marek1221](https://forums.ankiweb.net/u/Marek1221)\
**Post date:** [February 5, 2023, 11:29am UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821/5 "2023-02-05T11:29:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Marek1221](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Marek1221](https://forums.ankiweb.net/u/Marek1221)\
**Post date:** [February 5, 2023, 11:34am UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821/6 "2023-02-05T11:34:27Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![DiveShallow](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/diveshallow/32/823_2.png) [@DiveShallow](https://forums.ankiweb.net/u/DiveShallow)\
**Post date:** [February 7, 2023, 7:24am UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821/7 "2023-02-07T07:24:21Z")

</div>

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](http://bit.ly/3IOUMUu)

**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.

---

<div class="post-metadata">

**Author:** ![dburrell](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dburrell](https://forums.ankiweb.net/u/dburrell)\
**Post date:** [March 1, 2025, 7:27pm UTC](https://forums.ankiweb.net/t/problems-with-insert-randomized-lists-multiple-choice/26821/8 "2025-03-01T19:27:39Z")

</div>

I have another way that works on both sides of the car

See this post but is randomizes using the order feature for divs using flex layout and then applies the same order on the answer side. Works on all platforms. I may enhance the js to take div id names if someone really wants easy reuse.

I’ve added a shared template deck. I posted it 3/2/2025 so it should be visible by 3/3/2025

1740973324742

[Random order multi select works on all PC/iOS/Android - AnkiWeb](https://ankiweb.net/shared/info/1297263902?cb=1740973324742)

> [@shuffleList works on AnkiWeb, but not on AnkiDroid 2.20.1](https://forums.ankiweb.net/t/shufflelist-works-on-ankiweb-but-not-on-ankidroid-2-20-1/55578):
>
> I’m using AndkiDroid 2.20.1 (anki 24.11). I want to create a simple card template that shuffles the list items in a certain field, let’s say {{Choices}}. The list I have in {{Choices}} has id="content", e.g.: \<div\>[Choices]\</div\>\<br\> \<ol id="content"\> \<li\>Choice1 [Front]\</li\> \<li\>Choice2 [Front]\</li\> \<li\>Choice3 [Front]\</li\> \</ol\> And I expect the template below to get the list and show the items in a shuffled order. \<div\>{{Front}}\</div\> \<div\> {{Choices}} \<script\> (fu…
