Refs MBL-10126
Test Plan:
- In the rails console, create a
UserObservationLink and an ObserverAlertThreshold
- Create an alert that links to both
- Create another alert that links to both but has
a created_at set to more than 6 months ago
- Run ObserverAlert.clean_up_old_alerts
- Run ObserverAlert.all
- You should only have 1 alert
Change-Id: I23f4723574cde01135ddafb9926c06029266d07d
Reviewed-on: https://gerrit.instructure.com/150324
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Kausty Saxena <ksaxena@instructure.com>
closes MBL-10123
test plan:
- with a user_observation_link and an observer_alert_threshold
make observer_alerts in the rails console
- hit the endpoint
/users/:user_id/observer_alerts/:student_id
- it should return all alerts for that observer/student
Change-Id: I01fe71e3414d63cedc0e02eaed4e0d8822f80fcf
Reviewed-on: https://gerrit.instructure.com/150143
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Tested-by: Jenkins
QA-Review: Taylor Wilson <twilson@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
we discovered that direct string comparision of xlog locations can give
invalid results in some situations, where second part of the xlog
location value "wraps" from 7 hex characters to 8
Change-Id: I62215e5fcc3f9655643aab9fc99f55ddbb37e8ac
Reviewed-on: https://gerrit.instructure.com/150385
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
closes ADMIN-1033
Test plan
- Ensure api/v1/planner/items and
api/v1/planner/overrides(/:id)
work as expected
- Specs pass
Change-Id: I4a1d5f8f81bb2bdd2eace8c61bc807d2f0457cdf
Reviewed-on: https://gerrit.instructure.com/149265
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
closes MBL-10122
test plan:
- do CRUD operations on the observer_alert_threshold endpoints
/users/<id>/observer_alert_threshold[?student_id=<id>]
and
/users/<id>/observer_alert_threshold/<id>
Change-Id: I2c5c7700adaedd4a2068a61568217219b763339e
Reviewed-on: https://gerrit.instructure.com/149147
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
QA-Review: Matthew Sessions <msessions@instructure.com>
Tested-by: Jenkins
fixes problems when run on relations that are using `from()`
Change-Id: I528dfb7e6885b4ce276900a53d9b2f8adfabafe5
Reviewed-on: https://gerrit.instructure.com/149795
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
closes CORE-1245
recent internal changes in rails (released in 5.1.6) make it more
difficult for our module prepend to work, because column information is
no longer referenced lazily when checking on attribute defaults (see
changes to model_schema.rb). this means that we would need to tie in at
a lower level so that _default_attributes excludes the dropped column,
but in looking at that, Rails 5 added support for ignoring columns,
which ties in at the right level and should solve the same use case we
have.
see http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-ignored_columns-3D
Change-Id: I1f76e9d0894551f90232a36f5d48f27f8989c3a1
Reviewed-on: https://gerrit.instructure.com/145723
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs ADMIN-278
Test plan
- Specs pass
- /calendar and /calendar2 route both
still work and calendar shows up as
expected
Change-Id: Ic17a203417c354dbeaf7a5c68cc47e845c091850
Reviewed-on: https://gerrit.instructure.com/148061
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
To help support close out issues, add a support helper that runs the
DueDateCacher and then recalculates grades for a course.
closes GRADE-1120
test plan:
- access /api/v1/support_helpers/due_date_cache/course?course_id=6
to make sure it kicks off a new DueDateCacher run. It should send
you a success email.
- make sure that endpoint is only accessible when you are logged in as
a site admin user
Change-Id: Ida5f7db0484cfd4e33e1094244a3b8c00b523c6a
Reviewed-on: https://gerrit.instructure.com/148694
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
We're planning to make API calls to Canvas from Quizzes.Next to notify
it that an assignment has finished duplicating. But making API calls to
Canvas is hard, as it requires lots of configuration, an oauth dance,
and a fair amount of luck.
To ensure that assignments don't get stuck in the "duplicating" state if
Quizzes.Next -> Canvas communication breaks down, this commit adds a
periodic job to transition assignments to the "failed_to_duplicate"
state if they have been duplicating for more than 5 minutes.
Refs QUIZ-3764
Test plan:
- Create a Quizzes.Next assignment
- Go to the canvas assignments page
- Click on the kebab menu for the assignment, click "Duplicate"
- Wait 10 minutes
- Refresh the page
- Check that the new assignment displays a "failed to duplicate" message
Change-Id: Ibaf8c16117bc7ab7fc24007944943c3090ba7041
Reviewed-on: https://gerrit.instructure.com/148001
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
I couldn't take it anymore. it was driving me crazy
Change-Id: Ib40addff56e98a6e0a6d80f246c208e0ce0cb762
Reviewed-on: https://gerrit.instructure.com/148026
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>