-
Notifications
You must be signed in to change notification settings - Fork 246
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
Allow instructors to configure an end date until which students can run automated tests #6992
Allow instructors to configure an end date until which students can run automated tests #6992
Conversation
… end-date-for-student-tests
… end-date-for-student-tests
… end-date-for-student-tests
Pull Request Test Coverage Report for Build 8498291012Details
💛 - Coveralls |
@@ -31,6 +31,7 @@ en: | |||
short_identifier: Short Identifier | |||
start_time: Start time | |||
student_form_groups: Students may form their own groups | |||
token_end_date: Tokens will be unavailable on |
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.
reword to "Tokens available until"
config/locales/policies/en.yml
Outdated
@@ -18,6 +18,7 @@ en: | |||
view_ta_subtabs?: You are not authorized to perform this action. | |||
assignment: | |||
autogenerate_group_name?: This assignment does automatically generate group names. | |||
before_token_end_date?: The token end date for this assignment has passed. |
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.
Reword to "Tokens are no longer available for this assignment."
db/structure.sql
Outdated
-- Name: index_assignment_properties_on_token_end_date; Type: INDEX; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE INDEX index_assignment_properties_on_token_end_date ON public.assignment_properties USING btree (token_end_date); |
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.
This should no longer exist, since you removed it from the migration. This indicates that this file is out of sync with your migration. The easiest way to fix this is to revert all changes in this specific file, then re-run the migration.
lib/tasks/autotest.rake
Outdated
@@ -80,6 +80,7 @@ class AutotestSetup | |||
repository_folder: @assg_short_id, | |||
enable_test: true, | |||
token_start_date: Time.current, | |||
token_end_date: Time.current, |
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.
This is for seeding, but it should also be okay to set this to nil
so that the field is blank (this is the default behaviour)
app/policies/student_policy.rb
Outdated
check?(:tokens_available?, grouping) | ||
end | ||
unless grouping.nil? || assignment.nil? | ||
if !assignment.token_end_date.nil? |
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.
Use .present?
instead of ! ... .nil?
… end-date-for-student-tests
… end-date-for-student-tests
…-8/Markus into end-date-for-student-tests
Motivation and Context
Closes #6822. Currently, MarkUs allows instructors to enable a "start date" at which students can begin running "student-run tests". Tests can be run up until the assignment due date. This pull request augments this functionality to allow the instructor to configure an end date until which students can run tests. If the end date is left blank, the existing functionality (up until assignment due date) will be used instead.
Your Changes
Description:
token_end_date
attribute toassignment_properties
.token_end_date
.assignment_policy
andstudent_policy
that check for whether the student can run automated testing based on the value fortoken_end_date
.Type of change (select all that apply):
Testing
token_end_date
in the web UI.Questions and Comments (if applicable)
Just checked with my group members as well and wanted to bring to your attention that the flaky test file
spec/system/main/login_spec.rb
is not passing, but I checked to make sure that it's not because of my changes.Checklist