Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make JITAR disabled problems disabled without javascript. #2656

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions htdocs/js/Problem/problem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@
const bsToast = new bootstrap.Toast(toast, { delay: 5000 });
bsToast.show();
});

// Prevent problems which are disabled from acting as links
$('.problem-list .disabled-problem')
.addClass('disabled')
.on('click', (e) => e.preventDefault());
})();
7 changes: 4 additions & 3 deletions lib/WeBWorK/ContentGenerator/Problem.pm
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,10 @@ sub siblings ($c) {
{
push(
@items,
$c->link_to(
$c->maketext('Problem [_1]', join('.', @seq)) => '#',
class => $class . ' disabled-problem',
$c->tag(
'a',
class => $class . ' disabled',
$c->maketext('Problem [_1]', join('.', @seq))
)
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
% )
% {
% # If the problem is jitar restricted, then show it greyed out.
<span class="<%= $linkClasses %> disabled-problem text-nowrap">
<span class="<%= $linkClasses %> text-nowrap">
<%= maketext('Problem [_1]', $problemNumber) %>
</span>
% } else {
Expand Down