Skip to content
Open
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: 1 addition & 4 deletions lib/WeBWorK/ContentGenerator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,6 @@ sub links ($c) {
}
}

# System link parameters that are common to all links (except the Courses link).
my %systemlink_params = ($c->param('showOldAnswers') ? (showOldAnswers => $c->param('showOldAnswers')) : ());

my $current_url = $c->url_for;

# Subroutine for generating links.
Expand All @@ -474,7 +471,7 @@ sub links ($c) {
# Mojolicious has already encoded html entities at this point.
return $c->link_to(
($options{text} // route_title($c, $route_name, 1)) => $c->systemLink(
$new_url, params => { %systemlink_params, %{ $options{systemlink_params} // {} } }
$new_url, params => $options{systemlink_params} // {}
),
class => 'nav-link' . ($active ? ' active' : ''),
$options{target} ? (target => $options{target}) : (),
Expand Down
4 changes: 0 additions & 4 deletions lib/WeBWorK/ContentGenerator/Problem.pm
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,6 @@ sub nav ($c, $args) {
}

my %tail;
$tail{showOldAnswers} = 1 if $c->{will}{showOldAnswers};
$tail{studentNavFilter} = $c->param('studentNavFilter') if $c->param('studentNavFilter');

return $c->tag(
Expand Down Expand Up @@ -1223,9 +1222,6 @@ sub output_score_summary ($c) {
sub output_misc ($c) {
my $output = $c->c;

# Save state for viewOptions
push(@$output, $c->hidden_field(showOldAnswers => $c->{will}{showOldAnswers}));

# Only allow file editing for users that have the permission to modify problem sets.
if ($c->authz->hasPermissions($c->authen->{user_id}, 'modify_problem_sets')) {
push(@$output, $c->hidden_field(editMode => $c->{editMode}))
Expand Down
3 changes: 0 additions & 3 deletions lib/WeBWorK/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,6 @@ sub generateURLs ($c, %params) {
if (defined $params{set_id} && $params{set_id} ne '') {
if ($params{problem_id}) {
$routePath = $c->url_for('problem_detail', setID => $params{set_id}, problemID => $params{problem_id});
for my $name ('showCorrectAnswers', 'showHints', 'showOldAnswers', 'showSolutions') {
$args{$name} = [ $c->param($name) ] if defined $c->param($name) && $c->param($name) ne '';
}
} else {
$routePath = $c->url_for('problem_list', setID => $params{set_id});
}
Expand Down