Skip to content

Fix the test student nav to show all versions of tests. (hotfix of #3177) - #3178

Open
drgrice1 wants to merge 1 commit into
openwebwork:mainfrom
drgrice1:bugfix/test-nav-only-one-version-hotfix
Open

Fix the test student nav to show all versions of tests. (hotfix of #3177)#3178
drgrice1 wants to merge 1 commit into
openwebwork:mainfrom
drgrice1:bugfix/test-nav-only-one-version-hotfix

Conversation

@drgrice1

Copy link
Copy Markdown
Member

In the rework of the test student nav there was a flaw in design that led to only one version of a test being shown for each student. It is not the right thing to iterate over the users For which a test version exists. Instead the actual test versions need to be iterated over. The users are looked up in a hash in that loop.

@drgrice1

Copy link
Copy Markdown
Member Author

This definitely needs to be merged before instructors start grading tests this term!

@drgrice1
drgrice1 force-pushed the bugfix/test-nav-only-one-version-hotfix branch 3 times, most recently from 87ff9ed to e2e0216 Compare August 30, 2026 20:04
@drgrice1

Copy link
Copy Markdown
Member Author

I want to point out that the code in develop is quite wrong. For example, assume that you have assigned a test that allows students to take at least 2 attempts, and there are two students that have taken the test. Say that student1 has taken 2 attempts, but student2 has taken only one attempt. Then the student nav will list student1's first version, but not the second version, and will list student2 with version 2, but will not even list student2's actual only version. If you click on the link for student2, version2 it will give you The selected test (setID,v2) is not a valid test for student2. Requested version (2) of set "setID" is not assigned to user student2.

@drgrice1

Copy link
Copy Markdown
Member Author

So yes, I really dropped the ball in that rework of the test student nav.

In the rework of the test student nav there was a flaw in design that
led to only one version of a test being shown for each student.  It is
not the right thing to iterate over the users For which a test version
exists.  Instead the actual test versions need to be iterated over.  The
users are looked up in a hash in that loop.
@drgrice1
drgrice1 force-pushed the bugfix/test-nav-only-one-version-hotfix branch from e2e0216 to b0f01a7 Compare August 30, 2026 20:27

@somiaj somiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the issue.

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

Successfully merging this pull request may close these issues.

2 participants