Commit Graph

40244 Commits

Author SHA1 Message Date
Mysti Lilla d5ddea29b1 Add associated_integration_id to plagiarism live events
closes PLAT-5766
flag=none

Test plan
- Planning to test this on beta once it's there
  as that will be easier than trying to test it
  locally
- We'll want to install a fresh Plagiarism tool
  at an account
- Verify that the plagiarism subscription IS receiving
  events for assignments that are linked to the tool
- Verify that the plagiarism subscription IS NOT receiving
  events for assignments that are not linked to the
  tool
- Verify that regular subscriptions are still receiving
  events for both linked and non-linked assignments

Change-Id: I59a1f5f6d1c061dfcd50c1efa2788173875d2231
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240369
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Guymon <mguymon@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2020-06-19 20:27:27 +00:00
Matthew Lemon d4c4a58f74 set root_account_id on calendar_events
fixes VICE-337
flag=none

/ ---- ---- \
| Test Plan |
\ ---- ---- /

- Create a calendar event
- Open your rails console and grab that event
  - ce = CalendarEvent.last
- Verify that the calendar event has the `root_account_id` set

Change-Id: Idb170103a71711dd87d37fe77968b89986f1965c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240639
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-06-19 19:16:46 +00:00
Ed Schiebel 65de2ba0fa Guard against no @current_user in fullstory code snippet
Under some circumstances I cannot reproduct, the fullstory snippet
gets loaded when there is no @current_user defined, which blows up
the call to FS.identify(@current_user.global_id) preventing the user
from loading the login page. This PS adds a guard
so that we don't load the snipped if there is no user.

We think it may be caused when the session times out rather than actively
logging out?

closes LS-1145
flag=enable_fullstory

test plan:
  - do whatever Robin did to make it happen and see that it doesn't?

Change-Id: Id1722a63befceee36d3c40dd1b1305ea931ed06f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240647
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-06-19 18:45:27 +00:00
Drake Harper 8183d4f112 Add informative text to past global announcements
Test plan:
-verify informative text is shown on both tabs in global announcements

closes VICE-555

flag=past_announcements

Change-Id: Ic70b9f6d7abb9fd0c44f53a086669a6f5c2e00a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240421
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Laura Leavitt <lleavitt@instructure.com>
2020-06-19 16:55:57 +00:00
James Williams 56effa3991 implement conditional release assignment releasing on grading
test plan:
* enable the native conditional editor (see plan for g/239985)
* set up a course some assignments assigned to "Mastery Paths"
 so they're only visible to students with overrides
* use the editor to create a trigger assignment that can
 release the hidden assignments
* as a student, submit to the trigger assignment
* as a teacher, grade the trigger assignment with a
score that will release a hidden assignment
* as the student, confirm that the newly released assignment
 is visible

closes #LS-1062

Change-Id: Id17a06807c8c668ec95c86acc6f95846c5394efc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240338
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: James Williams <jamesw@instructure.com>
2020-06-19 16:46:52 +00:00
Charley Kline 01d434fab0 Fix up some <Table> usage to comply with InstUI 7.0
Refs USERS-624
flag=none

A bunch of calls to the InstUI <Table> component are
still using "plain old HTML" <tr> <th> <td> etc inside
them, which is a no-no as of InstUI 7.0. This commit
addresses some of them (about half, I think).

Testing this is mostly a matter of observing the affected
displays in the UI and making sure they still look normal.
Note that some subtle changes to the UI may have occurred
due to the InstUI Canvas theme being used rather than the
original Canvas CSS, but everything in here looks just
fine to my eye.

Test plan:
* all tests pass
* The "act as" modal dialog still looks good
* Adding people to courses (duplicate section, missing
  people section, and the "people ready list") still
  all looks good
* Developer key table still looks good

Change-Id: I20d2c0c88d9050eb73be33e8c26c951a90bc6160
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240161
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2020-06-19 15:00:01 +00:00
Jackson Howe f0b8f0ab2c Change 'view feed' link in calendar to make more accessible
In the calendar feed modal (on /calendar), there is a link to view the
calendar feed. This link is ambiguous to SR-only users, so this commit
changes the link text to make its purpose more clear.

Fixes LS-1134
flag=none

Test plan:
 - Go to /calendar
 - Click 'Calendar Feed' in right sidebar
 - Link should say 'Click to view Calendar Feed'

