Make JITAR disabled problems disabled without javascript. #2656
+5
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is no reason to use javascript for this. Just make the links disabled to begin with. Furthermore, there is no reason to use jQuery for this. I thought all webwork2 jQuery usage had already been removed, but this was missed.
To test this create a JITAR set with two or more problems (or really two or more nested sets of problems), and set "Restrict Problem Progression" to "Yes". Assign the set to a student user, and then log in as that student user. On the problem list page the latter prolems in the set should be grayed out, and clicking on them does nothing (that already works without javascript because these aren't even
a
tags, they arespan
tags). If you open the first problem, then the latter problems in the prroblems list in the site menu should be grayed out, and clicking on them does nothing. Currently, that uses jQuery javascript to disable those links. With this pull request, they are just disabled to begin with.