diff --git a/htdocs/js/Problem/problem.js b/htdocs/js/Problem/problem.js index 26baf236f1..a3b8777ac3 100644 --- a/htdocs/js/Problem/problem.js +++ b/htdocs/js/Problem/problem.js @@ -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()); })(); diff --git a/lib/WeBWorK/ContentGenerator/Problem.pm b/lib/WeBWorK/ContentGenerator/Problem.pm index b3e81975fb..f3512a3a0f 100644 --- a/lib/WeBWorK/ContentGenerator/Problem.pm +++ b/lib/WeBWorK/ContentGenerator/Problem.pm @@ -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 { diff --git a/templates/ContentGenerator/ProblemSet/problem_list_row.html.ep b/templates/ContentGenerator/ProblemSet/problem_list_row.html.ep index 879a244027..07464ce071 100644 --- a/templates/ContentGenerator/ProblemSet/problem_list_row.html.ep +++ b/templates/ContentGenerator/ProblemSet/problem_list_row.html.ep @@ -37,7 +37,7 @@ % ) % { % # If the problem is jitar restricted, then show it greyed out. - + <%= maketext('Problem [_1]', $problemNumber) %> % } else {