-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add problem seed to past answers. #2274
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If recording this, maybe also save the PSVN which is an alternate value which PG can use to seed the RNG?
I don't think that the problem set version number is needed in the past answer table. The problem set version number is already saved in the user set. That does not change for the user set, and so it does not also need to be saved in the past answer table, as it can always be retrieved as needed from the user set table. |
<td class="px-3"><small><%= $c->formatDateTime($record{time}) %></small></td> | ||
% for (my $i = 0; $i <= $upper_limit; $i++) { | ||
% for (my $i = 0; $i <= $upper_limit; ++$i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does moving this increment operator to be a prefix make a difference here? Is it a preferable coding standard to use prefix when it doesn't make a difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-incrementation should always be used if the value prior to incrementing is not needed. So in a for
loop like this it should definitely always be pre-incrementation. No matter what programing language you are working with pre-incrementation is more efficient. Post-incrementation requires saving the original value, incrementing, and returning the original value.
cd4094e
to
7ed3f6e
Compare
Add a `problem_seed` column to the `past_answer` database table. This is displayed in the first column of the table shown on the "Answer Log" page. Since that table is not a fully qualified data table and is missing headers, it is displayed in the table as "Seed: 123". If a problem does not have a seed (because it is from a past answer before this pull request like an archived course), then "Seed: unknown" is shown.
7ed3f6e
to
630db8a
Compare
Add a
problem_seed
column to thepast_answer
database table. This is displayed in the first column of the table shown on the "Answer Log" page. Since that table is not a fully qualified data table and is missing headers, it is displayed in the table as "Seed: 123". If a problem does not have a seed (because it is from a past answer before this pull request like an archived course), then "Seed: unknown" is shown.