Commit Graph

43006 Commits

Author SHA1 Message Date
Jenkins fb18aa13d3 update ru translation
Change-Id: I47b52148a67e9068225e12d64d477ee181a7d3fe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256820
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:50:45 +00:00
Jenkins 182a3a4dab update pt-BR translation
Change-Id: Ie5ba59f4cf190178ed505486a0529bd7af00c546
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256819
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:50:22 +00:00
Jenkins 84d1c76483 update pt translation
Change-Id: I85ee4f3d34eac4da0b8eb7b21bcb0753d60ba6cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256818
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:50:01 +00:00
Jenkins 18f2e1e12a update pl translation
Change-Id: I230237c6a23057bd606a7e7690f67e32194d380b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256817
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:49:39 +00:00
Jenkins 41e9741f5e update nl translation
Change-Id: I0c11a8609dff97fffbe9756dbd1e48d4227a9977
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256816
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:49:18 +00:00
Jenkins 982dd7e7b8 update nb-x-k12 translation
Change-Id: I9b315299849cee4a14d64f15b20cff575e030365
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256815
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:48:56 +00:00
Jenkins 003dbcb327 update nb translation
Change-Id: I965e1fa634dc8623ab5496f27321d7d45f6d6cbd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256814
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:48:36 +00:00
Jenkins 073e2a3ea2 update mi translation
Change-Id: I0bb08a0318507aa6451130ad497fffaa2950aeaa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256813
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:48:14 +00:00
Jenkins e34b5df8e6 update ja translation
Change-Id: I89b42f38f4ab683c37877383288f80e0f027d659
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256812
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:47:53 +00:00
Jenkins 3c283fb7f8 update it translation
Change-Id: If1b3f1bbb628e01b91bf4125aa524f34c137bf02
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256811
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:47:28 +00:00
Jenkins 324cda1272 update is translation
Change-Id: I5e0c6832b9a68bd194a853fd46c6d4adf0f6ef30
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256810
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:47:08 +00:00
Jenkins e95f859b5b update ht translation
Change-Id: I2fd27a34e1606b9f82640af8cdfe3eb6e9f43c19
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256809
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:46:47 +00:00
Jenkins f845c9660a update fr-CA translation
Change-Id: Ibe44b3c1f6d6051342c86a9fd4f81e34d5dac8ea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256808
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:46:27 +00:00
Jenkins f3e7fdf2d6 update fr translation
Change-Id: I3f8ea94b08c0643c99373e5fb7c2858ffaa91776
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256807
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:46:05 +00:00
Jenkins 1e2a483bbd update fi translation
Change-Id: Ibf631fb1225ccf85418528f2cc0b114188f3b9c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256806
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:45:43 +00:00
Jenkins 92fa543d94 update es translation
Change-Id: If533e704e371164a1f46d79afbcdd92ec9760c6f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256805
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:45:23 +00:00
Jenkins 5cdf602fa6 update en-GB translation
Change-Id: Ie9e592ae2bfdb9e25a607388901454b25f4542df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256803
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:44:50 +00:00
Jenkins 715e3fec7d update en-CA translation
Change-Id: I352ede53dcb2dc2e9a05bd0909d54aac18ffaaf3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256802
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:44:28 +00:00
Jenkins 92bc3e7412 update en-AU translation
Change-Id: Ica0851c9fdb82f7baf758cf63ed34ffba2faf4e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256800
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:43:57 +00:00
Jenkins 0d0d1a621e update de translation
Change-Id: I46acae381ad4452935116dba8e5f26724511f83b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256799
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:43:36 +00:00
Jenkins 1863b398f0 update da-x-k12 translation
Change-Id: Ibef5f7d09be3e1f70f578b795dce3f0c8bfe3c10
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256798
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:43:14 +00:00
Jenkins 65822b9c3b update da translation
Change-Id: I49b12d3c813ae5d3728be861b57bde6a28e011c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256797
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:42:54 +00:00
Jenkins cadfd30c96 update cy translation
Change-Id: I0a188babed45df1c417f5dc15a79d3c91a38daeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256796
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:42:32 +00:00
Jenkins e096ceaf93 update ca translation
Change-Id: I356372cc5aa7524398724275ebe471161f24b0a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256795
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:42:12 +00:00
Jenkins ba353bd136 update ar translation
Change-Id: Ibdb8412496fc82d9143c28228c473398c5514f2b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256794
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-15 05:41:52 +00:00
Caleb Guanzon ec98865ec8 implement privacy notice to new account notif prefs.
fixes VICE-1026
flag=notification_update_account_ui

test plan:
- make sure that in your site admin feature flags,
 Account level notification preferences UI update is

- in your root account settings page, go to notifications tab,
check Display one time pop-up warning on Notification Preferences page.

- now, as a user who hasn't seen the popup warning before,
visit /profile/communication

- verify that you see 2 alerts, where the second alert
shows the privacy notice

- close this privacy notice alert

- reload the page, and verify that you no longer see
the privacy notice alert

- as a different user, visit your course notification overrides page

- verify that you do not see the privacy notice alert

- now, visit your profile notifications page

- verify that you see the privacy notice alert

- dismiss the alert, and reload the page

- verify that you no longer see the privacy notice alert

Change-Id: I06552231f48a716333384f59e616e074d10c5030
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256566
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2021-01-14 23:34:50 +00:00
Wagner Gonçalves 12619c3320 change GradebookService to find an active user properly
closes INTEROP-6110
flag=none

Change GradebookService to find the active user when the specified
was merged.

When user A is merged to user B, the name and roles API
(api/lti/courses/:course_id/names_and_roles) returns the user B (active)
with the lti_id of user A.

Using this lti_id, and attempting to grade a line item using the score
api (api/lti/courses/:course_id/line_items/:line_item_id/scores), an
unauthorization error is raised.

If the user is deleted we need to check to see if there has been a
user_merge. If there has been a merge, return the merged user, otherwise
we return `nil`, so we'll not not return the deleted user anymore.

test plan:
* In Course context, we need to have two users with Student enrollment;
* Accessing the name and roles API, we will see the two active members with
their lti_id;
* Merge one user in the other one (User A -> User B);
* Accessing the name and roles API, we will see the user B active with
the lti_id from user A;
* If the course doesn't have line items, we can use the line items endpoint
(api/lti/courses/:course_id/line_items) to create one;
* Accessing the scores API using the user A lti_id, the response of the
request should  be successful instead of unauthorized (as is happening
today);

Change-Id: I3d23b9ce96c725b91e920e73705ba952140090fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255789
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
2021-01-14 23:03:50 +00:00
Mysti Lilla 95fad766ff Truncate recursively_fetch_previous_lti_context_ids at 1000
fixes INTEROP-6390
flag=none

Test plan
- Perhaps best to test this on test with one of the
  problematic courses...
- But I guess set it up with a smaller number of
  courses and ensure it still looks correct

Change-Id: Ibb7d1716451c11146bc3069d4e5b0ac24a35be1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256656
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2021-01-14 22:52:34 +00:00
Ahmad Amireh 46f8efd61f modernize canvas_quizzes
fixes FOO-1409
flag  = none

no more client_apps, canvas_quizzes now lives as part of canvas-lms
proper inside app/jsx/, which makes the build leaner and leaves us with
one less thing to reason about

logical changes:

- converted from AMD to ES modules
- upgraded to recent react + react-router
- dropped RSVP in favor of native Promises
- used CanvasModal instead of home-grown Dialog
- removed dead code; notifications in particular were fishy as there had
  no dependents at all and did not even show up in the graph
- ported tests to Jest, added more unit ones and two integration ones
- removed "config.onError" and now throws errors where appropriate
- disabled console statements in non-dev

:: test plan ::

- create a (old-school) quiz containing all types of questions
- as 3 distinct students, take the quiz and try to randomize your
  answers

at this point it's helpful to have a reference to compare the screens; I
replicated the quiz on my production sandbox for this

- go to /courses/:id/quizzes/:id/submissions/:id/log
  - verify it looks OK
  - click on a specific question in the stream and verify the question
    inspector widget works OK
  - go back to stream and push "View table"
  - verify the table and its controls are OK

- go to /courses/:id/quizzes/:id/statistics
  - verify it looks OK
  - click on ? in the discrimination index chart and verify it displays
    a dialog with help content
  - click on "X respondents" in one of the charts and verify it displays
    a dialog with the respondent names
  - verify the interactive charts do interact as expected (no logic
    changed here so just a quick glance)
  - link to "View in SpeedGrader" for essay-like questions works

Change-Id: I79af5ff4f1479503b5e2528b613255dde5bc45d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256118
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-01-14 22:45:10 +00:00
Kyle Rosenbaum a4e1da3aea add the ability to run parallel rspec processes in container
refs DE-225
flag=none

By specifying RSPEC_PROCESSES, we can now run multiple
rspec processes in a single container. This change modifies
the existing database setup to create 1 database per rspec
process. This also impacts results.xml using a 1 results.xml
per rspec process.

Rename database key to db for redis configurations to match
current version of redis.

test plan:
- rspec runs as expected in single threaded mode
- rspec runs as expected in multi threaded mode
- results.xml contains valid results with no duplciate tests
- reruns only run for failing threads
- reruns work in single and multithreaded mode

Change-Id: Ib2e549d467e8a6d8fef9914f2733d9ddfa460e99
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255120
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-01-14 21:12:45 +00:00
Jared Crystal 896ec8af70 show all NQ & QO together in the "add to module" modal
closes QUIZ-8081
flag=new_quizzes_modules_support

test plan:
 - create a module in a course
 - create some classic quizzes and some new quizzes in the course
 - on the modules page (also test by making modules the course home page),
   click the + to add content to a module
 - with the FF disabled, only classic quizzes
   should show when Quiz is selected from the dropdown
 - with the FF enabled, both classic quizzes and
   new quizzes should show together (alphabetized)
   when Quiz is selected from the dropdown

Change-Id: Ice394a3af4d88eed9441e9d7be71e87b8486e56d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256199
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
2021-01-14 19:38:33 +00:00
Kyle Rosenbaum 852dcd7d03 tag images with number of threads used when running migrations
refs DE-419
flag=none

test plan:
- migrations add tag suffix with default of 1
- tag exists in starlord

Change-Id: Ic06173dcaa07042c7caf3fcc0175db4681e8a057
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256666
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2021-01-14 18:24:13 +00:00
Ethan Vizitei 7c12fe1cbb wrap network errors to inst-fs in service exception
closes FOO-1467
flag=none

TEST PLAN:
  1) disable inst-fs
  2) network errors should get
    reported as service errors because
    we already have error paths for those.

Change-Id: Ib8cd10d05156b809e78602d24a6a6d92f10465ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256728
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-01-14 18:17:37 +00:00
Michael Ziwisky a8133a1e3d rails 6 fixes
ActiveRecord::ConnectionAdapters::SchemaStatements#foreign_key_for
needed to update its signature because
ActiveRecord::ConnectionAdapters::IndexDefinition#defined_for? was
updated in https://github.com/rails/rails/commit/fd18b98 to only take
keyword args.

PostgreSQLAdapter#translate_exception signature changed too

Change-Id: Ib642f6fa63b11fe5955e8e271112166aa089d226
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256301
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-01-14 18:03:31 +00:00
Ahmad Amireh a281e066e1 extend JS source files without relying on filepath
fixes FOO-1435
flag  = none

instead of the bundler inferring the source file that an extension is
meant for based on filepath, a plugin is now expected to explicitly map
each source file to the extension file in its package.json manifest

    {
      "canvas": {
        "source-file-extensions": {
          "path/to/a.js": "path/to/extension-to-a.js"
        }
      }
    }

this allows extensions to continue working even when the path of the
source file no longer matches that of the extension inside the plugin

== test plan

- visit a page that contains an extended module and verify the extension
  is still applied

