Commit Graph

41607 Commits

Author SHA1 Message Date
Gary Mei 1adcb0bc1e add View Ungraded as 0 view option to Gradebook
closes EVAL-622

Test Plan
- Enable the Feature Flag as a site admin.
- Verify that the Gradebook View menu includes "View Ungraded as 0".
- Select "View Ungraded as 0". Verify that this selection persists
  across page reloads of Gradebook.
- De-select "View Ungraded as 0". Verify that this selection persists
  across page reloads of Gradebook.
- Disable the Feature Flag as a site admin. Verify that the Gradebook
  View menu no longer includes "View Ungraded as 0".

Change-Id: I49792de1408a428955f42f272604a87b42d6d8d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248205
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
2020-09-30 18:47:39 +00:00
Robin Kuss 558dfc18c1 Add a few recent history selenium tests
Closes LS-1326
flag = recent_history

Test Plan:  jenkins passes

Change-Id: I4e7f4862f609a7842048f14fca4f4b788f3d8fc6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248753
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2020-09-30 18:26:46 +00:00
Aaron Ogata c14b877f6a don’t report aborted build as timed out
refs DE-295

Test Plan
1. Ensure that aborted build doesn’t report to slack
2. Ensure that timed out build reports to slack as warning
3. Ensure that successful build reports to slack as success
4. Ensure that failed build reports to slack as failure

Change-Id: I42117d95e4bf9808fcbed8b1f6def87815f06f66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248838
Reviewed-by: Ryan Norton <rnorton@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>
2020-09-30 17:13:16 +00:00
James Butters 46b4246656 skip flakey exportable specs
flag = none

Change-Id: I40ef1305b436e79ba63a295a3b3054e2e0a5e41a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248939
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-30 17:02:23 +00:00
Matthew Lemon 140a2428f3 use appointment group np overrides
Because we weren't passing in the course_id or root_account_id with the
message data we were ignoring any notification preference overrides.
This should fix that

fixes VICE-821
flag=none

TEST PLAN:
- Create and publish a course with a student in it
- Enable account notifications for scheduling on the student
- Disable course notifications for scheduling on the student
- As the teacher create an appointment group for the course
- Navigate to /users/<user_id>/messages and note that the message should
  not be present
- Reverse the previous steps and verify that the user does now have a
  message

Change-Id: Id58b4d316d697e6cf62775892c5a040ee3f6b8c3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248508
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
2020-09-30 16:02:15 +00:00
Andrea Cirulli 7e03f6cfb4 move dependencies_ hardcoded vars into canvas-builds
refs DE-296
flag = none

test plan:
- Ensure canvas-lms build passes using the new version of canvas-builds

Change-Id: I188d273fabfd29057dcff53f1bbb3c7e93e093eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248851
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-09-30 13:56:54 +00:00
Aaron Ogata 4196cdb7c4 clean-up FSC plugin path
refs DE-298

Test Plan:
1. Ensure FSC plugin build passes
2. Ensure FSC main build passes
3. Ensure FSC distributes selenium tests correctly

Change-Id: Ic60d34adb16e114700c69ec67834d56155dee2e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248876
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
2020-09-29 22:48:11 +00:00
Rob Orton 553b2fe558 fix race condition on report runners
this is very difficult to test, because it's a race condition, but the
test plan would work...

the changes are just plumbing through if the primary db should be used
or a replica, and then methods that have been well tested and used.

for parallel account_reports we write rows to account_report_rows and
then read from account_report_rows to generate the csv file. If this is
done on a replica, it can be lagging and not get all the records.
Typical reports, this would not be a problem because it is old data for
a report...
but when we just wrote the data it may not exist, so use the primary
database.

test plan
 - run a report with a primary database and read_only replica
 - pause replication
 - the report should work

fixes PFS-16619
flag = none