Change-Id: I61eff0594655b092e866ed82fd88c0e92f7f7ba6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240517
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-06-19 14:57:58 +00:00
Jeremy Stanley af6a38619c add progress bar for content migration uploads
test plan:
 - you should see a progress bar appear while
   uploading a file for a content migration
   (zip, common cartridge, etc.).
 - the spinner should not appear when a
   progress bar is present
 - the spinner should still show up for migrations
   that do not involve an upload (e.g., course copy)
 - if you attempt to upload a file that would exceed
   your quota, the progress bar should not remain visible
   and the submit button should not stay "Uploading..."
 - if you complete a migration upload and start another,
   you should not briefly see a 100% progress bar
   appear before going back to 0 and starting again
 - if you attempt to start a migration that requires an
   upload without actually choosing a file to upload,
   you should get an appropriate error and the
   "Uploading..." message should not persist

closes LA-1112

flag = none

Change-Id: I632885b1b8cf257f087cda9577867e2a21840785
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239555
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-06-19 05:30:56 +00:00
August Thornton 50d042af15 accept the last page view send beacon request
Page view interaction is capped to a minimum of 5 seconds to a
maximum of 10 minutes or 600 seconds.

If self.interaction_seconds(or an instantiated PageView object) is nil
we will default to 5 seconds

If seconds > 5 we'll return the interaction_seconds to the UI
else we'll return the string '--' in place of interaction_seconds

In application controller we do a before_action `set_page_view`
if it's a user request and the request method is GET. We do an
after_action `log_page_view` if it's not a user request, but Javascript.
We explicitly look for `is request.xhr?` before logging the page view
and interaction seconds. For us to log the last page view without it
getting cancelled on page unload is by firing off a `sendBeacon()`
HTTP request. For this request to make it through the `log_page_view`
method we need to identify it by the proper response format and make the
strict XHR check be an OR.

fixes USERS-14
flag = none

Test plan:
* turn on page views
* go to a page and sit there for more than 30 seconds
* clear your rails log and your browser log
* click to go to a new page
* you should see a request in your browser Network log to
  page_views/xxxx-xxxx-xxx-xx-xxx?page_view_token=xxxx
