Skip to content

Runestone Issue: randomized MCQs lose the answer if it's first choice in source #1319

Description

@bhoffman0

I recently added <choices randomize="yes"> in all MCQs in csawesome2, but we (@kmcdonnell2) found a strange bug where sometimes the answer is not saved if you refresh the page or go to the next page and come back. The questions that have this bug seem to have < choice correct="yes"> as the first option right after <choices randomize="yes">.

For example, try the first and second questions in https://runestone.academy/ns/books/published/csawesome2-demo/Exercises-basics.html (you must be logged into the course - it doesn't happen when browsing) and then refresh. The first question has the bug and the first option correct in the source but the second does not. When you refresh, it displays no answer and just a pink X box with no feedback for the first question:

Image

Here's the source for that page: https://github.com/bhoffman0/CSAwesome2/blob/main/pretext/Unit1-Using-Objects-and-Methods/Exercises-basics.ptx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions