Skip to content

Commit

Permalink
Merge pull request #1032 from Alex-Jordan/hotfix/NchooseK
Browse files Browse the repository at this point in the history
HOTFIX: force list context when random_subset used in dprecated macros
  • Loading branch information
drgrice1 authored Mar 13, 2024
2 parents 9cefdf9 + 3fb9c0f commit 26f77df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions macros/ui/PGchoicemacros.pl
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,9 @@ sub invert {

sub NchooseK {
my ($n, $k) = @_;
return random_subset($k, 0 .. $n - 1);
# force list context
my @return = random_subset($k, 0 .. $n - 1);
return @return;
}

=item [DEPRECATED] shuffle()
Expand All @@ -815,7 +817,9 @@ sub NchooseK {

sub shuffle {
my ($i) = @_;
return random_subset($i, 0 .. $i - 1);
# force list context
my @return = random_subset($i, 0 .. $i - 1);
return @return;
}

=item [DEPRECATED] match_questions_list()
Expand Down

0 comments on commit 26f77df

Please sign in to comment.