diff --git a/macros/deprecated/problemRandomize.pl b/macros/deprecated/problemRandomize.pl index a71eab249..7ea9474b9 100644 --- a/macros/deprecated/problemRandomize.pl +++ b/macros/deprecated/problemRandomize.pl @@ -166,8 +166,10 @@ sub new { when => "correct", onlyAfterDue => 1, style => "Button", - styleName => - ($main::inputs_ref->{effectiveUser} ne $main::inputs_ref->{user} ? "checkAnswers" : "submitAnswers"), + styleName => ( + !$main::inputs_ref->{effectiveUser} + || ($main::inputs_ref->{effectiveUser} ne $main::inputs_ref->{user}) ? "checkAnswers" : "submitAnswers" + ), label => undef, buttonLabel => $main::PG->maketext("Get a new version of this problem"), checkboxLabel => $main::PG->maketext("Get a new version of this problem"),