fixes CNVS-15308
test plan:
* have multiple shards
* in console:
Rails.cache.write('a', 'b')
Shard.with_each_shard(parallel: 2) { Shard.default.activate { puts Rails.cache.fetch('a') } }
* you should see a bunch of b's (one per shard), and no errors
Change-Id: I5ad7b3ae7d6c03005d229f04cf5bc2ee1e51b948
Reviewed-on: https://gerrit.instructure.com/40832
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes: CNVS-15198
Test Plan:
- Make sure you have Application Profiling permission.
- Add ?pp=enable to the end of the url.
- A profiler output will apear in the top left corner of the screen
showing that it ran for the request.
- Add ?pp=disable to the end of the url.
- The profiler output button should be gone.
Change-Id: I6fa2dee3affa388d07c6eccf05c26c0747ddcd79
Reviewed-on: https://gerrit.instructure.com/40312
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
fixes #CNVS-12711
Using three seperate trigram searches
when looking for courses by a name match
is taking more time than we'd like.
This builds an index for all 3 relevant
columns together and reworks the scope
that references them to build a search
clause that takes advantage of that index.
TEST PLAN:
- no behavior changes, just performance improvements
- regression test /users/x/manageable_courses api
endpoint with a name parameter as that's what
makes the primary use of this query.
Change-Id: Ia645da66f0df1a4cec9298f7fa941fa51de815f4
Reviewed-on: https://gerrit.instructure.com/40507
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
ProServe wants an API endpoint for their LTI which allows for editing of all quizzes
contained in a course similar to that provided by the Quiz Extensions
API endpoint. This provides the ability to edit all quizzes at the
course level with the same type of parameters.
Closes: CNVS-14950
Test Plan:
- Access /api/v1/courses/:course_id/quiz_extensions with POST
- Pass quiz extensions parameters
- Confirm that all quizzes are edited with the appropriate parameters
Change-Id: Ifca1a4937ab356665627ef3f0aa829aeeaddedc7
Reviewed-on: https://gerrit.instructure.com/40331
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
Closes CNVS-15109, CNVS-15173
CHANGES
-------
- "auto-grading" of due submissions that was previously done
synchronously in the index action is now done in a DJ
- when viewing the index page, you don't get to see due/available
dates on load, instead the dates are fetched on the client-side and
load progressively
- new API endpoint for retrieving assignment overrides for a bunch of
quizzes at [GET] /courses/:course_id/quizzes/assignment_overrides
- we now cache the user's quiz permissions
- Canvas AMS API serializer now accepts a new option, see docs
- QuizSerializer behavior changed radically:
- "takeable", "submitted_students", "unsubmitted_students" disabled
- all associations disabled including the submission, assignment
group, and any student participants
- it can now utilize preloaded permissions
Rationale behind disabling things in the serializer is that these were
exclusive for the "show" action, so the next step forwards is to
allow the serializer to recognize different "modes" for output (e.g, for
index and one for show) and tailor the associations/fields accordingly.
Using "#filter" right now isn't cutting it, because assocs get loaded
anyway.
REFACTORING
-----------
- broke down index into three actions for visibility:
1. default, Draft-State version
2. legacy non-DS version that's not reachable in the UI, kept around
until we upgrade the tests
3. ember version
- legacy non-DS ERB code goes into its own file
- moved code that used to grade due submissions inside index to
SubmissionGrader in preparation to remove it from there entirely
- cleaned up internal docs for the Canvas AMS api serializer
TEST PLAN
---- ----
- create ~30 quizzes
+ make one of them have many questions
+ make a good number of submissions (i tested with 420 and 20
students)
- create multiple sections
+ specify date overrides for certain sections, and have at least one
student enrolled in that section
- as a teacher and/or an observer, go to quizzes index
+ verify the page renders fine
+ verify that you see "loading indicators" in the due/available
field which get replaced with actual dates when they're loaded
+ verify it's faster than the version in master (should be at least
60% faster)
- as a student in the general section, go to quizzes index
+ verify the page renders
+ verify you see the same loading behavior for dates as in teacher
view
- as a student in one of the section with overrides, go to index:
+ verify you see the overridden date
Change-Id: I741d89625da1b858148baa95e881fcc75c1802e5
Reviewed-on: https://gerrit.instructure.com/40350
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fixes CNVS-15150
test plan
1. setup outgoing email through amazon ses test account
2. setup bounce_notifications.yml with sqs test creds
3. set a user's email address to 'bounce@simulator.amazonses.com'
4. cause three messages to be sent to that user
5. ensure that they are sent
6. wait for the bounce notification processor to run (~5 min)
7. casue another message to be sent to that user
8. ensure that message is not sent
9. repeat steps 3-8 using a different user and the address
'suppressionlist@simulator.amazonses.com'
10. repeat steps 3-7 using a different user and the address
'success@simulator.amazonses.com'
11. ensure that the fourth message is sent successfully
12. make sure no error reports or job failures are reported
for the bounce notification processor
Change-Id: I060659c73a8b750c16f287e94f4198d8cb8633e5
Reviewed-on: https://gerrit.instructure.com/40254
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
This prevents open source installs from seeing file downloads break in
rails3. They can still set up sendfile explicitly by configuring their
web server and uncommenting the appropriate line, I've added
documentation to the production start wiki page:
https://github.com/instructure/canvas-lms/wiki/Production-Start#optimizing-file-downloads
relatedly, remove the unused send_file_or_data method.
Change-Id: I5e856b2ba50b0606330f86360d175c439ee1da50
Reviewed-on: https://gerrit.instructure.com/40357
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Our custom RequestContextGenerator middleware also sets a request id
header, which is heavily used throughout our infrastructure, so there's
no point in setting a second, unused request id header.
test plan: inspect response headers, there should be an
X-Request-Context-Id header but no X-Request-Id header.
Change-Id: If6964a6aaf20968299cb9e3762343be92822efa2
Reviewed-on: https://gerrit.instructure.com/40355
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CAT-465
Test Plan
1. Start canvas with full localization support enabled
(ie $ LOLCALIZE=true rails server)
2. Ensure the time zone select inputs on the course settings,
account settings, user profile settings and new user confirmation
pages are localized appropriately
3. Ensure the course and user profile time zone is localized
when not editing the settings
Change-Id: Ic9cb64986451a9a10925b716b727eae45b3b1806
Reviewed-on: https://gerrit.instructure.com/39435
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Houle <nhoule@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
closes CNVS-13322
Test plan:
* consume endpoints on the submissions api
* attachments should now include a "preview_url" (it will display the
document)
* document previews should still work everywhere in canvas
(speedgrader, files, tinymce)
Change-Id: Ic11725832fa55e0deedf3bbce4a8b6a84f4ea29a
Reviewed-on: https://gerrit.instructure.com/36423
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>