* look at your rails server logs, you should see something like:
  Processing by PageViewsController#update as */*
  Parameters: {"interaction_seconds"=>"1005”, …
  ”id"=>"36bcbd62-3a11-44bc-8dd2-69410050ff74"}
* as an Admin check that user's page views and verify in the
  Time column an integer representing seconds of page interaction
  is logged for the proper route used to test

Change-Id: I972011058201997661a83c1b9365f5971e0ca72f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240128
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
2020-06-19 00:17:37 +00:00
Jacob Burroughs 8e9cac93eb Make account registration work for keyboard only
Change-Id: Iaa882c863e1ea540bc1cd6a61313507cccfea741
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240098
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-06-18 22:17:11 +00:00
Rob Orton e4042959c3 stop creating policies for secondary emails
test plan
 - send a message
 - message should send
 - specs should pass
 - should not send duplicate messages

flag=none
fixes VICE-506
fixes VICE-538

Change-Id: Ief7f09db4fdfc78864be9a537902e6863b1e0858
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240227
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2020-06-18 21:25:20 +00:00
Jeremy Stanley 6a0304571a remove css user content overflow hack for firefox
this worked around a browser bug five years ago, but
no longer appears to be necessary, and has an undesirable
side effect

test plan:
 - add an image that is wider than the screen (like 4000px +)
   to a page
 - view the page in firefox. the image should be sized
   appropriately
 - as a student, post wide, non-wrapping content to a graded
   discussion topic (such as a table)
 - as a teacher, in firefox, view the student's submission in
   speedgrader. it should not be cut off

fixes LS-715

Change-Id: I980cbcaaf3704a05ffa93da3095fc48cc9b2b6b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240366
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-06-18 21:13:50 +00:00
Charley Kline ebfed6391a Populate root_account_id on user_note paths
Closes USERS-414
flag=none

This one is a little weird because the UserNote model does not
associate with anything that has a root account so all we can
do is populate the field from the domain root account in the
controller call.

Test plan:
* be sure "faculty journal" is enabled for your account
* create a faculty journal entry for some student
* examine that record in rails c or psql
* it should have the right root_account_id in the
  record instead of nil
* use the conversation API to create a conversation that
  has the "user_note" parm set to true
* post a message in that conversation, which should also
  create a faculty journal entry for it since you asked
  for user notes
* examine the record for that user note in rails c or psql
* it should have the right root_account_id

Change-Id: I76871617a06d475175a8f46aa8da67fe50aa974b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240451
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>
2020-06-18 20:35:04 +00:00
Jackson Howe c1f005122f Remove redundant title attribute from course nav menu button
Fixes LS-1106
flag=none

Test plan:
 - Go to /courses/*
 - Find the hamburger menu button in the top left corner. Make sure it
   only has an aria-label (and not title) attribute

Change-Id: Ie931805e979e6da94ddaa25711daa2ee110442b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240511
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: Jackson Howe <jackson.howe@instructure.com>
2020-06-18 19:07:37 +00:00
Michael Brewer-Davis 3c7fdc45f9 save root_account_ids on learning outcomes
closes OUT-3641
flag=none

Test plan:
- run canvas with MRA
- create a second root account from /accounts/site_admin
- in rails console, create new global outcomes
  > group = LearningOutcomeGroup.global_root_outcome_group.
      child_outcome_groups.create title: 'Test Virginia'
  > 3.times do |x|
      group.add_outcome(
        LearningOutcome.create(title: "Outcome #{x}")
      )
    end
- in the UI, import Outcome 0 into both root accounts
- import Outcome 1 into a subaccount of one root account
- import Outcome 2 into a subaccount of the other
- create new outcomes (Outcome 3, 4, 5) in a root account,
  subaccount, and course
- verify that outcomes are linked ot the correct root accounts
  > Account.root_accounts.pluck(:id, :name)
  > LearningOutcome.last(6).pluck(:title, :root_account_ids)
    Outcome 0 should be linked to both root accounts,
    Outcomes 1-5 to a single root account

Change-Id: I0154f481258e54de368896df8b0fa552eccd8ad4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239772
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-06-18 18:42:20 +00:00
Rex Fleischer c5c3820042 use shared library for configuration
fixes: CCI-389

Test-Plan:
we need to run all the builds that we can for this:
- the current build needs to pass
- main-for-plugins needs to be ran
- master-bouncer
- dive?
- translations

Change-Id: Iae7f9dad7668b90653a0b9a8edc20ec69fa109c3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240345
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ryan Norton <rnorton@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-06-18 18:36:49 +00:00
Derek Bender 1dbee48d35 Fix local docker-compose override
Test Plan:
- update docker-compose.override.yml

    $ diff docker-compose.override.yml \
      config/docker-compose.override.yml.example

    # if no local modifications are present simply copy:
    $ cp config/docker-compose.override.yml.example \
      docker-compose.override.yml

- no docker-compose errors when outputting the config:

    $ docker-compose config

Change-Id: I8485d606310afa617236d680492bce9842202d62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240600
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-18 18:22:21 +00:00
Spencer Olson 5a455d414a set root_account_id on scores
closes TALLY-704
flag=none

Test Plan:

1. Create a brand-new course and add some students.
2. Verify that all scores associated with the course have a
   root_account_id set:

   c = Course.find(<id>)
   scores = Score.where(enrollment: c.all_enrollments)
   scores.pluck(:root_account_id) # should all be set (not null)

Change-Id: I549d82c40a2057cc1fdcff604b5e5e7a9285f0ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239417
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-06-18 16:38:40 +00:00
Aaron Ogata ea8587774a improve UX around non-merged parent commits
refs CCI-364

Change-Id: I4bb5ee8ff453833f4ecbf0c86d7496a9751d936e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239657
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ryan Norton <rnorton@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
2020-06-18 16:19:11 +00:00
Matthew Lemon 99aeb24185 populate root_account_ids when context is a root_account
fixes VICE-551
flag=none

/ ---- ---- \
| Test Plan |
\ ---- ---- /

- Initiate a conversation on a root account
  - create a course on a root account and use that as the context when
    initiating a conversation
- Open a rails console and check that the conversation has the
  root_account_ids set

Change-Id: I454443455a2311dbc8b27420d731e54d1c41731c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240465
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-06-18 15:16:13 +00:00
Jackson Howe 66769ba4b4 Hide '+ Collaboration' button when user doesn't have permission
When the 'Student Collaborations - create' permission is disabled, the
button to add collaboration is hidden. The backend already prohibits
unauthorized users from creating a new collaboration. Also changes 'getting
started' text to reflect lack of permission.

flag=new_collaborations
Fixes LS-980

Test plan:
 - Enable external collaborations feature flag
 - Add Google external tool to course
 - As a student, click on collaborations; add button should be there
 - As admin, disable 'Student Collaborations - create' permission, as a
   student, click collaborations; add button should be hidden

Change-Id: Ibce58438a6e00dc31ca002e0d3a8262ee6e02424
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240280
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-06-18 14:42:16 +00:00
James Butters a73851216b junit reports for contract tests
closes: CCI-387
flag = none

Change-Id: I7149a881278bcbb028f6f92c6319123723f64315
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-06-18 13:30:07 +00:00
Aaron Ogata 8c643c2d5e wait for DOMContentLoaded before activating flash container
refs DE-13

flag = none

Change-Id: Ifa605f2cba802faab08e67f10f243944265b4919
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240550
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-06-18 13:12:10 +00:00
Cody Cutrer 735bb2719e tweak scheduled smart alerts table
Change-Id: I226b6adcdc89a4845e4e58d9709f279bef22b954
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240519
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-06-18 00:03:30 +00:00
Ethan Vizitei 6849b2c565 auditors partition create by setting
refs CNVS-48876
flag = none

TEST PLAN:
  1) run auditors partitioner
  2) respects setting for pre-creation

Change-Id: I6619c0f157cd7bc89c2b99c390b81007ca3f5277
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240505
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2020-06-17 21:00:51 +00:00
Ben Nelson 60200b8a05 schedule due date reminder smart alert
Adds a new model ScheduledSmartAlert which maintains records
or smart alerts to be run in the future, and methods to queue and
process them. Right now we only have the :due_date_reminder smart alert,
but it can be expanded to accomodate other types as well.

Test Plan:
(Verifications will most easily be done in a Rails console)
In a course with active student enrollments
 - Create an assignment with a due date in the future
 - Verify that a ScheduledSmartAlert record was created for that
     Assignment and due date
 - Edit the assignment and change the due date to a different future
     date
 - Verify that the existing ScheduledSmartAlert was updated, and a
     duplicate was not created
 - Edit the assignment and add a due date override with a date in the
     future
 - Verify that a ScheduledSmartAlert record was created for that
     AssignmentOverride and due date
 - Edit the assignment and remove the due date and save
 - Verify that the ScheduledSmartAlert record for that Assignment was
     deleted
 - Edit the assignment and set the due date to the past
 - Verify that there is no ScheduledSmartAlert for the Assignment
 - Edit the assignment and add a future due date, to create a
     ScheduledSmartAlert record
 - Delete the assignment and verify that the ScheduledSmartAlert for the
     Assignment AND the associated AssignmentOverride were deleted

closes VICE-466

Change-Id: I43fe6e2b9cb97f3ec78ffd53520443540bb7bbc4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238499
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: Ahmad Amireh <ahmad@instructure.com>
2020-06-17 20:28:16 +00:00
Michael Brewer-Davis 2c8badd7ed add index to learning_outcomes root_account_ids
refs OUT-3641
flag=none

Change-Id: I6d42dccdd438f4e63cf3ba5f63ad619879ad7ef0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240481
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-06-17 20:05:08 +00:00
Augusto Callejas cebd10b9d6 Include outcomes on content migration import
closes OUT-3656

flag=outcome_alignments_course_migration

test plan:
  - start up canvas, quiz_api and outcomes
  - for an account, provision outcomes service
    and sync some course outcomes (see g/235665)
  - enable the outcome_alignments_course_migration
    and outcome_alignment_non_scoring_content
    feature options in the root account of a course
  - in a course, create a canvas page and align
    an outcome
  - export a copy of the course
  - create a new course
  - re-sync from canvas in order to create a context
    in the service for the new course
  - import the course content into the new course
  - confirm that the new course contains the canvas page
    with the outcome aligned to it
  - confirm that when you open the alignment side tray,
    that it displays the course outcomes

Change-Id: I219724a48c386360247799322c1d75fab380f574
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240156
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2020-06-17 19:33:41 +00:00
Michael Brewer-Davis 2b054eb5d4 add root_account_ids to learning_outcomes
refs OUT-3641
flag=none

Change-Id: If12ee39e323e0f7b36f403595f66af1176de229d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240474
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-06-17 18:43:50 +00:00
Matthew Lemon 9373400817 add root_account_ids to conversations tables
Conversation, and ConversationParticipant already have the
root_account_ids column so we only need to add it to ConversationMessage
and ConversationMessageParticipant.

fixes VICE-550
flag=none

/ ---- ---- \
| Test Plan |
\ ---- ---- /

- Run the migration
  - bundle exec rake db:migrate:up VERSION=20200616085312
- Verify that the ConversationMessage and ConversationMessageParticipant
  tables have the `root_account_ids` column

Change-Id: I7259e710208378c0ab852b3a2b51cc3a08216160
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240321
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-17 18:30:35 +00:00
Spencer Olson 6641b07d04 set root_account_id on custom gradebook column datum model
closes TALLY-696

flag=none

Test Plan:
1. Create some custom gradebook column datum that do not have
   root_account_id set (either create them before checking out this
   patchset, or create them and then force the root_account_id column
   to nil using `update_column`).

2. Verify that the CustomGradebookColumnDataApiController#bulk_update
   API endpoint fills in the root_account_id for the custom column
   data when it is called.

Change-Id: Ia35e2cde1c56be9f07eb97f365f51ec482982db0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239035
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
2020-06-17 18:26:03 +00:00
Michael Brewer-Davis 247db4d6c2 remove root_account_id from learning_outcomes
refs OUT-3641
flag=none

Change-Id: Id5266509346638ca0100a7f47426c339f984b64a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240473
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-06-17 18:14:43 +00:00
Ben Nelson 245b5664aa schema change for reminder smart alert
refs VICE-466

Change-Id: I4461ba85aa4dd4c030719dadcbecd014a89ea7e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240470
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-17 17:48:52 +00:00
Xander Moffatt 7f13c1c488 sync points_possible between line_item and assignment
closes PLAT-5792
flag=none

test plan:
* get an assignment and an associated LineItem
* using the API/UI
  * update label of LineItem, note that name of assignment changes
  * update scoreMaximum of LineItem, note that points_possible of
    assignment changes
  * update both label and scoreMaximum of LineItem, note that both name
    and points_possible of assignment change

Change-Id: Ie2643ada461d352ba5b94cd217f35b5fd0ab4024
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239834
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2020-06-17 17:05:06 +00:00
Drake Harper 690e13ad47 Change h4 to h2 on announcements
Test Plan:
-verify the announcements are h2 not h4 and are still the same size

-announcement title on dashboard
-announcement title in create announcement in settings
-alert showing when vericite is installed

fixes VICE-280

flag=none

Change-Id: Ib6b3f28ce6fb4f02d24645f8b4a4b6439c2fb428
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240349
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-17 17:00:34 +00:00
Aaron Ogata f77627f0d5 spec: fix stale collection flakeyness
refs DE-14

flag = none

Change-Id: Iba5be0bfc7d15fa9ac62eb8e0240e15354bc14c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240340
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-06-17 16:35:04 +00:00
James Butters 9fb9e7fc07 spec: Jenkins chrome performance build use PATCHSET_TAG
currently the chrome performance build jenkinsfile is hardcoded
to use master. This change will now have it use the jenkins
parameter PATCHSET_TAG.

flag = none

Change-Id: I221501cc8743850c79a89666bd4fa8da0de54fcc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240447
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-06-17 16:14:31 +00:00
Syed Hussain 5f3101e49c spec: provide course_id in creating Submissions
fixes EVAL-1012

Test Plan:
 - jenkins selenium-performance-chrome build does
   not fail with PG:NotNullViolation error

Change-Id: Iecb504b0b15cdcaf0e3d305dc5f8bcc42c7299fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240384
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-06-17 15:43:32 +00:00
Matthew Lemon e85fa83a78 drop root_account_id from conversations tables
This removes the root_account_id from Conversation,
ConversationParticipant, ConversationMessage, and
ConversationMessageParticipant. We are opting to do something similar to
whats already being done in conversation with multiple root account ids
instead.

fixes VICE-549
flag=none

/ ---- ---- \
| Test Plan |
\ ---- ---- /

- Run the migration
  - bundle exec rake db:migrate:up VERSION=20200615170938
- Verify that the Conversation, ConversationParticipant,
  ConversationMessage, and ConversationMessageParticipant tables no
  longer have the `root_account_id` column

Change-Id: I7f736d96556ef86dc033aeb30bb37497809a0a29
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240320
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-06-17 15:33:25 +00:00
Clint Furse ed4127c72e basic launch and response from MasteryConnect
closes LA-728
flag = submission_type_tool_placement

Test Plan:
- find a LTI 1 tool that can be configured to do
  submission_type_selection placements.  The
  tool will also need to be able to send a
  ContentItemResponse back to Canvas.  I used
  a tool called lti_tool_provider_example (github)
  and modified it.  The response should include
  the following data for MasteryConnect:
  "https://canvas.instructure.com/lti/mastery_connect_assessment": {
          "points": 10,
          "objectives": "6.R.P.A.1, 6.R.P.A.2",
          "trackerName": "My Tracker Name",
          "trackerAlignment": "6th grade Math",
          "studentCount": 15
        }
- Install the tool under an account or course
- Create an assignment using the submission type
  that matches the tool (not 'External Tool')
- interact with the tool to send a response item
  back to Canvas
- The new data should be displayed below the button
- Save the assignment and verify that the data is
  persisited to the DB as JSON (content_external_tag.external_data)
- also verify data is still correclty displayed when
  editing an assignment

Change-Id: I5b1457e5dcfb8988ec75fbe3dfa1a3ca88bf0a77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240130
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: Clint Furse <cfurse@instructure.com>
2020-06-17 15:21:23 +00:00
Simon Williams 3a045c6e3b squash old migrations, p34 (through 2016)
Change-Id: I1786323eb8aee2996f2762719dfe7d6204cb92fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238238
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-06-17 15:16:34 +00:00
Rex Fleischer 03bcc04e8c update fsc to go into the plugin directory to do tests
[skip-docker-build]

fixes: CCI-402
flag = none

Test-Plan:
execute the plugin build with this PS

Change-Id: Id8c85ef80671a5cd055e2aafd15cfb98d8251045
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239678
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ryan Norton <rnorton@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-06-17 14:58:09 +00:00
Ed Schiebel 1ac5fd4fb7 Update tinymce to v5.3.1
closes LA-991
flag=rce_enhancements

Replaced a few toolbar icons with the instui versions for consistency.

test plan:
  - specs pass and everything still works

Change-Id: Ibb488d6df2457f2e41138e40b3b3d9469eb68215
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239388
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2020-06-17 14:25:53 +00:00
Simon Williams 48b9cd268d squash old migrations, p33 (string limits edition)
Change-Id: I315cad3b16178bbf112c2cfe0127034efc013b4c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238237
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-06-17 14:10:18 +00:00
Ahmad Amireh 18ce8c607c support Account when using the RAID resolver
refs USERS-404
flag = none

when resolving the root_account_id from an Account, it is a special case
because we need to delegate to its #resolved_root_account_id property
and not the #root_account_id column as is the case with other models

in other words, instead of having to do:

    through: ->(x) { x.account&.resolved_root_account_id }

you can now do

    through: :account

. TEST PLAN .
...... ......

nothing outside of tests, it should be equivalent to the previous
version. OK if you insist, see the plans for g/240257 and g/240228

Change-Id: I7848f93d7c0d8cae5babd4dce0ba9a329b7c3e4b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240339
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2020-06-17 06:37:18 +00:00
Ahmad Amireh e590f4e04f identify asmt students who need to be alerted
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>
2020-06-17 06:36:51 +00:00
Rob Orton 73b244e59a add ability to pass if_exists to remove_column
this is an option we have on removing indexes and other functions

Change-Id: I5b757be50e1b7ad229fbd65a6864045b8400c81b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240394
Reviewed-by: Matthew Lemon <mlemon@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-06-17 03:23:33 +00:00
Ethan Vizitei 1f92d007ea auditors migration handling clean miss
refs CNVS-48876
flag = none

checking user keys
interpolates S-Q-L
which needs a guard clause

TEST PLAN:
  1) run auditors repairing
  2) no job errors out with invalid SQL

Change-Id: Ide30c4078d88162507c6a6c8a9aa8df00007ecb7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240355
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-06-16 20:45:06 +00:00
Ed Schiebel 85c9ed8ff9 Add interesting data to the fullstory session
give the user an id, plus include some other useful data

closes LA-1004
flag=enable_fullstory

test plan:
  - in your canvas-lms/config/dynamic_settings, set
    development.config.canvas.fullstory.sampling_rate: '1.0'
    this way every login will get the fullstory code snippet
  - log out then into canvas
  - search the head section of the resulting html page for
    the <!-- fullstory snippet --> comment
  - in the <script> element just below
  > expect a call to FS.identify(user's global_id here)
  > expet a call to setUserVars({
      accountName_str: 'user's account name here',
      roles_str: 'comma separaed list of the user's roles (minus "user")

Change-Id: I7333cf1d78bb0254d20e9d4c82b1d0a8a6f0c40a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239843
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
2020-06-16 20:23:44 +00:00
Cody Cutrer 301a9f7ff7 bump rack
Change-Id: If1c1adab5ec0b79c2cb1add3e1823b17b9c85f93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240334
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-06-16 20:09:39 +00:00