Change-Id: I93140ce8f566a4e0553377388d6296ec36d800cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248863
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark Valentine <mvalentine@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2020-09-29 22:47:34 +00:00
Cody Cutrer 1ef457fb23 cache all settings in a single multi cache entry
forces them to all get read at once, instead of having more
queries to the default shard as you need different settings

Change-Id: I672a5e1945495968ad96ac3e114e92a43bdb982b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248779
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-09-29 20:15:23 +00:00
Ethan Vizitei c7ec359537 debounce local cache clearing
closes FOO-1013

TEST PLAN:
  1) send a sighup to a box
  2) only ONE flushdb gets sent to local redis

Change-Id: I5af89014d21b79382cada9aa7b32eaa4e4e088b2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248800
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>
2020-09-29 20:09:46 +00:00
Aaron Ogata 0d6fe19a3a fix FSC for plugin builds
refs DE-297

Test Plan:
1. FSC works for plugin build
2. FSC includes all tests for incomplete / last partition
3. FSC properly balances tests across partitions

Change-Id: Ie2aa7bfbf37737b00184a4d1ce6c91fbd4a2ed4e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248840
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
2020-09-29 19:22:50 +00:00
Jeremy Stanley 59d54e62f7 fix closed captioning sidebar label
previously, the controls to add and remove caption files were
embedded inside their <label>, causing all controls to be read
every time any of the controls was focused

instead of using a label, use a fieldset with a legend

test plan:
 - enable RCE Enhancements and Edit Closed Captions features
 - select a video in rich text and click "Video Options"
 - add some caption files
 - turn on VO and navigate between languages
 - VO should read the focused option and the "Closed Caption/
   Subtitles" legend, not *all* options

flag = none
fixes LS-1456

Change-Id: If495b007e48a0d07124c2813f2ecc161b85e51cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248795
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-09-29 19:08:55 +00:00
Rob Orton 6931030d92 remove extra return check on error state
the next line checks that workflow_state is running and returns false if
it is anything besides running.

Change-Id: I38d9015b7e0ab8908d5e7b8ea957d69f0feff024
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248864
Reviewed-by: Mark Valentine <mvalentine@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2020-09-29 18:54:03 +00:00
Aaron Ogata eed894608d prevent building dev assets when production isn’t uglified
Change-Id: I7505edced788b306d9bb43997762564813be11c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248846
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@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>
2020-09-29 18:02:27 +00:00
Kyle Rosenbaum 025556caf3 bump rubocop version to 0.68.0 to support ruby 2.6
this changes upgrades to the earliest version of rubocop
supporting ruby 2.6 while also choosing a version that fixes
a breaking 0.60.0 change to revert psych version change.

namespace changes were made on multiple cops to support
the new rubocop version requirements as well as the change to
move performance cops out of the rubocop gem in to
rubocop-performance.

the Layout/IndentFirstParameter cop is currently broken but a
rubocop version upgrade will fix that. the FreezeConstants cop
also required a fix to handle nil types.

refs DE-289

test plan:
- ensure rubocop runs completely

Change-Id: I0ca68f426e287b5a973b96a4ae0e975f1cbc0240
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248786
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
2020-09-29 16:09:54 +00:00
Aaron Ogata 61527e8c47 balance FSC node usage
refs DE-291

Test Plan:
1. Ensure that node times are approximately equal.
2. Ensure that FSC refuses to use over 10 nodes.

Change-Id: I08352fa231bb4f4acb7e64c1a3974895e495f26b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248756
Reviewed-by: Ryan Norton <rnorton@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>
2020-09-29 15:43:30 +00:00
Jackson Howe ff92ddcdcd Allow direct share for teachers in concluded term
Previously, direct share options appeared for users with
manage_content rights in a course. This commit gives direct share
options to users with read_as_admin rights, so any teacher, TA, or
designer can direct share content, even if a course is concluded.

flag=none
Fixes LS-1409

