zjosua / anki-mc

Multiple choice questions for Anki.
https://ankiweb.net/shared/info/1566095810
GNU Affero General Public License v3.0
49 stars 16 forks source link

Q_5 never coloured #93

Closed SoneaTheBest closed 1 year ago

SoneaTheBest commented 2 years ago

Describe the bug

Q_5 is never colored in when I look at the answer on the back of a card.

To Reproduce

Steps to reproduce the behavior:

  1. Create a card with 5 answer possibilities
  2. Upon revealing the answer, Q_1 to Q_4 get the correct background color according to code, only Q_5 doesn't.

Expected behavior

Fifth answer should have the background color according to code.

What have you tried?

Since I changed the color meaning in my profile, I figured I must have messed up the programming somewhere, but the same mistake also appears in another profile where I haven't adjusted the code. Deleting and reinstalling the Add-on also didn't help. I looked at the code to see if there was an obvious Q_5 missing somewhere, but I know absolutely nothing about programing and was way out of my depth there.

Screenshots

grafik grafik grafik

Information about your set-up

On which platform(s) does the error occur?

Additional context

In the third screenshot it appears to also not correctly interpret the card if Q_5 was rightly chosen? I didn't notice that before, since I always put the right answer in Q_1.

(Thanks for the wonderful add-on, even with this little bug, its working great and its an incredibly helpful addition to my Anki set-up!)

3ter commented 2 years ago

Hey @SoneaTheBest , thank you for your report.

I strongly think it is based on a misconception though: Different profiles in Anki share the same addons! (And this addon replaces the note type only on installation and update)

If you want to test the note type isolated from your changes use anki -b path/to/your/folder/of/choice as discussed e.g. here: https://forums.ankiweb.net/t/seperating-anki-and-anki-source-code-build/21263/8.

3ter commented 2 years ago

I just tested it again with a new folder and it works as expected so I'm going to remove the bug label. Did you see that we've recently added an easier way of changing the coloring via the addon config (as described on the main page of this repo)? image image

PS Really glad you're making good use of this addon 😸!

SoneaTheBest commented 1 year ago

Thank you the answer! I did a bit more playing around (e.g. testing cards to see what would happen). With some new cards I made it worked immediately. I looked at the cards I had screenshotted for you: Stil not working, i compared the input for both cards, they seemed to be the same. After retyping the answer code (the 0 1 0 0 0), its now magically working, although I didn't change it. I have no clue what the problem was, but it is working now. Thanks again!