Commit Graph

43751 Commits

Author SHA1 Message Date
Jeremy Stanley e9271f8886 revert overridden_requirements_met in course completion live events
this was kind of a shot in the dark and it didn't fix the problem.
we have decided to take a different approach.

test plan:
 - smoke test course completion live events
   (course progress event should be sent when a module is
    completed, and course completion event should be sent
    when the last module is completed)

this reverts commits 0b113807a7
and 60c6abb547

flag=none
refs LS-1967

Change-Id: Icee1eff0ddb94b8e7cd9c1edfbfffea867e2d419
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260141
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-03-10 23:20:49 +00:00
Gary Mei 3624ca554d add index for when canvadocs context attempt null
refs EVAL-1457
flag=annotated_document_submissions

Test Plan
- Specs pass.

Change-Id: I16321d4c9ac34b56f26b7a3f67ec2e16213151e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260399
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-03-10 22:48:39 +00:00
Pat Renner 5839e1491c use context hook for outcome components
closes OUT-4193
flag=improved_outcomes_management
flag=account_level_mastery_scales

test-plan:
- enable flags
- verify clicking through mastery scale, mastery
calculation, and improved outcome management
components and updating data works as expected

Change-Id: Ib4210424709c2eb6952bf197f21c7d93e2629090
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260282
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Manoel Quirino <manoel.quirino@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Jody Sailor
2021-03-10 22:30:30 +00:00
Ahmad Amireh e36dcc8474 fix specs for gems/canvas_i18nliner
refs FOO-1617
refs FOO-1408

this is a clash between 5a9a4f3 and ef4f3af

Change-Id: I2a37fac530f5bd60173f88dda8c69793417f6f7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260388
Tested-by: James Butters <jbutters@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2021-03-10 21:06:57 +00:00
Gary Mei 70cad93c82 add canvadocs_annotation_context
closes EVAL-1457
flag=annotated_document_submissions

Test Plan
- In a rails console, create 2 CanvadocsAnnotationContexts.
  ```
  CanvadocsAnnotationContext.create!(
    attachment_id: #{the_assignment_attachment_id},
    submission_id: #{submission_id},
    submission_attempt: #{1 and then 2}
  )
  ```
- Act as a student for the following steps.
- POST to
  api/v1/canvadoc_session?
    submission_attempt=1&submission_id=#{submission_id}
- With the returned url, open a Canvadocs session and make annotations.

- Repeat the previous two steps, with submission_attempt=2.
- Verify that annotations are persisted separately for each
  submission_attempt.

- Repeat, with submission_attempt=draft.
- Verify that annotations from the previous attempts do not cross over.

Change-Id: Id2e876e232fe4f5a5c1de91ad27c40314a4a7946
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258876
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-03-10 21:05:34 +00:00
Eduardo Escobar a45cbe8800 fix gradebook version switching bug
gradebook_version now uses the model UserPreferenceValue
instead of the serialized hash in the user model

fixes EVAL-1259
flag=none

test plan:
- Go to Gradebook in a course.
- Click on Gradebook on the upper left,
  then Individual View. Notice the page refresh.
- In individual view, do the same process to go back
  to the Gradebook, and notice the behavior
  from that side as well. (without this fix, sometimes
  when you try to switch between individual and default
  it stays in the same page without switching the version).

Change-Id: Ic13e863750422d5cefa3b44ec68a4cc86469ef4b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260051
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-10 20:34:35 +00:00
Aaron Ogata af2422813c use spring for rspec loading
Change-Id: I1f1a5f02d26c68e5fc0bfa9e554d6b099be61d76
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253994
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-03-10 20:32:49 +00:00
Cody Cutrer e0cd137946 add (springified) binstub for rubocop
Change-Id: Iff04dbe1d24f55ff2c160df472d615cf680256dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259774
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-03-10 20:32:21 +00:00
Ethan Vizitei 6d2b297bc0 let canvas use outrigger for migration tagging
refs FOO-1644