Test plan:
 - Enable direct share on account
 - Create a term where "teachers can access from" is concluded
 - Add course to term
 - In the course as a teacher, verify that direct share functions from
   the following locations (also expect most other menu items to not
   appear):
   - Modules
   - Pages index and individual
   - Discussions index and individual
   - Assignments index and individual
   - Quizzes index and individual
 - Modify term settings to allow access for teachers always
 - Teachers should now see all menu items in above locations, including
   direct share
 - Students should never see any menu options in above locations
 - Disable direct share for account; verify that menus in above
   locations still function

Change-Id: I53b09ed0c535079ab4e811d58de18ab1ef7f6d3a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248214
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-09-29 15:21:21 +00:00
Andrea Cirulli 2933693d06 make the postgres build using the new wait-for-it script
Since we merged the postgres Dockerfile we can change the build to use
the wait-for-it script copied to the image itself.

refs DE-271
flag = none

test plan:
- Ensure the build passes with the new versioned postgres image

Change-Id: Ic42106fdaebefe097dd4c6fce70aae9fad027125
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248414
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-09-29 14:30:39 +00:00
Ahmad Amireh 012f8f8220 satisfy dependencies for css:compile task
refs FOO-966

the rake task "css:compile" depends on some artifacts from the task
"gulp rev" but that dependency was not specified. It worked OK most of
the time because they were run in parallel and the gulp one finishes
quickly

TEST PLAN
.........

- rm public/dist/rev-manifest.json
- run "bundle exec rake canvas:compile_assets" and verify it works

Change-Id: I9b758345ea83411ff7d4d956ef78def784a75df5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248816
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2020-09-29 01:37:29 +00:00
Cody Cutrer 42d6ba4f43 fix typo in migration
Change-Id: I461931817aa2f400569e884b9e3fee7470157a94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248785
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-09-29 00:59:54 +00:00
James Butters 985b6a23eb improve docker-dev-changes.sh
the current grep is including files we don't actually want, this
improvement will help narrow down to the file changes we actually
want to trigger the docker-dev build.

flag = none

Change-Id: I2d689ba9d00dd0955e4ea333f5f5fbd92c2f1f28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248817
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-09-29 00:13:25 +00:00
Ethan Vizitei 441290a4f8 lock vault for new lease
refs FOO-779

TEST PLAN:
  1) make many threads or processes try to load the same vault config
  2) only one should actually call vault
  3) they all should get a response

Change-Id: Ic5b778ab994bd964d930fd40fee936f42a4fd91d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248155
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>
2020-09-28 22:53:35 +00:00
Ethan Vizitei 2fc25f9fe1 reload from consul if subkey not found
FIXES FOO-1011
FIXES FOO-1012

Also write the trees of dynamic settings
stuff atomically so that clears don't
result in a partial config hash in the cache

TEST PLAN:
  1) store things in the dynamic settings cache
  2) explicitly clear the cache
  3) write a "true" value to the tree-level key
  4) fetch the subkey
  5) you should still get a valid value back from consul/file

Change-Id: I0f8bf524a6c03a2e6a6bba7fed3c199e6b179d93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248752
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>
2020-09-28 22:53:20 +00:00
Mysti Lilla ca60b98366 Resubmit submissions that should have originality reports
refs INTEROP-5767
flag=none

Test plan
- Specs pass

Change-Id: Ied05b5a09ed0c22b3015605c70b5a7ed87397ce3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247067
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2020-09-28 22:17:15 +00:00
Mysti Lilla 1cc85a6fcd Prevent assignments from creating plagiarism subscriptions
fixes INTEROP-5767
flag=none

Test plan
- Create a new plagiarism assignment
- Ensure the assignment configuration tool lookup
  doesn't have a subscription associated with it
  and that the subscription service didn't get
  called
- Ensure that the subscriptions do still send
- Also ensure that the tool_proxy_controller
  methods for recreate_subscriptions, destroy,
  and update all can still properly create
  subscriptions on the tool proxy

Change-Id: Ieca7eb74f385c1b253f2480b0bfe95d9dd336f94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246733
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
2020-09-28 22:16:58 +00:00
Mysti Lilla 7f7962e310 Add subscription to all LTI 2 Plagiarism tool installations
fixes INTEROP-6130
flag=plagiarism_tool_subscriptions (removes it)

