User data is lost when violating rules in a matrix of choices question

Description

When answering a matrix of choices question using forced ranking, if you fill in all the columns and then try to change one, you get a pop-up alert telling you this is not allowed. However, it clears the user's previous (valid) selection for the column in question in this scenario, and the user may not notice this. This can result in the user submitting the question without realizing one of their answers/selections had been cleared out.

In 10.x, this bug clears out the user's previous choice in the given row. In 11.x+, this has actually gotten worse. You are no longer even given the message stating that this is not allowed (regression), and the JavaScript code not only clears the user's choice for the given row, but also their previously selected radio button for the column in question. So the user effectively loses two of their valid selections, and is not presented with any message indicating what happened.

The linked PR reintroduces the message that is presented to the user, and preserves all previous valid input for the radio buttons.

Attachments

2

Activity

Brian J. August 8, 2016 at 2:55 PM

I would say this is not an issue. The most important thing here, is that the original user selection is preserved.

Molly Kelsey August 8, 2016 at 2:49 PM

Tested in https://trunk-mysql.nightly.sakaiproject.org/portal/

The pop-up appears as expected advising the user that only one selection per column is allowed. When the user clicks Ok, the popup disappears and the original selections are unchanged.

However, while the popup is still visible two rows are shown selected for one column (see image1.png) - is this an issue?

Brian J. August 4, 2016 at 2:53 PM

I believe the regression (missing message to user) was introduced in SAM-2926.

Brian J. August 4, 2016 at 2:49 PM

Attaching patch for 10.x

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created August 4, 2016 at 11:20 AM
Updated March 23, 2022 at 3:01 PM
Resolved August 5, 2016 at 9:00 AM