when other engines need migrations, we have to
be able to move "tagged" migrations down to them.
Letting outrigger manage the dependency
is nice since we extracted it from canvas anyway.

TEST PLAN:
  1) nothing about migrations changes

Change-Id: I93d2683cc05584ed9bf871b61e06ba39b70a3f5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260370
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-03-10 20:31:31 +00:00
Ahmad Amireh ef4f3af11b specify i18n scope for handlebars in JSON files
fixes FOO-1617
flag  = none

[pin-commit-analytics=ea50e2b0d4fce306e05bb90c696904885a3d51da]
[pin-commit-instructure_misc_plugin=9ecb5066b058e4bf166058a43d4a26f8ac7a685b]
[pin-commit-migration_tool=7d1f2b2801502bb427dcebcc7c15398f5801cfe1]
[pin-commit-multiple_root_accounts=0c81b2b76e8463a2ab8c873230934d3ec79337f9]

each handlebars template is now expected to be accompanied by a sibling
.json file that specifies the i18n scope to use for {{#t}} calls in that
template:

    {
      "i18nScope": "foo.bar"
    }

this lets us rename the file without affecting the scope

when a template is missing this property (or the json file) and makes a
call to {{t}} or {{#t}}, the build will abort with a helpful message to
direct the author to address the issue

in the process, this also removed two dead-code templates:

- app/views/jst/calendar/appointmentGroupList.handlebars
- app/views/jst/calendar/schedulerRightSideAdminSection.handlebars

== test plan

- go to user preferences page and change locale to something other than
  english that you can verify, and then verify the strings on that page
  are still translated

- remove one of the *.handlebars.json files that were introduced by
  this patch, run webpack and verify the build fails

Change-Id: Ia745dc2000615b55866abc570aa08b5cdbfae93e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258936
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-03-10 20:30:19 +00:00
Andrea Cirulli 75a09cce68 remove debian specific check in docker-dev-setup
Removing the apt-get check will allow the script to run on more Linux
distros.
This change also modifies the messaging and specifically state that
running this script on a non Debian distro may or may not work and is
not supported should that state change in the future.

refs DE-538
flag = none

test-plan:
- Ensure docker_dev_setup is successfull on Mac and Linux

Change-Id: I1e95b5dad2af4198d6e7007966b1653dcfe13bb4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260375
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-03-10 20:09:01 +00:00
Aaron Shafovaloff 10fb990149 Remove minimum description height for assignments
The extra space seems to serve no purpose.

Test plan:
 - As a student, go to submit an assignment
 - Extraneous space below description should be removed

Refs EVAL-1517

flag=none

Change-Id: I910d067f82911f6753d9edca21f3f355710cd7f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260214
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-03-10 19:45:28 +00:00
Brian Watson 6651cd10fe Remove public contract tests
We found that the external pact broker hasn't been used in over 2 years,
so there isn't a justifiable reason to keep these running

Test-plan:
- Verify that contract tests still run for internal customers
- Verify that post-merge, generated contracts are still pushed
   to the broker

Change-Id: I8221dbf97eb78610ef2b25a69e32909b7f29b6c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260350
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2021-03-10 19:41:39 +00:00
Kyle Rosenbaum d41b62429f fix rerun log file numbering; refs DE-556
test plan:
-Rerun logs at /usr/src/app/log/spec_failures/Rerun_ are ordered
properly starting with 1 and incrementing up by 1 for each rerun

Change-Id: I7b777eed1975cbea24a51602bef5b00fc8fd58f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260317
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: Aaron Ogata <aogata@instructure.com>
2021-03-10 19:41:33 +00:00
Jeff Largent 05637967e8 Add gradebook links to K-5 grades tab for teachers and TAs
closes LS-1768
flag = canvas_for_elementary

Test plan:
  - Enroll / login as a teacher in a non-homeroom course
  - Expect the grades tab to show a "View Gradebook" link next to that
    course instead of a grades progress bar
  - If the teacher has no student enrollments, expect the grading
    period select to be hidden

  - Enroll / login as a TA in a non-homeroom course
  - Expect the grades tab to show the same link for that course
  - If the TA has no student enrollments, expect the grading period
    select to be hidden

  - Enroll / login as a student in a non-homeroom course
  - Expect the grades tab to show a progress bar and no "View
    Gradebook" link
  - Expect the grading period select to display

Change-Id: I682e87081df858a1dd6558afdf444d7414381c52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260075
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
2021-03-10 19:23:21 +00:00
Rob Orton bca1354147 remove feature flag for reduce_push_notifications
test plan
 - specs should pass

fixes VICE-1004
flag = reduce_push_notifications

Change-Id: If227c3be628ac4a225f56dd91acc09d12c45a07c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260087
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-03-10 19:08:29 +00:00
Ahmad Amireh 5a9a4f3470 (re) decentralize i18nliner configuration
refs FOO-1408
flag = none

This reverts commit c904d83673.
Original commit 9af1badd2f.

I've also made an adjustment where you may only include a directory and
not a specific file so that we don't make it possible to configure
outside of an ".i18nrc" file (a measure to eliminate surprises that's
all)

before:

    { "include": [ "path/to/dir/.i18nrc" ] }

now:

    { "include": [ "path/to/dir" ] }

:: test plan

run "rake canvas:compile_assets" and visit any page with JavaScript
text, that text should display correctly

Change-Id: I320ec4056270647835035f45501d310b18d9cb25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258178
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-03-10 18:52:49 +00:00
Mauricio Salles be17cac374 hide import button on account level context
import csv button should be rendered at the courses
level context only

Test Plan:
   - Login as an administrator
   - Access Courses, then click on People
   - click any of the groups tab
   - the +Import button should be rendered
   - then click on Admin at left menu
   - choose your company
   - click on People link
   - click on right top menu and choose 'View user groups'
   - it should not have the +Import button rendered

fixes VICE-1163
flag=none

qa risk: low

Change-Id: I07c5130cb53c22fb3d034f20727cb50b616eea2a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260325
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-10 18:44:54 +00:00
Mysti Lilla 75e6ecf0bd Prevent multiple attempts on TurnItIn uploads
fixes INTEROP-6185
flag=none

Test plan
- Set up the TurnItIn 1.1 LTI tool on an assignment
  with limited attempts (there's a feature option
  you have to turn on) so you can see the attempts
  for the user
- Upload a document to their tool as a student
- Send a request to get the TurnItIn submission
  download process started (see below)
- As a student, check your submission page and
  see what attempt # it shows you

EX: In IRB fill out the following:
require 'json'
require 'oauth'

oauth_key = (from your tool consumer key)
oauth_secret = (from your tool shared secret)
paperid = (after you've uploaded a document via
  the LTI tool, click on it and use the o parameter
  from the URL)
outcomes_tool_placement_url = (https://sandbox.turnitin.com/
  api/lti/1p0/outcome_tool_data/#{paperid}?lang=en_us)
sourcedid = (from the LTI launch the value in
  lis_result_sourcedid)
tool_id = string tool id from the tool
post_url = (from the LTI launch the value in
  ext_outcomes_tool_placement_url)
json = {"outcomes_tool_placement_url"=>outcomes_tool_placement_url,
  "paperid"=>paperid,
  "lis_result_sourcedid"=>sourcedid,
  "tool_id"=>tool_id}.to_json

consumer = OAuth::Consumer.new(oauth_key, oauth_secret)
token = OAuth::AccessToken.new(consumer)
response = token.post(post_url, json, 'Content-Type' => 'application/json')

This starts a delayed job that checks with TurnItIn for the score.
If done right, it should not take long.

Change-Id: I6fd939eae77aaf654f271c947016c3d47176fbb1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260294
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-10 18:34:19 +00:00
Mysti Lilla 3d384fc05d Check TurnItIn permission against actls too
fixes INTEROP-6394
flag=none

Test plan
- Set up a submission with turnitin_data like
  {provider: 'vericite'} and an originality
  report to take you somewhere like www.google.com
- Add an Assignment Configuration Tool Lookup
  for tool_product_code 'turnitin-lti' or other
  on the assignment for the submission
- Ensure you can still see the report

Change-Id: Ib747f58c550ac17449fcc98007b1300c41c7e00a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259797
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
2021-03-10 17:51:16 +00:00
Aaron Shafovaloff 6eb7eb5b1b Change initial Submit Assignment button text
Clicking this button did not actually submit the assignment.

"Submit Assignment" changes to "Start Assignment"

"Re-submit Assignment" changes to "New Attempt"

Test plan:
 - As a student go to an assignment
 - The button for beginning the assignment should read
   "Start Assignment"
 - The same button for subsequent attempts should read
   "Re-submit Assignment"

Refs EVAL-1519

flag=none

Change-Id: I8025365d1b4624ceb5dcff19bff5bc6624df2c3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260264
Product-Review: Jody Sailor
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-10 17:35:46 +00:00
Ethan Vizitei 985136e053 auditors extraction: stage 2
refs FOO-1644
[fsc-timeout=30]

 - declare dependency on dynamic_settings
 - move Auditors code over to Audits module
 - declare dependency on canvas_cassandra
 - declare dependency on event_stream
 - get tests on Auditors module from parent app to pass locally
 - shim Auditors to point to Engine
 - update in-repo callsites to use module from engine

Change-Id: I78aaf27c236bcb3a4cd32b3773ec7acddc30cd39
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259222
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2021-03-10 17:25:32 +00:00
Kai Bjorkman 9ccac93f13 spec: fix locally failing speed grader model specs
fixes EVAL-1100
flag=none

Test Plan:
 - specs pass on jenkins
 - monthly tables need to be created locally in ruby console
    • bin/rails c -e test
    • partman = CanvasPartman::PartitionManager.create(Auditors::ActiveRecord::GradeChangeRecord )
    • partman.create_partition(Time.zone.now)
    • partman.create_partition(Time.zone.now + 1.month)
 - specs pass locally

Change-Id: Iafeda2c26281b83a0a739afb617c002a0f5f86f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260132
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-03-10 17:19:35 +00:00
Ahmad Amireh 09e6058f72 sort auto-generated en.yml locale file
fixes FOO-1569
flag  = none

The tree of phrases coming out of the i18n:generate rake task is now in
alphabetical order. This should have absolutely no effect on the
structure of the tree, only on the order in which the keys appear in
each branch.

:: test plan ::

There are no surprises related to text in the UI; any page should do,
things should look the same, you don't see "bar" in place of "foo"

Change-Id: I683c5ee352149128a05e36bcb07646aca15ad3a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258170
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-03-10 17:11:26 +00:00
Aaron Ogata f44d328ea7 only output error pages if not discarded
refs DE-519

Change-Id: I314fa116183ed14d0e23184958728d2e23feeff3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260347
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-03-10 16:54:49 +00:00
Weston Dransfield 1f2b54e3aa MSFT sync group show endpoint
Closes INTEROP-6560
flag=none

Test Plan:
- Create a course with a MicrosoftSync::Group
  record associated to it
- As a user with the manage_students permission
  for that course, make a request to the new endponit
- Verify a JSON representation of the group is returned
- As a user without the manage_students permisson, attempt
  to make the same request
- Verify a 401 is received
- Delete the MicrosoftSync::Group
- Make the same request and verify a 404 is returned
- Make the same request to a course that does not exist
- Verify a 404 is received

Change-Id: I32f7068fc97bd803045ed35f7f3df2efce1d9b4e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260077
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
2021-03-10 16:27:50 +00:00
Matthew Lemon 2c097dc1b9 create pagination component for Discussions
fixes VICE-985
flag=none

Test Plan:
- Run storybook
- Navigate to Discussion Posts > ThreadPagination in storybook
- Change selectedPage and totalPages props and note how the component
  changes
- Clicking a page number should cause the `setPage` action with the
  same number as an argument

Change-Id: I7ba8c5d5b7ebe4b5e945a959f0d32e4e4fba31d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260321
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-03-10 16:16:16 +00:00
Adrian Packel 38874dc5d0 Don't show draft comments to observers
fixes EVAL-1389
flag=none

Test plan:
- Have a course with:
  - A student
  - An observer observing said student
  - Two instructors
- As one of the instructors:
  - Grade the student (or post their submission by whatever means)
  - Type a comment on the student's submission in SpeedGrader, but then
    save it as a draft (by switching to a different student before
    submitting the comment)
- View the submission details page for that student and check that the
  following hold:
  - As the student, the draft comment should not appear
  - As the observer, the draft comment should not appear
  - As either instructor, the draft comment SHOULD appear

Change-Id: Ibbeeb3b9fc48fcfd2382745c20a0fe6994905f4d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259838
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-03-10 15:52:04 +00:00
Wagner Gonçalves ca71558e01 fix submission details launches fail in Canvas beta
When we're lauching submission details in beta, we notice that some
AccountDomains hosts is point to production instead of beta. The
`UrlHost.context_host` method in beta is from the (MRA) plugin
https://gerrit.instructure.com/plugins/gitiles/multiple_root_accounts.

Example:

!PRODUCTION (canvas-fra-beta secondary)!
irb(main):026:0> HostUrl.context_host(@context.root_account)
=> "quizzesqa-fra.instructure.com"

So, we're adding `current_host` to the Submission::ShowPresenter, that
will be used to discover the correct host when lauching the submission
details page in beta.

Example:

!PRODUCTION (canvas-fra-beta secondary)!
irb(main):027:0> current_host = 'quizzesqa-fra.beta.instructure.com'
irb(main):028:0> HostUrl.context_host(@context.root_account, \
current_host)
=> "quizzesqa-fra.beta.instructure.com"

closes INTEROP-6594
flag=none

test-plan:
* Have an LTI 1.3 tool installed;
* Have a Course recorded;
* Have a Student enrolled to this Course;
* Have an Assignment recorded to this Course;
* As a Student you should be able to access the Assignment to submit your
  homework. At the submission homework page you should be able to find
  LTI tool (usually rendered in a tab);
* When accessing the Submission Details page you should be able to see
  that the tool was launched properly;
* When accessing the Submission Details page in beta you should be able
  to see that the tool was launched properly using the beta domain
  instead of production domain;

Change-Id: I9053d168c3d56a8455335b579804265a077c5387
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260271
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Product-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
2021-03-10 15:34:01 +00:00
Martin Yosifov b245d0c68f Customize error message for outcome group remove
closes OUT-4278
flag=improved_outcomes_management

Test plan:
- Make sure you have an Account and a Course
- In the Account create one outcome group with one outcome
- Create a rubrik and align the outcome with the rubrik
- Repeat the above steps for the Course
- Go to Account > Settings > Feature Options
- Enable Improved Outcomes Management FF
- With Improved Outcomes Management FF Enabled
- Go to Account > Outcomes
- Select the above created group via TreeBrowser then select
Remove option from group kebab menu
- A modal should open and ask you to confirm removal
- Click on 'Remove Group' button; modal should close and after
few seconds you should see a flash notification with message:
"An error occurred while removing this group: Request failed
with status code 400"
- Reload the page and confirm that the group is not deleted
- Go to Course > Outcomes
- Repeat the same tests as for the Account

Change-Id: I3f49e3165e5a88915bf9e05bf1a574050bd04795
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260227
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
2021-03-09 23:51:37 +00:00
Matthew Lemon d28fdd2a0f create DiscussionReply component
This is piggy backing off of the work the Davis previously did
with the reply in the ThreadingToolbar.

fixes VICE-839
flag=none

Test Plan:
- Run story book
- Navigate to ThreadingToolbar > Reply in story book
- Toggle the `withBackground` prop and note that the button should
  toggle between having a solid and transparent background

Change-Id: I052e49f76ef16238127c4a097c72095c85312d33
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260296
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-09 22:10:56 +00:00
Evan Battaglia 01e87e81a3 Add MicrosoftSync::Group table and model
Does not contain UPN->AAD cache or member/admin aads, those will come
later if needed.

Test plan:
- rake db:migrate
- Check that root account id is non-nullable and there is an index on
  (root_account_id, id) (e.g. `\d+ microsoft_sync_groups`)
- check there is unique index on course_id
- Verify the replica identity for developer_key_account_bindings
  has been set to index (SELECT relname, relreplident
  FROM pg_class WHERE relname = 'microsoft_sync_groups';)
- Check that root_account_id is automatically added when you create a
  MicrosoftSync::Group
- Rollback migration (rake db:migrate:down VERSION=20210301174622) and
  check that table is gone

closes INTEROP-6558

Change-Id: I3250659e4e06c285ecf1b121b2078fb1051ae7be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259734
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-03-09 22:08:09 +00:00
Aaron Ogata 479766a5ea add pretty titles for all subjobs
refs DE-519

Change-Id: I530449b4dc973b398c490dca3781e1cc075aac50
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260297
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>
2021-03-09 21:45:19 +00:00
Aaron Ogata f6dbc829cd login to starlord for EKS
refs DE-458

[canvas-builds-refspec=efc156a3c9d27dafcdebba00db8cb24c0afabf27]

Change-Id: Ibba8fdaeb25c2c074a604dc06cc9c1681a8de268
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260257
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: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-03-09 21:30:12 +00:00
Robin Kuss b753d26c33 spec: skip profile_controller examples for now
refs LS-1997

Test Plan: passes jenkins

Change-Id: I11af0a112a9466a23401e99a82d416dbe39cd92d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260289
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2021-03-09 20:13:46 +00:00
Aaron Ogata 9f483b77ad remove dead skip-docker-build flag
refs DE-458

This flag hasn’t worked for a long time, and caching has made this stage fast enough now that it isn’t needed.

Change-Id: I138c5716c35bcde09a28269f27dafe772a01fcb4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260259
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>
2021-03-09 20:13:06 +00:00
Caleb Guanzon 5ac327b0cc add discussion_posts NoResultsFound component
flag=none
fixes VICE-1208

test plan:
- yarn storybook
- visit Discussion Posts/NoResultsFound
- verify you see the NoResultsFound message like the one
   in prod

Change-Id: Ib577d21066905fd9f4c4e285177648b5a2d04400
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260283
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-09 20:00:02 +00:00
Jeremy Stanley 7e8915e7fd don't turn <iframe></iframe> into <iframe/> on import
apparently this tag isn't allowed to self-close

test plan:
 - record a video in course content and new RCE
 - add some text below the video
 - export the course to a package and import the package
 - the text in the copy of the item should still be there
   (specifically, it should still be outside the iframe,
    not inside it where it's invisible)

flag = none
fixes LS-1968

Change-Id: I1e189e850fa261059e8b6976947dc18320b49a25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260210
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-03-09 19:43:45 +00:00
Davis Hyer 8cf76e810b add threading toolbar component
fixes VICE-942
flag=none

test plan:
  - storybook components match updated designs

qa risk: low

Change-Id: I5eb2af2d23fd2b8599c94c43166511b1ab52278c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260258
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: Caleb Guanzon <cguanzon@instructure.com>
2021-03-09 19:30:31 +00:00
James Butters f6101c9ad5 change to compile_assets_dev for install_assets
we already do compile_assets_dev for updating docker dev environments,
change the setup of docker to also run compile_assets_dev. Corrected
the echo to reflect what is now being ran.

flag = none

Test Plan:
-Jenkins passes
-Running docker_dev_setup or just install_assets inside docker container
 passes with no docs or styleguides

Change-Id: I2af28e29d587c9931be501b4a384f14b5c679418
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260251
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>
2021-03-09 19:28:46 +00:00
Service Cloud Jenkins 853d9ab35d Update parallel_runtime_rspec.log from build 176
Change-Id: I356691b6a2f94b8f8b450b6191ef221f23b412b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260090
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>
2021-03-09 19:28:25 +00:00
Michael Jasper 53c7bacf6b Account setting for enabling push notifications (default on)
refs SAS-1852

NOTE this is not yet implemented in the notification service.
We're adding the setting and feature flag to enable accounts
to opt in/out before it takes affect

Change-Id: I72bd7dde3d6b5b8528133e69017f465bb3bb712b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259948
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Michael Jasper <mjasper@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
2021-03-09 19:14:37 +00:00
Aaron Ogata bc1a61ff84 improve failure report
refs DE-519

Test Plan:
1. Build successful
2. Build failure w/ no detected causes
3. Build failure w/ rspec failures
4. Build failure w/ intermittent failures
5. Buidl failure w/ stage failures

[canvas-builds-refspec=fa9df2ba5173b83b29c035460fb41d3d2eba8d65]

Change-Id: I55812ea5a82255d2d922817e7e641079d8d556a2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259854
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
2021-03-09 18:51:01 +00:00
Jeff Largent 91f4b7bc34 Allow selecting grading periods in K-5 Grades dashboard
This change adds the ability to select a specific grading period on
the Grades tab in the K-5 dashboard. The select drop-down defaults
to "Current Grading Period", which will show grades from the currently
active grading period for each course (if any). The other options in
the drop-down are all grading periods associated with all the courses
the user is enrolled in, and selecting one will filter out any courses
not associated with that grading period.

closes LS-1914
flag = canvas_for_elementary

Test plan:

Set up grading periods:
  - Go to /accounts/<account_id>/terms and set up at least 2 terms if
    you don't already have multiple terms set up
  - Go to /accounts/<account_id>/grading_standards and click
    "+ Set of Grading Periods" under the "Grading Periods" tab
  - Add 2 grading period groups, each with at least 2 grading periods.
  - Create or go to 2 existing courses, and make sure each is
    associated with a different term
  - Create or update assignments with points for both courses, making
    sure that some of the assignments are due in the date ranges of
    all 4 grading periods
  - Grade the assignments for a student enrolled in both courses

Verify grading periods selector:
  - Log in as the student with graded assignments in both courses
  - Go to the "Grades" tab on the dashboard
  - Expect to see grades from the latest grading period in both
    courses
  - Select a specific grading period
  - Expect to only see courses associated with that grading period
  - Expect courses that appear to have scores / grades for that
    grading period (or "Not graded" if none of their assignments have
    been submitted / grades for that grading period)

  - Update one grading period group so that none of its grading
    periods apply to the current date
  - As the student, go back to the grades tab on the K-5 dashboard
  - Expect the course associated with that grading period group to
    show "--" instead of "Not graded"

Change-Id: I7f73e8a4213ecd21e6138108aede9748b52ce569
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259180
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
2021-03-09 18:38:00 +00:00
Spencer Olson a14fc97900 all grading periods: ignore unposted anonymous assignments
Fixes a bug where the "All Grading Periods" total grade includes
unposted anonymous submissions when the "Ignore Unposted Anonymous
Assignments in Grade Calculation" feature flag is enabled.

closes EVAL-1510
flag=grade_calc_ignore_unposted_anonymous

Test Plan:
1. Enable the "Ignore Unposted Anonymous Assignments in Grade
   Calculation" feature flag at the root acocunt level.
2. Create a course that uses grading periods, and enroll at least one
   student.
3. Create two assignments in the course, both due in the same grading
   period. Make them both worth 10 points, and make one of them
   anonymous. On the not-anonymous one, score the student 10/10. On the
   anonymous one, score the student 5/10. Do not post grades on the
   anonymous asignment.
4. Go to the gradebook and select the grading period that the
   assignments are in. Verify the total for the student shows 100%
   (because it only considers the 10/10 on the not-anonymous assignment)
   . Select "All Grading Periods". Verify the total for the student
   shows 100% (because it only considers the 10/10 on the not-anonymous
   assignment).

Change-Id: Ibb02a2147cccb9770506ba9f0d1f0ae4c0ac4bdf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259862
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
2021-03-09 17:58:16 +00:00
Chawn Neal 20d1ca7f63 Prevent duplicate Integration Id.
fixes VICE-1172
flag=none

Add model validation to prevent duplicate integration_id.
Add spec for didplicate sis_source_id.

Test Plan:
 1) rspec spec/apis/v1/sections_api_spec.rb:593  -fd
    rspec spec/apis/v1/sections_api_spec.rb:600  -fd
 2)
 Go to Canvas console.
  rails c
 Create a course and assign it to a variable.
  c1 = Course.create(name: "Sample Test Course")
 create a course section for that course and give it
 an integration_id and make sure you save.
  c1.course_sections.create!(name: "Test Section", integration_id: 'taken')
 Create a second course_section for the same course
 and assign it to a variable.
  c1.course_sections.create!(name: "Test Section 2")
 After the second one saves, assign its integration_id
 to the same value as the previous course section.
  cs1 = c1.course_sections.last
  cs1.integration_id = "taken"
  cs1.save
 It should fail. You can check the errors and it will say:
 Integration ID already in Use.
  cs1.errors.first
 You can repeat these steps using the field "sis_source_id".

Change-Id: Icc0f124c6b34bf5cf12109c744c4343deb955cbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260250
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>
2021-03-09 17:47:33 +00:00
Chawn Neal 3802256001 implement Discussion's Thread Actions Component
fixes VICE-939
flag=none

create a menu based component for discussion threads

TEST PLAN:
 1) run "yarn jest ThreadActions" to see what tests
  were created.
 2) run "yarn storybook". Via browser gui:
 under Examples > Discussion Posts > Thread Actions.
 You can see a menu component with several stories.

Change-Id: Ic3d4113105674e661dd8017f279aaa3e5571784c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260093
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2021-03-09 16:54:32 +00:00
Jackson Howe 7215eaaf10 Show year on course availability inputs
A bug is preventing the year from being set to something other than
the current year in the course availability options. This change
fixes that issue by showing the year in the input itself, which is
probably a good thing anyway since tons of courses span 2 calendar
years.

A side affect of this change is that we need to increase the size of
the CanvasDateInput inputs to allow for the extra details in the
input.

fixes LS-1962
flag=new_course_availability_ui

Test plan:
 - Enable the flag at siteadmin
 - In a course's settings, change the course start or end date to
   something next year
 - Save the page and expect the year change to persist.

Change-Id: I468e2a9bad832062e42dbb206da1b55bea7564db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260203
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2021-03-09 16:15:16 +00:00
James Butters e88fc72df0 refactor docker_dev_update with improvements
closes: DE-499

Improve the flow of docker_dev_update, incorporate new
rebase_canvas_and_plugins script.

Test Plan:
- Jenkins Passes
- Run docker_dev_update with no uncommitted changes
  -no command options; script updates docker containers
  -with --update-code; rebases repos, updates docker
  -try a variety of skip-plugins and skip-canvas
    -script skips repos as expected
-Run with uncommitted changes to canvas or a plugin
  -no command options; updates docker containers
  -with update-code; prompted to stash or skip
    -rebases correctly if stashed
  -use different combinations of skip-canvas and
   skip-plugins; script will skip as expected

Change-Id: I6cf96f2455ca798bc37d8b324190b955ab8bdaa1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259133
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-03-09 15:01:32 +00:00
Jenkins c1bf6fa289 update nn translation
Change-Id: I49c26e4e61b9e151d790bbd06baf3bcfade8b3c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260239
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-09 05:54:31 +00:00