Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[.multiple-choice] @example in incorrect position in the JSON #10

Open
six5536 opened this issue Apr 3, 2023 · 0 comments
Open

[.multiple-choice] @example in incorrect position in the JSON #10

six5536 opened this issue Apr 3, 2023 · 0 comments

Comments

@six5536
Copy link

six5536 commented Apr 3, 2023

Describe the bug
The @example on [-green] is not correct in the JSON

To Reproduce
Parse the following bitmark to produce JSON output:

[.multiple-choice]
[@id:285675]
[%5][%multiple-choice]
[!What color do the following beverages have?]
Be careful and think twice.
===
[!Milk]
[+white]
[-red]
[-blue]
===
[!Red Wine]
[+red]
[-white][%12]
[-green][@example]
===

The following JSON is produced:

{
   "bitmark": "[.multiple-choice]\n[@id:285675]\n[%5][%multiple-choice]\n[!What color do the following beverages have?]\nBe careful and think twice.\n===\n[!Milk]\n[+white]\n[-red]\n[-blue]\n===\n[!Red Wine]\n[+red]\n[-white][%12]\n[-green][@example]\n===",
   "bit": {
     "type": "multiple-choice",
     "format": "bitmark--",
     "item": "5",
     "instruction": "What color do the following beverages have?",
     "body": "Be careful and think twice.",
     "footer": "",
     "hint": "",
     "quizzes": [
       {
         "item": "",
         "instruction": "Milk",
         "choices": [
           {
             "choice": "white",
             "item": "",
             "isCorrect": true,
             "instruction": "",
             "hint": ""
           },
           {
             "choice": "red",
             "item": "",
             "isCorrect": false,
             "instruction": "",
             "hint": ""
           },
           {
             "choice": "blue",
             "item": "",
             "isCorrect": false,
             "instruction": "",
             "hint": ""
           }
         ],
         "hint": "",
         "isExample": false,
         "example": ""
       },
       {
         "item": "",
         "instruction": "Red Wine",
         "choices": [
           {
             "choice": "red",
             "item": "",
             "isCorrect": true,
             "instruction": "",
             "hint": ""
           },
           {
             "choice": "white",
             "item": "12",
             "isCorrect": false,
             "instruction": "",
             "hint": ""
           },
           {
             "choice": "green",
             "item": "",
             "isCorrect": false,
             "instruction": "",
             "hint": ""
           }
         ],
         "hint": "",
         "isExample": false,
         "example": ""
       }
     ],
     "id": ["285675"],
     "lead": "multiple-choice"
   },
   "example": ""
 },

Expected behavior
isExample = true

versions
1.0.38

nodayoshikazu added a commit that referenced this issue Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant