closes CNVS-36153
Test Plan
NOTE: If you don't feel like waiting 5 minutes for the missing
deductions job to run open config/initializers/period_jobs.rb
and change */5 * * * * to */1 * * * * on line 183. This will
make the job run once per minute. This change will need to be
made prior to starting the rails server.
1. Create a course with some students in it
2. Create some quiz and non-quiz assignments
a. Mix grading types and submission types
b. Make sure at least one of the assignments is complete/incomplete
and has some kind of online submission type
c. Set the due dates for some of the assignments/quizzes to be in
the past within the last 24 hours, some further in the past,
some in the future. Make sure at least one complete/incomplete
assignment has a due date within the last 24 hours and one
other grading type within the last 24 hours.
d. Create at least one assignment due within the last 24 hours and
manually grade one of the students in your course, but not the
others.
d. Create at least one assignment due within the last 24 hours and:
1. Mark one of its submissions as missing via the rails
console with:
Assignment.find(4).submissions.first.update(
late_policy_status: 'missing'
)
2. Mark one if its submissions as late via the rails console:
Assignment.find(4).submissions.second.update(
late_policy_status: 'late'
)
f. Wait for the missing deductions job to run in the console you'll
see output that starts with:
"periodic: MissingPolicyApplicator.apply_missing_deductions...."
g. Visit Gradezilla.
h. Verify that none of the assignments were automatically graded.
3. Create a LatePolicy for your course via the rails console like so:
LatePolicy.create(
course_id: <COURSE_ID>,
missing_submission_deduction_enabled: true,
missing_submission_deduction: 90
)
4. Wait for the job to run again.
5. Visit Gradezilla
6. Verify that grades have been correctly assigned based on missing
policy. If you created the LatePolicy with the command given in
step 3 you should see each assignment/quiz given a score of 10%
of total points. Complete / Incomplete assignments should always
be given a score of zero and grade of Incomplete. Verify that
the Total score for the course has been updated.
7. The submission where you set late_policy_status to late should
not have been graded but the other submissions for that
assignment should have been.
8. Verify that the manually graded assignment did not have its score
overridden by the missing policy.
9. Grading periods
a. Create an assignment in an open grading period that is due
within the last 24 hours.
b. Verify that it gets automatically graded when the job runs.
c. Create an assignment in a closed grading period due within
the last 24 hours.
d. Verify that it is not automatically graded when the job runs.
10. Due date overrides
a. Create assignments with overrides for individual students.
b. Verify that if the override is due within the last 24 hours
the submission gets automatically graded.
c. Verify that if the override is not due within the last 24 hours
it is not automatically graded.
11. Create a couple more courses and run through some of the above
scenarios to verify that all courses with a missing policy have
their missing policy applied correctly.
Change-Id: I39fd9e4c641df83a3bb222fc4b4f48d1c35a767b
Reviewed-on: https://gerrit.instructure.com/109727
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>