Need to pass course ID and root account ID for the notification
preference overrides to correctly look up their data
fixes VICE-607
Change-Id: I9afaf77d95d009eb8847294518b61027f872e2da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242221
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
Fills in the stub for actually sending the notification to the selected
students.
Test Plan:
In a Rails console
- Grab a student who has Due Date notifications set to Immediate (u)
- Grab an assignment that the student is assigned, but has not
submitted and is due in the future (a)
- `s = Submission.find_by(user_id: u.id, assignment_id: a.id)`
- `n = BroadcastPolicy.notification_finder.by_name('Upcoming Assignment Alert')`
- `AssignmentUtil.alert_unaware_student(n, assignment: a, submission: s)`
- Verify that a notification was sent
fixes VICE-445, VICE-446
flag = smart_alerts
Change-Id: I56032152c8f9a0c4c2387d28420c419f990440d1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240397
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
fixes KNO-444
flag = smart_alerts
this patch implements a simplified version of what was discussed in the
RFC[1] where we use the 2 following conditions to decide whether a
student should be alerted:
1. they didn't make a submission AND
2. they didn't interact with the assignment in the last 3 days
.
. TEST PLAN
. .... ....
you'll need the console for this since there's no UI yet:
- edit assignment_util.rb:77 and insert a log statement there like:
puts "alerting student #{student.id} for assignment #{assignment.id}"
- create an assignment and assign it to some students
- run AssignmentUtil.process_due_date_reminder('Assignment', id) and
verify it logs for the students you expect
- (optional) enable page views[2] and visit the assignment page as a
student, now upon running the function again verify it excludes that
student (since they've "seen the assignment recently")
for overrides:
- create a group and add 1-2 students to it
- create an assignment exclusively for that group
- run #process_due_date_reminder with the AssignmentOverride object this
time and verify it logs only the students for that group
[1]: https://docs.google.com/document/u/1/d/1fEO54slgHENTFS-vPfPqhGgr7ysS976u1koDjr9jdX4
[2]: run "Setting.set('enable_page_views', 'db')" in console
Change-Id: Ie2cd6b5ff47baf03faf2da9576c5f9204311a5d5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239465
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
flag=none
closes: LA-939
test plan:
-- Atempt 1
- Create or edit an Assignment
- let lock_at date be before due date
- Try save and ensure there is an error
-- Attempt 2
- Repeat attempt1 with unlock_at date after the due date(no lock_at)
-- Attempt 3
- Repeat by entering both invalid lock_at and unlock_at dates
-- Attempt 4
- Ensure you can save when entering valid dates
-- Attempt 5
- Ensure you can save with no due date and no lock_at and unlock_at dates
Change-Id: Ic6e2f88313e5831fbb184fa15cf0ddf0423b5d55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234841
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
sending an empty "assignment_overrides" array
in the api bypassed date validation so it
was allowed to create an invalid assignment
refs #COMMS-1008
Change-Id: I838819b6db8fb9080e51af825f1be25e0afdf3cf
Reviewed-on: https://gerrit.instructure.com/145390
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes QO-336
test plan
- Create a quiz
- Select Graded Quiz as the type
- Enter in a date for Available, Due and Until
- Save the quiz
- Edit the quiz
- Change the Until date use the Calendar to match
the Due date
- it should work
Change-Id: I0d94e751008f06c19d25c0772bd322a5cc66419c
Reviewed-on: https://gerrit.instructure.com/145005
Tested-by: Jenkins
Reviewed-by: Davis Lynn McClellan <dmcclellan@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CNVS-41165
test plan
- should allow updating due date to invalid lock
range if lock range is also updated
Change-Id: I928918be6079e431ac38d471a68ed86a6991201d
Reviewed-on: https://gerrit.instructure.com/139788
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Fixes: SIS-2826
Test plan:
- Navigate to account settings
- Go to the Feature Options tab
- Disable 'Enable new SIS integration settings'
- Navigate back to the Settings tab
- Update Settings
- Navigate to a course
- Create an assignment without a due date
- Navigate to the Assignment index page
- Click the `Post to SIS` icon to enable the setting
- Confirm the due date/name too long validation warning does not
show
Change-Id: I5e1da0e1a2357a0584253acd455c953658222ce8
Reviewed-on: https://gerrit.instructure.com/107884
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Fixes: SIS-2811
Test plan:
- Turn the following account settings on:
-- "Default SIS Sync for assignments, quizzes, grade discussion"
-- "Require assignment due date"
- Navigate to a course
- Create a 'Not Graded' Assignment
- Confirm you can save the assignment without a due date
- Create a quiz of grading type 'Practice Quiz'
- Confirm you can save the quiz without a due date
- Create a quiz of grading type 'Ungraded Survey'
- Confirm you can save the quiz without a due date
Change-Id: I4b0705e0d1f5714c6ed5686292e26a264d58ce33
Reviewed-on: https://gerrit.instructure.com/106451
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Fixes: SIS-2694
Test plan:
- Navigate to the account settings page
- Navigate to the `Feature Options` tab
- Turn the `Enable new SIS integration settings` feature flag on
- Navigate back to the `Settings` tab
- Enter a name for the 'SIS friendly name' setting
- Save the settings
- Navigate to a course
- For Assignments, Discussions and Quizzes confirm the post_to_sis
option has been renamed to 'Post to #{name_you_entered}'
- Confirm if you remove that setting on the account the options
go back to their original verbiage "Post to SIS"
Change-Id: Iccb2e89f201ef2750605a1396d238c9a0a8ca243
Reviewed-on: https://gerrit.instructure.com/102480
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
Fixes: SIS-2743
Test plan:
- Navigate to the account settings page
- Navigate to the `Feature Options` tab
- Turn the `Enable new SIS integration settings` feature flag on
- Navigate back to the `Settings` tab
- Check "Limit assignment names lengths (max 255)" option
- Enter a max assignment name length value
- Save the settings
- Navigate to a course
- Create a Discussion
- Enter a name that is longer than the value you entered
- Check the 'Graded' option
- Check the `Post to SIS` optiona
- Click Save/Save & Publish
- Confirm the save fails and you are presented with a UI error
"Name is too long, must be under #{the_value_you_entered} characters"
- Confirm upon changing the name you are able to save the discussion
Change-Id: Iafd578a5923fce35761065d3088ae1b2e8c4bbcd
Reviewed-on: https://gerrit.instructure.com/101040
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Merge remote-tracking branch
'origin/dev/stewie/2017-02-10-differentiated-assignment-override-due-dates'
Due date validation works for differentiated assignments.
Quiz and Discussion Topic due date validation will come later.
Mastery path assignment due date validation will also come later.
Refs: SIS-2636
Test Plan:
Due dates for new differentiated assignments should be required when:
assignment.post_to_sis = true
account's sis_require_assignment_due_date is true
the new_sis_integrations feature flag is on
Change-Id: I874c37a2acbea6297a80ba2efb953d0ec3e54490
due_date_required_for_account now uses the sis_syncing value in
determining its own return value.
Refs: SIS-2636
Test Plan: QA will review the functionality in the merge commit to
master.
Change-Id: Ia5c021cfd2039abb80b8a876d916a87e89b3a207
Reviewed-on: https://gerrit.instructure.com/101897
Reviewed-by: Nick Houle <nhoule@instructure.com>
Tested-by: Jenkins
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Refs: SIS-2692
Test plan:
- Navigate to the account settings page
- Navigate to the `Feature Options` tab
- Turn the `Enable new SIS integration settings` feature flag on
- Navigate back to the `Settings` tab
- Check "Limit assignment names lengths (max 255)" option
- Enter a max assignment name length value
- Save the settings
- Navigate to a course
- Create an assignment
- Enter a name that is longer than the value you entered
- Check the `Post to SIS` option
- Click Save/Save & Publish
- Confirm the save fails and you are presented with a UI error
"Name is too long, must be under #{the_value_you_entered} characters"
- Confirm upon changing the name you are able to save the assignment
Change-Id: Ie446b1878a882274c7617789db62b3d271f864f4
Reviewed-on: https://gerrit.instructure.com/100530
Product-Review: Brad Humphrey <brad@instructure.com>
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Tested-by: Jenkins
Added DUE_DATE_REQUIRED_FOR_ACCOUNT to the js_env in the assignments
controller. This will be used in to verify if a date is required for
the assignment, and this functionality will appear in the next commit.
Refs: SIS-2636
Test Plan: QA will review the functionality in the final commit.
Change-Id: I320337aa6fc8779adb5e022b6d846736e603da69
Reviewed-on: https://gerrit.instructure.com/101392
Tested-by: Jenkins
Reviewed-by: Ken Romney <kromney@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Refs: SIS-2692
Test plan:
- Verify that an assignment requires name to be shorter or equal
to the name length setting on the account with post to sis
checked, the sis sync settings is checked, the assignment name
length setting is checked on the account, there's a value for
the name length setting and the new_sis_integrations feature
flag is on
Change-Id: I8eea8c1087d9798f3893776e358e5cfb966717f5
Reviewed-on: https://gerrit.instructure.com/100056
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
This commit is largely a refactor of my previous commit and lays
the groundwork for future which will include adding
due_date_required? to the assignment api
Refs: SIS-2636
Test Plan:
Verify that an assignment requires a due date under certain
conditions:
assignment.post_to_sis = true
account's sis_require_assignment_due_date is true
the new_sis_integrations feature flag is on
Change-Id: I4366db1d67c76cf433120cf767225ff80c955c21
Reviewed-on: https://gerrit.instructure.com/99593
Tested-by: Jenkins
QA-Review: <mmcdermott@instructure.com>
Reviewed-by: Nick Houle <nhoule@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>