Learning Dashboard: poll/quiz columns are numbered in reverse order ("Poll 1" is the last poll asked)
Describe the bug
In the Learning Analytics Dashboard, the Polls table lists polls newest first, but polls without question text are still labelled Poll 1, Poll 2, … by their position in the table. So the column labelled Poll 1 is the last poll asked, and Poll N is the first.
A teacher who runs several quick polls and reads the columns left to right as Poll 1…N ends up with each student's answers attached to the wrong question. On a production meeting this led a teacher to report that the dashboard had "switched" students' answers. It had not: we checked all 20 responses (4 users × 5 polls) against events.xml and the recorded learning-dashboard/data.json, and every stored answer was correct. Only the column order and labels were misleading.
The Quizzes table has the same pattern (Quiz ${i + 1}).
Cause
#23595 (899c2b9bf1) added the newest-first sort, and the header is derived from the index in the sorted array:
bbb-learning-dashboard/src/components/PollsTable.jsx (v4.0.x-release, ~L302):
Object.values(polls).sort((a, b) => b.createdOn - a.createdOn).map((v, i) => {
...
const headerName = v?.question?.length > 0 ? v?.question : `Poll ${i + 1}`;QuizzesTable.jsx (~L431) does the same with Quiz ${i + 1}.
Polls that have question text are not affected, because the question is used as the header.
To Reproduce
- Start a meeting and open the Learning Analytics Dashboard as moderator.
- Run three quick A/B/C/D polls with no question text. Have a viewer answer A on the first, B on the second, C on the third.
- Open the Polls table.
Expected behavior
Poll 1 refers to the first poll asked. Keeping the newest-first display is fine, as long as the number reflects the order the polls were asked (e.g. number from the chronological position, so the header row reads Poll 3, Poll 2, Poll 1).
Actual behavior
The header row reads Poll 1, Poll 2, Poll 3, and the viewer's answers under them are C, B, A. The Poll 1 column holds the third poll.
BBB version
Observed on 4.0.0-rc.3 (bbb-learning-dashboard build 20260911, commit 221dbf8900). The same code is on v3.0.x-release and v4.0.x-release.
Additional context
Found while investigating a support ticket; the customer's data was verified against the meeting's events.xml.
Source: bigbluebutton/bigbluebutton