Test plan
- Have a Lti::ToolProxy for TurnItIn or Urkund
  or some other Plagiarism service that does
  not have an associated subscription
- Run the data fixup.  Verify the tool has
  a working subscription

Change-Id: I21a85321caf1a735e0034661e175da3423548967
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246411
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
2020-09-28 22:16:32 +00:00
Ethan Vizitei 7990beb1e6 stop using plugin setting for state in AUA log compaction
Change-Id: I84a84dff5cc407e2ad39c87bd63087e8b353916d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248794
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-28 21:47:18 +00:00
James Williams a6afb7bc43 create hidden attachment on uploading media from rce
mostly unreverting g/221422

test plan:
  - in the rce, upload a video
  > expect it to show up in the rce
  - from the toolbar, select Media > Course Media
  > expect it to be in the list
  - go to /course/:course_id/files
  > expect it to be in the uploaded media folder
  > expect it to be hidden to students

flag=autocreate_attachment_from_media_object
closes #LS-1476

Change-Id: Ice0e4ec7baa27083092a1f0dd2fa0d7287ef7e87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248067
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-09-28 21:17:34 +00:00
Pat Renner 50f11b48fa use outcome proficiency ratings in SLMGB
closes OUT-3772
flag=account_level_mastery_scales

Test-plan:
- Ensure the FF is disabled
- Create a course with one student, an outcome,
and an assignment with a rubric aligned to that outcome
- Ensure the rubric is used for assignment grading
- Enable the LMGB under course settings
- Give the student a grade for the outcome (can use speedgrader)
The rest of the test plan assumes I gave the student a 3/5. Feel
free to use another scale and adjust later values
- Click on the student via the student’s name in the LMGB
(this will open up the SLMGB page)
- Note the score (3/5)
- At the account level, enable the FF
- Create an outcome proficiency with 20x the outcome
ratings (100, 60, 0)
- Go back to the SLMGB within the course
- Ensure ratings scaled - if the student previously
had a score of 3, they should now have a score of 60
(20 * 3)
- Grade the same student with another assignment
- Hop in the rails console and verify that the
LearningOutcomeResult associated with the old grade uses
the old outcome scale (specifically, look at `possible`
and `score`). Ensure the newest result uses the scaled
outcome proficiency values for those same fields
- Delete your proficiency and calculation method for the account
via the rails console. Verify that the SLMGB reverts to
using the original outcome values
(this will be fixed after OUT-3922)

Change-Id: Iac888e6eeb929c031559456e2edb9f3bfce4c611
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248109
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
2020-09-28 20:49:07 +00:00
Jeremy Stanley b92cc97fc5 direct share: don't add duplicate module items
test plan:
 - use direct share to copy an item to another course, selecting
   to add the item to a module in the destination course
 - modify the item in the source and copy it to the destination
   again, selecting to add it to the same module in the
   destination course
 - there should only be one copy of the item in the destination
   module

(NOTE: if the item is already present in the module, the
insert position will be ignored. I thought about moving the
existing item but I'm concerned that this will break module
item sequences that students may already have in progress;
also, it's possible the item may be in the module more than
once, in which case which one would we move?)

flag = direct_share
fixes LS-1390

Change-Id: I9484baab0f64810f02439a0e577ceeda89e9ee9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248659
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-09-28 20:22:32 +00:00
Pat Renner 290c971d53 add SR alert for files in discussion reply
closes OUT-3956
flag=none

test-plan:
- Create a discussion in a course with at least
one student
- As the student, visit the discussion
- With VO, ensure that the filename is announced when
posting a file attachment within the discussion reply
- With FF and NVDA, ensure a SR alert is announced when
uploading a file within the discussion reply