Change-Id: Ida7d75b87aedc519502c969e6912a335af69abc0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256222
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-01-14 17:15:06 +00:00
Adrian Packel 2892f8edb4 Escape names in student name cells
fixes EVAL-1411
flag=none

Test plan:
- Have a course with a student with a name like:
  Student "/> <img src=x onerror=alert(2)>
- Open Gradebook
- You should not get a Javascript alert
- Change the option for student name sort order and check that you still
  don't get an alert

Change-Id: I65358d13821cb96d98b59f4179e455b580338b8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256677
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-01-14 16:50:22 +00:00
Jackson Howe 7468c01fa6 Add h1 to All Courses page
For a11y reasons, convert the 'All Courses' text at the top of
All Courses page from h2 to h1. The other headings on the page are
all h2.

fixes LS-1736
flag = none

Test plan:
 - Go to All Courses page and inspect the heading at the top
 - Expect heading to be h1

Change-Id: I67713f7742fc555bd84446b6fd6ee6c3de9370f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256660
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2021-01-14 16:21:11 +00:00
Aaron Ogata 360ddf34a0 improve lint:browser-code debugging
refs DE-465

Change-Id: I560c445ee7bd4b501686bb10bc4ffb64b4b910ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256692
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-01-14 16:18:14 +00:00
Ethan Vizitei acb9563ada fail gracefully on a bad tool launch url
closes FOO-1464
flag=none

TEST PLAN:
  1) scrub a launch by forcing a silly url
  2) you get a flash error rather than an app-level
     500

Change-Id: I38ac55d85f505e62fc7368da6026e19cf4573a06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256673
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-01-14 15:48:28 +00:00
Ethan Vizitei 953d36b70f fail gracefully in the absence of an oauth session
closes FOO-1462
flag=none

TEST PLAN:
  1) hit the deny endpoint with no session info
  2) you should get a 400, not a 500

Change-Id: I0cf286e283bdad12c9bd65a6a53b8bd052a3d3ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256669
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-01-14 15:48:12 +00:00
Ethan Vizitei 5db8cabc8c guard clause for missing params in pseudonyms
closes FOO-1463
flag=none

TEST PLAN:
  1) update a psuedonym through the API
     but pass no login parameters.
  2) you should get a 400 for a bad request,
     not a 500 from an explosion

Change-Id: Ic5a9a87cc6c54337dfbdc91d756aa5196dfe1b03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256670
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-01-14 15:48:09 +00:00
Aaron Ogata f2b1a73108 output docker logs upon failure
refs DE-405

Change-Id: Ibc0fb950ee7e08495feec2239c2b15e6e3ae9a2d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256586
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-01-14 15:34:25 +00:00
Aaron Ogata a20e69ecc9 enforce yarn.lock deduplication via linter
refs DE-397

When upgrading packages through yarn, the yarn.lock file tends to become bloated with multiple versions of the same packages, even if the latest version is compatible with all of them. Enforcing the yarn deduplicator allows us to keep the file as tidy as possible.

Test Plan:
1. Ensure that the linter passes when the file is properly deduped.
2. Ensure that the linter fails when the file needs to be deduped.

Change-Id: Ib606f7ab2c40dcb29bec7ba1c8cb7af2c8611f97
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256675
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-01-13 22:55:43 +00:00
Aaron Ogata 149f47778b deduplicate yarn.lock
refs DE-397

De-duplicating yarn.lock is necessary for some future InstUI upgrade work. In order to do this, we need to patch karma-webpack to avoid watching too many files within our JS job. We also need to pin babel-plugin-dynamic-import-node to the latest to work around a breaking change that causes “request of a dependency is an expression”.

Both of these version pins are work arounds and will be addressed by our efforts to upgrade webpack to v5.

Test Plan:
1. Ensure that “yarn dedupe-yarn” does not produce any file changes.
2. Ensure that the “JS (Karma)” job does not produce any warnings like “request of a dependency is an expression”
3. Ensure that the “JS (Karma)” job does not produce any warnings like “System limit for number of file watchers reached”
4. Ensure that Canvas front-end builds & behaves properly

Change-Id: I94d77bd775bc12f9f96ac44640c862ff3e3dee79
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256674
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2021-01-13 22:55:36 +00:00
Jeff Largent 3ee1d2d747 Fix filtering when direct sharing concluded courses
Addresses mis-handling of the `include=concluded` query parameter when
filtering destination courses for direct share or course copy.

fixes LS-1787
flag = direct_share

Test plan:
  - Create a course with at least one assignment
  - Create a second course with an end date in the past
  - Ensure a teacher has an active enrollment in both courses
  - In Course 1, select the "Copy To..." option for an assignment
  - In the tray that appears, ensure that Course 2 appears in the
    typeahead list
  - Ensure that you have at least 2 eligible courses in the tray
    (repeat step 2 if you have to)
  - Type something in the typeahead that would only match a subset of
    the eligible courses
  - Verify results are filtered to only those courses

Change-Id: I326f3c14be6c6874998c42a53a01fef7089339a2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256672
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeff Largent <jeff.largent@instructure.com>
2021-01-13 21:36:28 +00:00
Han Yan 59674c925b fix resource_link_id in gradespeeder launch
closes QUIZ-8106
flag=none

test plan:
- complete a NQ student submission
- in speedgrader, launch a student submission
- in devtool/network, make sure `context_id` and `resource_link_id` are
  different, and `resource_link_id` is assignment.lti_resource_link_id

Change-Id: I30b2e929bd31e1241776c1ad838432bd8e2e5cec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256408
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Han Yan <hyan@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-13 20:42:42 +00:00
Ethan Vizitei abf83a1573 never double render on lti launch
closes FOO-1460
flag=none

TEST PLAN:
  1) try to launch a misconfigured tool
      via "retrieve"
  2) you should get the flash error or a 401,
     not a 500 due to double rendering

Change-Id: I0d1fac07a867905ebabf5aec25bb4bf929748d42
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256668
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-01-13 20:38:05 +00:00
Caleb Guanzon 6dc35965a6 add h1 to user profile page
flag=none
fixes VICE-1042

test plan:
- In your root account settings page,
   check Enable Profiles and save
- visit /profile
- Open your screenreader
- verify that it reads the hidden h1 as User Profile

Change-Id: Ia7f770d4d9a1fb5ed6dfde15fb61a9daf5820127
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256551
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2021-01-13 19:58:17 +00:00
Matthew Lemon 3ebb7e7a07 add asset string interface to graphql
Also adds the interface to CourseType, EnrollmentType, and GroupType

fixes VICE-1086
flag=react_inbox

Test Plan:
- navigate to /graphiql
- run the following query:

```
query MyQuery {
  legacyNode(_id: <user_id>, type: User) {
    ... on User {
      id
      email
      enrollments {
        course {
          assetString
        }
        assetString
      }
      groups {
        assetString
      }
    }
  }
}
```

- the result should return the asset strings for the specified resources

Change-Id: If56d5d63fdf0af5658ee52aa6bb2d823b0ee59eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256657
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-13 19:13:40 +00:00
Bryan Petty 3940d4690a minor linux docker development tweaks
This adds an additional check in the git install_hooks script to see if
the hook is already set as executable before attempting to chmod it. So
if it's already setup manually, or outside of Docker first, and file
write permission hasn't been granted to Docker, it doesn't fail even
though it's already done.

This also adds a new environment variable:
- CANVAS_SKIP_DOCKER_USERMOD: If defined, the Docker image build
  disables the inefficient usermod functionality, even if you're running
  Linux, the same way it does everywhere else. You would want to use
  this if you have solved Docker bind-mounted filesystem permissions
  another way.

flag=none

Test Plan:
- On Linux, export CANVAS_SKIP_DOCKER_USERMOD=1;
- ./script/docker_dev_setup.sh
- Verify app containers still run with "docker" user as UID 9999.
- Verify no changes on OSX.

Change-Id: I5bdb4ce21e9a41dec2bb99d4284ac73a067f5899
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256275
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
2021-01-13 18:48:08 +00:00