Change-Id: I7c35ef89058970c099efa79d23105725ab407e68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248009
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
2020-09-28 19:31:41 +00:00
James Williams 296717e708 prevent new migrations from rewriting attachment migration ids
test plan:
* have a blueprint course with a file
* sync to an associated course
* export the blueprint course
* import the export file directly
  into the associated course
* the associated course should have two files
* make a page in the blueprint with a link
 to the file
* syncing to the associated course should
create a page that still has a valid file link

* create a new course with a file
* copy the course into the blueprint
* sync the copied file to the associated course
* now copy the new course again into the
 associated course
* the associated course should have two files
* create another page in the blueprint referencing
 the copied file
* syncing to the associated course should
create a page that still has a valid file link

closes #LS-1496

Change-Id: I0549dd4b36c3235654b98f6cc825597b91878c2c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248481
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-09-28 18:26:40 +00:00
Andrea Cirulli 4c7ab8e6e8 move publishable_tag hardcoded env var into canvas_build
Move the hardcoded var PUBLISHABLE_TAG used from Jenkinsfiles in
canvas-lms to be configurable into canvas-builds

refs DE-282
flag=none

test plan:
- Ensure canvas-lms build passes using the new function to get the
PUBLISHABLE_TAG

Change-Id: I4cbb7662282a7754ecb2c994abc1cb0c372cc70d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248584
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-09-28 18:15:14 +00:00
Cody Cutrer 4211945c1f use shard settings, not Setting, for common core group id
Change-Id: I3324d727ea16760c4b28a0b8d0d3cbea676948a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248463
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-09-28 17:22:17 +00:00
Cody Cutrer 57e443f0d3 apply developer key caching to _all_ associations
Change-Id: I16eee9b300150f1ece0588fe80eccd6485f7f8d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248460
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-09-28 17:17:48 +00:00
Cody Cutrer da248d70ea adjust caching for account notification queries
the general goal here is to get the query for site admin notifications into
MultiCache, and for longer than say 10 minutes at a time. the former is
accomplished by detecting when we're about to query for _only_ a root account,
and use MultiCache. don't do it if the query is going to be for sub accounts.
the latter is accomplished by loosening the time conditions in the query to
include all of today (UTC; the rollover isn't important), and then post
process what we get back from the cache to actually filter to 'now', allowing
the same cache to be used for 24 hours, while still reasonably filtering
out old dead stuff. none of this applies if we're asking to see _all_ old
notifications

Change-Id: I0284c1c539593565a98cbd9f78746605f88671ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248450
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-09-28 16:52:07 +00:00
Davis Hyer ad3ac299da transpose_ids in html body to be shard aware
fixes VICE-623

Original attempt to fix this was made on https://gerrit.instructure.com/c/canvas-lms/+/244178.
This issue was a result of the Announcement/DiscussionTopic
models not having a RootAccount association in spite
of having the associated foreign key. MRA attempted
to use the context's root account for domain lookup
(see lib/multiple_root_accounts/extensions/host_url.rb)
Instead, we now use the linked root account as is
already determined by the Message itself.

Due to the separation of functionality, testing for the
full flow was decided against given the complexity and
small ROI.

test plan:
  - set up two accounts with a trust (hmu if you need help)
  - in one account, create a course
  - enroll a user from the other account into that course
    - ensure the user is set up to receive notifications
      for discussion topics
  - create an announcement in the course
    - add a link to the announcement to content in that
      account
    - publish the announcement to trigger a notification
  - check the content of the user's message
    - the link should point to the correct domain for
      the second account

qa risk: med; this has already caused issues on production

Change-Id: Ib643c5ce7a8ab78783f28253d7e42935fdf3d25b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248491
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2020-09-28 16:35:53 +00:00
Aaron Ogata c55ee5f1d3 merge Jenkins node labels
Looking at Jenkins node usage, we're seeing that rspec / normal docker executors can be sitting idle while waiting for a selenium executor. There shouldn't be a difference between their configurations, so let's see how it affects the queue times if we make all stages use the same type of node.

refs DE-276

Change-Id: Ic8f9ffe8d148dc9119d1e456e689b46973a1fb3b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248114
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-09-28 16:27:22 +00:00
Aaron Ogata c3f7f55de3 use rspec dry-run to split test blocks
refs DE-286

Test Plan:
1. FSC passes when running against blocks

Change-Id: Ied2b077e78f401744499f0f70a5c976cc8fdafcd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248161
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
2020-09-28 15:19:11 +00:00
Service Cloud Jenkins 66668e2a98 Update parallel_runtime_rspec.log from build 90
Change-Id: I1e27fbbd7f33f2c8c4a5e25ecefb3005542d2826
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248714
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-09-28 14:25:20 +00:00
Aaron Ogata 894697a01c re-use main node when running multiple FSC nodes
refs DE-288

Test Plan:
1. Ensure FSC runs with single node
2. Ensure FSC runs with multiple nodes

Change-Id: I30a7ec4fa60970900e149da4c15e05512fc59115
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248486
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-09-28 14:17:41 +00:00
Jenkins 07915897d9 update fa translation
Change-Id: Ie56d243358acb0b4fe5e465eb59d556dfdf504ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248737
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-28 05:55:25 +00:00
Jenkins a6fd08cbde [i18n] Update package translations
Change-Id: Ifbb17614ea9b74cbb298bc7c701f6012ad7a405d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248713
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-27 04:55:04 +00:00
Jenkins 46b8c9a2f5 update fa translation
Change-Id: I05b457fd57ecf010c1ac440baff874c365ae9d6e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248680
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-26 05:53:34 +00:00
Jenkins 56d1e16831 [i18n] Update package translations
Change-Id: I119e03764d59fd78c9a190ab1d910f8a2776664c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248679
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-26 04:56:55 +00:00
Jacob Burroughs 9abd0d66c3 Keep a tiny bit more ruby 2.4 compatibility for oss
This is really only for picking to old releases

fixes GH-1707

Change-Id: Idadcb4a6ec599f068ff4140b733742f54e4b15a7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248673
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2020-09-26 00:40:41 +00:00
Ethan Vizitei 21da536029 prevent local cache race condition
fixes FOO-1010

Change-Id: Icd9867e1ce82212f436ea1933e90c02e7c2b8c48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248664
Reviewed-by: Jacob Burroughs <jburroughs@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>
2020-09-26 00:36:22 +00:00
Pablo Marti 5b7df5a164 remove outcome results of test student on reset
on reset test student it removes the outcome results just
for the test student and with that it will remove a
warning message when editing the related outcome

fixes OUT-69
flag=none

test plan:
- Create a rubric and link it to an outcome
- Create an assignment and set the rubric previously created
- Enter Student View
- Send a submission to the assignment
- Exit Student View
- Give an assessment to the student (to the rubric and outcome)
- Enter Student View
- Reset Test Student
- When editing the Outcome no warning message should be
displayed with the message 'This outcome has been used
to assess a student and some edits will affect students results'

Change-Id: I42a4393cfdb1bca623cc609ae58a87385a1ee12c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248441
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-09-25 21:06:29 +00:00
Alex Slaughter a1112c340b Add root_account_id for quiz_submission_event
Test plan:
 - Specs Pass

Fixes: QUIZ-7766, QUIZ-7764
flag = none

Change-Id: I57c13defb93e559823a41fd91dbaab1f6f1ca7c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248622
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2020-09-25 20:13:01 +00:00
Jeremy Stanley 3f91ea9850 export/import new RCE media objects
test plan:
* you will need a working notorious setup for this.
* with new RCE off and on,
 - create a media object in course content
 - export the course to a common cartridge
 - import the course
 - verify the media object works in the new course
   and has a different media id (inspect the HTML)
 - test course copy and verify the media object works
   in the destination course (and has the same media_id)

fixes LS-1451

Change-Id: I662441e8b09fb982842f16404588c0813c086ad6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247423
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-09-25 19:48:39 +00:00