Commit Graph

25313 Commits

Author SHA1 Message Date
Jackson Howe 6a0869a22a Use granular permissions in selective release
Gate the learning object dates api according to new permissions, and
only render the assign to buttons & UI if the appropriate permissions
are present. This commit works by adding a policy called
:manage_assign_to to each learning object model which checks the
appropriate course permissions/ conditions. Then in various parts
throughout the UI, we can simply call `object.grants_right?(user,
:manage_assign_to)` anywhere where we're checking the ability to edit
an existing learning object's assign to settings.

To change a module's assign to settings, require the "Course content -
edit" permission.

For existing learning objects, changing assign to settings requires the
following permissions:
- assignments -> "Manage Assignments and Quizzes - edit"
- quizzes -> "Manage Assignments and Quizzes - edit"
- graded discussions -> "Discussions - moderate" and "Manage Assignments
  and Quizzes - edit"
- ungraded discussions -> "Discussions - moderate" and either a course
  admin enrollment or an enrollment that's not section restricted
- pages -> "Pages - update"

For new learning objects, we require the following permissions on the
object's create page:
- assignments -> "Manage Assignments and Quizzes - add"
- quizzes -> "Manage Assignments and Quizzes - add"
- graded discussions -> "Discussions - create" and "Manage Assignments
  and Quizzes - add"
- ungraded discussions -> "Discussions - create" and either a course
  admin enrollment or an enrollment that's not section restricted
- pages -> "Pages - update"

The "Discussions - moderate" permission can be granted to students, so
if the user does not have an admin enrollment in the course, we verify
that the student's enrollment is not section-restricted before allowing
them to edit a discussion's assign to settings. Thus, students with
"Discussions - moderate" permissions and a section-restricted
enrollment can not use the assign to tray and can no longer
differentiate a discussion by section.

closes LX-1694
flag = differentiated_modules
[fsc-max-nodes=20]
[fsc-timeout=40]

Test plan:
Visit each of the following locations as a teacher and verify that you
can access the "Assign To" UI. Then disable the associated permission
for the teacher and verify that you can no longer access the "Assign
To" UI. Note that you may need to clear your cache and restart Canvas
after toggling permissions.
 - assignments (show, index, edit, create, module items) - note that
   the index can show quiz and graded discussion items, and these
   items' assign to buttons should be gated by their respective
   permissions
 - quizzes (show, index, edit, create, module items)
 - graded discussions (show, index, edit, create, module items)
 - ungraded discussions (show, index, edit, create, module items) -
   test this as a student as well
 - pages (show, index, edit, create, module items)
 - modules (index) - both the menu option and "View Assign To"
   button should be gated

Change-Id: I19bdb24c16a4bc77b993a55be4d9536904c6441f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348755
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2024-06-04 17:08:18 +00:00
Cody Cutrer 887443f505 send confirmation email from federate attributes provisioning
fixes AE-971

Change-Id: Ie0157ae6d12bd7636be83cfd0b52aebee6c57515
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348837
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-06-04 17:05:07 +00:00
Roberto Noguera 63932dd0fb Avoid duplicate outcome creation in course copy
Avoid Creating duplicate outcomes if a copy already
exists in the destination course

closes OUT-6312
flag=none

test plan:
- Jenkins pass

Change-Id: I186f72308e30731fdb4e266ebb1213aaf7a31b1a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346436
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Dave Wenzlick <david.wenzlick@instructure.com>
2024-06-04 16:07:44 +00:00
Daniel Vincze 1becb1cab2 fix: followup label change with selenium test
The original change canvas-lms/+/348856 did not contain this, but probably needed

refs OUT-6433
flag=none

Test plan:
- Tests pass

Change-Id: Ifc2cc17b08c0a5f75d63581883c1069deefdcf4d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349110
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
2024-06-04 12:13:43 +00:00
juan.chavez d8484b4156 Add 'Assign To' tray for ungraded discussion on edit page
closes LX-1494

flag=discussion_create
flag=differentiated_modules

pre-requisites:
- The test plan is applicable when discussion_create
AND differentiated_modules are enabled.
- It's necessary to test that everything is still
working when we disable the flags.

test plan:
- Navigate to a discussion edit page.
- Disabled graded checkbox.
> Verify that ‘Post to’ and ‘Available From’ sections
are no longer visible. Only 'Manage To' button.
> Verify  that ‘Due at’ input does not appear.
Only ‘Available from’ and ‘Until’.
> Verify that you can create/delete/update assignment
cards in the tray.
> Apply the tray and save.
> Verify that on show/edit page you can see the
expected assignment cards.
> Verify the 'Assign To' does not appear for students
on ungraded discussions. The old 'Post To' section
should appear instead.
> Verify that this didn't affect Announcements
edit page, since they are a subclass of Discussions.

Change-Id: I44be7f807d5b29d7b5ea8bc5bc878fc311c3b20b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346427
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
2024-06-03 21:21:33 +00:00
Sarah Gerard a390e13220 Use UngradedDiscussionVisibilityService
these views are causing serious performance problems.  follow
the advice of our DBAs and instead of using/ joining on the
ungraded_discussion_student_visibilities view we will now use the new services

refs LX-1728
flag=differentiated_modules

test plan:
- tests pass
- a thorough QA of assigning modules to different students
  and sections and checking for correct visibility.

Change-Id: Ia0fd074f41488abaa5645ee7c6b9d022bd925df6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348872
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2024-06-03 20:31:12 +00:00
Cameron Ray 05e514199b Change Hidden Assignments GB Warning
Makes a definitive statement less definitive. There are
cases where the grade will not differ

fixes EVAL-4142
flag=none

Test plan
- Have unposted grades in the gradebook
- In the total column an icon with an eye slash should be visible.
- Hover over the icon
- Tooltip should read "This grade /may/ differ"

Change-Id: I414c31dacc4457a8f1afe133be5090a4adf290ec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349021
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2024-06-03 19:45:02 +00:00
Jackson Howe e43fdbcbee fix flakey spec
Change-Id: I3f63c6854ab4d6714f116dc077237acffd15ccbe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349040
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2024-06-03 17:59:32 +00:00
Kai Bjorkman 870c6778bf round pointsBased scores to 2 decimal places
closes EVAL-4166
flag=none

test plan:
- Create a course with active student enrollments.
- Create a custom grading scheme using points,
with letter grades between 10-0.
- Create an assignment, set it to be worth
10 points and to use a Letter score following
the newly created grading scheme.
- Open student submission in Speedgrader.
- Add a long decimal score to the assignment,
such as 2.100000000009.
- notice the score rounded to 2 decimal places.
- Ensure that 2.10 is also shown in the student's
gradebook and individual gradebook

Change-Id: Ib95398ed69f8ac6776e652dee7dbb15d65b3095a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348771
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Chris Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-06-03 15:52:24 +00:00
Dustin Cowles 462c6ec398 expand ENV.current_context
refs ADV-109
flag=none

Test plan:
- ENV.current_context object is populated on all pages with a context
{
  id: "1",
  name: "Course Name",
  type: "Course",
  url: "http://canvas-web.inseng.test/courses/1"
}

Change-Id: I222daa312d72dcbc08467a26c9a477f5264550af
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348055
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Dustin Cowles <dustin.cowles@instructure.com>
Product-Review: Dustin Cowles <dustin.cowles@instructure.com>
2024-05-31 21:03:31 +00:00
Mysti Lilla 25ea374b02 Data fix up for broken links from LF-203
fixes LF-1614
flag=none

Test plan
- Check links from any of the bugs relating
  to LF-203 and ensure this data fix can
  find and fix them

Change-Id: If5c1ad90b322de620287f5af90d11147a7e6ae2a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347596
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2024-05-31 20:32:55 +00:00
Jason Gillett 28956ff7bd Handle observers correctly
closes LF-1051
flag=differentiated_modules

Test Plan
1. Create a variety of Discussions assigned in different ways
1a section, student, module override
2. Create an observer
3. Verify that observer can see all discussions that their
observed student can see

Change-Id: Icd05f9fdc6268e9303523cde8d912375992543bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348522
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
2024-05-31 19:05:18 +00:00
Sarah Gerard b0afdbe463 move SQL from ModuleStudentVisibility view to rails
moving logic from a view (that has become too complex
to properly push down WHERE clause predicates) to a
service.  The SQL is existing view definition SQL,
from MigrationHelpers::StudentVisibilities::StudentVisibilitiesV7
with the improvements recommended by DBAs (don't use a view;
put the WHERE clause on each SELECT in the UNION or EXCEPT)

New tests call this service, but no application
code is calling it yet.

flag=differentiated_modules

closes LX-1727

Test Plan:
  - tests pass

Change-Id: I694847d3fb454b11fff71d2cf9c366436dc41b75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348750
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-05-31 18:10:50 +00:00
Spencer Olson 1d074a95fa fix RQD grade display for submissions without scores
Fixes a bug where a student sees a grade on the submission details
page when Restrict Quantitative Data is enabled and the teacher has not
yet graded them.

closes EVAL-4221
flag=restrict_quantitative_data

Test Plan:
* Preqrequisites: a course with restrict quantitative data enabled and
  Assignment Enhancements — Student disabled.
1. Create a letter grade assignment. Attach a rubric to the assignment.
   Ensure you leave "Use this rubric for assignment grading" unchecked.
2. Submit to the assignment as a student.
3. As an instructor, go to SpeedGrader and assign a rubric grade (but
   not an overall grade).
4. As the student, go to the assignment page
   (/courses/:course_id/assignments/:id) and verify no grade is shown.
   Then go to the submission details page
   (/courses/:course_id/assignments/:assignment_id/submissions/:user_id)
   and verify no grade is shown.

Change-Id: Iec8622f34b9b2d5fd8d4812d231d0a09d0a5eb3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348834
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-05-31 17:36:31 +00:00
Keith T. Garner dd5bcacba6 add ability to not encrypt asymmetric jwts
Adds a boolean paramater to the jwt controller's create method called
canvas_audience. If the jwt is for canvas itself, it can continue to
encrypt the asymettric jwt. However, if the consumer wishes to use the
token for a downstream service that isn't canvas, it will not encrypt
it. This parameter defaults to true.

flags=none

test plan:
 - With an authenticate user, hit the /api/v1/jwts endpoint with a POST
   request and set the canvas_audience parameter to false.
 - In a jwt tester like jwt.io confirm that the jwt is not encrypted.
 - With an authenticate user, hit the /api/v1/jwts endpoint with a POST
   request.
 - In a jwt tester like jwt.io confirm that the jwt is encrypted.
 - With an authenticate user, hit the /api/v1/jwts endpoint with a POST
   request and set the anvas_audience parameter to true.
 - In a jwt tester like jwt.io confirm that the jwt is encrypted.

Change-Id: I690b520ed7360aeb253608cd6787ac1ab80a7435
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348831
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-05-31 17:29:39 +00:00
Jacob Windle a71564449b Inbound message translation in Inbox
flag=translate_inbox_messages
closes ADV-111

Why?

- If a message appears in inbox, and not in user's locale, will be translated automatically.
- If message matches user's locale, or was sent as a translated message, then ignore.

Test Plan:

- Enable the Inbox Messages Translation feature flag.
- Send yourself a message in a language that is not your own, do NOT
  use "include translated version of message"
- Go to Inbox, click on messages
- Verify that spinner appears, and translated message shows under original.

Change-Id: Ic0b31b5193dcef9c384f2b0fdeaa9574263b40a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348752
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob Windle <jacob.windle@instructure.com>
2024-05-31 17:14:49 +00:00
balazs.buri baab010df7 ungraded & anon discuss initiated from assignments
refs VICE-4158
flag=react_discussions_post

Test plan:
 - new selenium test passes
 - Have a course
 - Discussion/Announcements redesign feature flag ON
 - Discussion Create/Edit Page React Update flag OFF
 - Navigate to the assignments tab, select the "+" on
    the assignment group, change it to discussion
    and select more options.
 - On the discussions details page add a title, select
   "partial" or "full" under anonymous discussion,
   Remove the "graded" check, and save.
 - Check if discussion is saved succesfully

Change-Id: I149b069c4a08750015812afc7f7a7be71ccc8d67
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348664
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Balázs Buri <balazs.buri@instructure.com>
2024-05-31 16:14:16 +00:00
Riley Crahen a5578c6987 create graphql type for course dashboard card
** Note **
Only includes fields that are working and tested

closes LX-1707

flag = dashboard_graphql_integration

Test plan:
- enable dashboard_graphql_integration feature flag
- ensure new spec passes for all fields of dashboard cards
- Followup: LX-1735
  - add in the rest of the fields
  - (add in arguments and further tests)

Change-Id: I2e71964602570afbfc76c9a07f9449230a9c9615
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348585
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Riley Crahen <riley.crahen@instructure.com>
2024-05-31 16:06:15 +00:00
Jorge Arteaga 640aae1fbb export New Quizzes in common cartridges even if NQ is not enabled
fixes QUIZ-13861
flag = none

test plan:
- go to a course with at least one New Quizzes assignment
- disable New Quizzes for the course
- you may need to restart the canvas-lms containers
for the change to take effect
- go to the course Settings > Export Course Content page
- export the course (common cartridge / IMSCC)
- inspect the export package
- observe that it has New Quizzes
- import the package
- observe that New Quizzes are imported successfully

Change-Id: I1a597f32f137b863b1e56f361ff4d2431ca4d8cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348507
Reviewed-by: Mark McDermott <mmcdermott@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-05-31 14:19:51 +00:00
Drake Harper d984387769 Allow submission preview to use parent submission id
flag=platform_service_speedgrader
refs EVAL-4105

Test Plan:
- in grahpiql, query submissionPreviewUrl on a FileType
 without using the submission_id parameter

Sample query:
query MyQuery {
  legacyNode(_id: "187", type: Assignment) {
    ... on Assignment {
      id
      name
      submissionsConnection {
        nodes {
          _id
          userId
          attachments {
            submissionPreviewUrl
          }
        }
      }
    }
  }
}

Change-Id: Ie2477ff953c43e39e6ee9ea882ce39d728d87a22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348513
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2024-05-30 19:43:11 +00:00
jonathan 33fe1c781e validate group set before opening assign to tray
fixes LX-1642
flag = differentiated_modules

Test plan:
- Go to the assignment edit page
- Mark the assignment as a group assignment.
- Do not choose a group category
- Click the button to open the tray.
- Expect to see an error message stating that you need to select a
group set

Change-Id: I4b0e03f3d98b29e11a4a741ee48b3cb35e46f50c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348643
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2024-05-30 19:16:09 +00:00
davidwenzlick fc09fc53fb Replace buttons with dropdown on user profile
closes OUT-6335
flag=none

[skip-crystalball]

Test plan
- In account settings, enable the following settings
  - Enable Profiles
  - Users can edit their profile
  - User Avatars
    - Enable Gravatar
- Navigate to http://<shard>.canvas.docker/profile
- Click the pencil icon in the lower right of the avatar image
- Use the drop down to toggle the picture options
- Change your avatar by uploading an image
- Change your avatar by using gravatar

Change-Id: Ibe79152a6e1fa6ab4268eae40a8db635cc04a206
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348354
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wilmer Corrales <wilmer.corrales@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-05-30 18:17:02 +00:00
Dustin Cowles c3e952a1a4 add TopNavigationTools
closes ADV-104
flag=top_navigation_placement

Test plan:
- NOTE: You must restart the web container after running Setting.set

- PreReqs:
  - A tool with the `top_navigation` placement
- On a Canvas page with the Top Navigation, check the following
 - Without the tool in the allow list
  - ENV does not have key `top_navigation_tools`
  - No tool buttons show up in the navigation bar
 - With the tool in the allow list by dev key
Setting.set("top_navigation_allowed_dev_keys", "global-dev-key-id")
  - ENV.top_navigation_tools is populated with the tool config
  - The tool menu button shows up in the top navigation bar
  - The tool is listed in the menu and can be launched in drawer
  - Adjust the page to mobile width
   - Ensure the tool menu shows up in mobile header and can be launched
    - The tool should open in a tray that overlays the content
  - Repeat with the tool only in the domain list
Setting.set("top_navigation_allowed_dev_keys", "")
Setting.set("top_navigation_allowed_launch_domains", "tool-launch-domain")
 - With the tool in either allow list, add it to the pinned keys list
Setting.set("top_navigation_pinned_dev_keys", "global-dev-key-id")
  - Ensure the tool has a dedicated button in top nav and the tool menu
    is not rendered.
  - Repeate with the tool only in the allowd domains list
Setting.set("top_navigation_pinned_dev_keys", "")
Setting.set("top_navigation_pinned_launch_domains", "tool-launch-domain")
- With the tool in the pinned list but not the allowed list, ensure it
  is not rendered in the top navigation menu and is not in ENV.

Change-Id: I267b78316e54dab7f811e3a7d8eaa752668ac5db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347352
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Dustin Cowles <dustin.cowles@instructure.com>
2024-05-30 18:14:38 +00:00
Dustin Cowles a3cc55f4f6 remove per-page drawer layout implementation
This removes the experimental per-page implementations of the
ContentTypeExternalToolDrawer component in favor of the global
implementation introduced as part of the top_navigation placement.

refs: ADV-104
flag=none

Test Plan:
- Assignments page loads without errors
- Wiki Page loads without errors
- The ContentTypeExternalToolDrawer component is not
  rendered on either page.

Change-Id: I19a69e4a4c0b926f6f1b88c7560fda6708dae85c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347598
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
2024-05-30 18:14:23 +00:00
Martin Yosifov 351110fc19 Allow User to Add Their Name Pronunciation to Profile
closes OUT-6342
flag=none

Test plan:
- Run migrations and rebuild css
docker-compose run --rm web bin/rails db:migrate
docker-compose run --rm web yarn brandable_css
- Go to Account -> Settings, check Enable Name
Pronunciation then click Update Settings button
- Go to Account -> Profile, click on the 3 dots, select
edit profile, enter custom name pronunciation longer
than 255 chars and click Save Profile button
- Verify that "Name pronunciation is too long" error
is displayed above the pronunciation input field
- Edit name pronunciation to be less than 255 chars and
click Save Profile button
- Verify that profile displays the custom name pronunciation
and that the view matches the figma design linked in ticket
- Go to Account -> Settings, uncheck Users can edit their
name and click Update Settings button
- Create user, act as user, repeat the above steps and
verify that workflow is similar except that the edit
view matches the alternative design linked in ticket

Change-Id: I9b40d06f73666fbdfb77261c10a65bfdce7c8184
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346833
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Anderson <jason.anderson@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Jason Anderson <jason.anderson@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-05-30 18:12:16 +00:00
Sarah Gerard 08d9ceb884 move SQL from UngradedDiscussionStudentVisibility view to rails
moving logic from a view (that has become too complex
to properly push down WHERE clause predicates) to a
service.  The SQL is existing view definition SQL,
from MigrationHelpers::StudentVisibilities::StudentVisibilitiesV7
with the improvements recommended by DBAs (don't use a view;
put the WHERE clause on each SELECT in the UNION or EXCEPT)

New tests call this service, but no application
code is calling it yet.

flag = differentiated_modules

refs LX-1727

Test Plan:
  - tests pass

Change-Id: Ia6f3fd3f6edc4f90f5d0686ce8f84e38c722d6fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348646
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-05-30 17:36:16 +00:00
Sarah Gerard 63655eba46 move SQL from QuizStudentVisibility view to rails
moving logic from a view (that has become too complex
to properly push down WHERE clause predicates) to a
service.  The SQL is existing view definition SQL,
from MigrationHelpers::StudentVisibilities::StudentVisibilitiesV7
with the improvements recommended by DBAs (don't use a view;
put the WHERE clause on each SELECT in the UNION or EXCEPT)

New tests call this service, but no application
code is calling it yet.

flag = differentiated_modules

refs LX-1727

Test Plan:
  - tests pass

Change-Id: I619e33b5762643604dffacdaf394649002c29e06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348638
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-05-30 17:05:28 +00:00
Cody Cutrer 69e5ebc777 bundle update rubocop
and apply new cop 99% Style/SuperArguments

and a couple Layout/EmptyComment and Style/ArgumentsForwarding that
are found by fixes in those cops

Change-Id: Icc0af9c8065f035bca43868b564f73e8776052f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348626
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2024-05-30 16:20:52 +00:00
Jason Gillett 84f10cbfda Add checkpoint data to submissions and assignment group API response
closes VICE-4287
flag=discussion_checkpoints

Test Plan
1. create assignments with Checkpoint data
2. Open assignment index page as student
3. Verify
3a: assignment api has: checkpoints
3b: assignment api has: discussion_topic reply_to_entry_required_count
3c: submissions api has: sub_assignment_submissions

Change-Id: I5144c4a1dc38d0e969f7a4d301d29fccb6cebb2d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348368
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
2024-05-30 16:17:02 +00:00
Jacob Windle a4e3b27be6 Detect src_lang if nil, use user locale if present
- Use language detection + user locale for smarter translation controls

flag=translate_inbound_message
refs ADV-111

Test Plan:
  - Run the spec tests, verify that everything passes.

Change-Id: I8bd7302a6f0311c85e38955dcd3c25bb5860cdf7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348580
Build-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2024-05-30 15:57:05 +00:00
gergo.szendrei 87554deb75 Add copy/duplicate functionality for Global Announcements
refs VICE-4269
flag=none
test plan:
- copy function should prepopulate the new announcement form

Change-Id: I276c030def4ffca06063c194b535c08e6ea0366c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348299
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Daniel Matyas Vincze <daniel.vincze@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2024-05-30 06:59:59 +00:00
Dora, Csolakov 5e8f39291d Discussion Redesign 'Quote Reply' removes bullet points
refs VICE-4253
flag=none

testplan:
1.create a discussion
2.reply to the discussion, the reply should contain bullet points
3.in the reply click the kebab menu and choose "Quote Reply"
4.verify that the quoted reply kept the bullet points

Change-Id: I01f592facf28a01131b7016e89eb9b47638f1016
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348400
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2024-05-30 06:27:51 +00:00
Jen Smith f7373e230c move SQL from WikiPageStudentVisibility view to rails
moving logic from a view (that has become too complex
to properly push down WHERE clause predicates) to a
service.  The SQL is existing view definition SQL,
from MigrationHelpers::StudentVisibilities::StudentVisibilitiesV7
with the improvements recommended by DBAs (don't use a view;
put the WHERE clause on each SELECT in the UNION or EXCEPT)

New tests call this service, but no application
code is calling it yet.

flag = differentiated_modules

closes LX-1730

Test Plan:
  - tests pass

Change-Id: Ia41766b701810d6a57ae8bd9519b2c7153e7f1a7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348524
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-05-29 23:13:59 +00:00
Jen Smith 68a75d409d move SQL from AssignmentStudentVisibility view (v2) to rails
moving logic from a view (that has become too complex
to properly push down WHERE clause predicates) to a
service.  The SQL is existing view definition SQL,
from MigrationHelpers::StudentVisibilities::StudentVisibilitiesV7
with the improvements recommended by DBAs (don't use a view;
put the WHERE clause on each SELECT in the UNION or EXCEPT;
use DBA optmized version of the CTE temp table)

New tests call this service, but no application
code is calling it yet.

flag = differentiated_modules

closes LX-1726

Test Plan:
  - tests pass

Change-Id: I5ec93257e17218ec795bacaad27f132dc081a13d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348523
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-05-29 22:37:05 +00:00
Caleb Guanzon c3019873e9 truncate and tooltip group selector
fixes VICE-4185
flag=react_discussions_post

test plan:
- visit people page and create
a group set with a very long name
- visit course discussions and create a discussion
assigned to this group category
- visit the discussion as a teacher
- open group selector
- verify that bug in ticket no longer happens
- verify that tooltip appears on hover and focus
on group menu item
- verify tooltip shows full group name
- verify menu text is truncated in the middle
so that nothing bleeds past the menu box

Change-Id: I04c4c3c64c64ed729d6826cca4a6e56a073a8330
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348611
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2024-05-29 21:41:36 +00:00
Spencer Olson ebda45d18c unify SpeedGrader text
closes EVAL-4203
flag=none
[fsc-max-nodes=30]

Ensures wherever we refer to SpeedGrader that we use "SpeedGrader"
(one word, with the "S" and "G" capitalized).

Test Plan:
- specs pass

Change-Id: I1e4c331866cb698b7eee70e62c6a203e088c6d0c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348456
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Melissa Kruger <melissa.kruger@instructure.com>
2024-05-29 18:41:43 +00:00
gustavo.bernardes 43583db4fa fix hover persistence on sidenav
This commit aims to fix the following issues:
1 - Highlighted Icons now persist in collapsing
2 - Navigates through Tray icons should back to
the previously selected option after closing it

closes FOO-4435
flag=instui_nav

test plan:
- Log in to Canvas as an Admin
- Go to RootAccount > Settings > Feature Options >
Enable New InstUI NavBar
- This should render the new Sidenav
- Click on a Tray Icon
  - The option should be highlighted
  - Refresh the page
  - The previous option should stay highlighted

Change-Id: I7ccf1624580f3835dcc7c1966975031221a7f378
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348565
QA-Review: Gustavo Bernardes <gustavo.bernardes@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Gustavo Bernardes <gustavo.bernardes@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
2024-05-29 18:33:57 +00:00
Omar Gerardo Soto-Fortuño 7c323fbc77 Fix the SubmissionAggregatorService to aggregate correctly Pass/Fail
closes VICE-4311
flag=react_discussions_post
flag=discussion_create
flag=discussion_checkpoints

Test plan:
 - Specs pass.
 - Use the Traditional Gradebook to test
     how aggregation works.
 - Complete + Complete = Complete
 - Incomplete + Incomplete = Incomplete
 - Complete + Incomplete (or vice-versa) = Incomplete
 - Ungraded + Ungraded = Ungraded

Change-Id: Ib6ca3de0c0568ca727a03eb0a48991a2d54f0ce4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348215
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-05-29 18:21:14 +00:00
Angela Gomba bd6db735b8 Sortable User Course List
closes OUT-6339 OUT-6346
flag=none

Test Plan:
- There are many cases that are handled by the automated and unit
  tests. The following steps are to ensure the page loads
  and behaves properly:
- Open the User Courses page (/courses)
- Observe that each column now has a sorting icon next to the
  column name
- Observe that the Published column is default sorted in
  ascending order
- Click through the different columns and observe that sorting
  by those columns and in descending order works as expected

Change-Id: Ie522e17f161f2a4d0ed8c35f62c5006162de9bd5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346737
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-05-29 17:42:41 +00:00
Cody Cutrer 93494dde71 bundle update rubocop-rails
applying Rails/HttpStatus and Rails/WhereRange

Change-Id: Ib65d7896343e69501086cddbb75a231009c567d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347820
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2024-05-29 16:33:01 +00:00
Bence Arpasi bbe0dd4063 Score call with activityProgress=Initialize retains submission status
closes INTEROP-8605
flags=none

test plan:
* Create an Assignment with an External Tool
* If you dont use the LTITestTool get an advantage_token
* Submit an AGS Score with activityProgress=Initialize
* Check the Result's Submission model workflow_state field
* Before this commit it is going to be "submitted"
* After this commit it is going to stay "unsubmitted"

Change-Id: I5a62afed699b28848601ccbc011e6faed5614d8d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348554
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Bence Árpási <bence.arpasi@instructure.com>
2024-05-29 15:54:45 +00:00
Tucker McKnight 7c32829cb7 Create an Lti::RegistrationAccountBinding if one doesn't exist
If we are creating or updating a DeveloperKeyAccountBinding,
and it doesn't have a corresponding Lti::RegistrationAccountBinding,
create one.

If the current_user is set (which would happen when this is called
from the developer_key_account_binding_controller), set that as
the created_by and updated_by user. Otherwise, we'll have to just
leave that as nil.

Also make the create_lti_registration after_save hook get called
*before* the create_default_account_binding hook, so that the
lti_registration will already be there when we create the
default account binding (and thereby the corresponding lti
registration account binding).

fixes INTEROP-8575

flag = none

test plan:
- Create a new developer key account binding
  - Verify that DeveloperKeyAccountBinding.last.lti_registration_account_binding
    exists
- Update an existing developer key account binding (e.g. if it is on, do
  dev_key_account_binding.update!(workflow_state: :off)
  - See that a Lti::RegistrationAccountBinding has been newly-created for it

Change-Id: I687612513a95659e1bf83a3f98d8125e32aef859
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347832
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-05-29 15:48:11 +00:00
Tucker McKnight 580dbbf45f Update RegistrationAccountBinding and DevKeyAccountBinding on save
refs INTEROP-8575

Change-Id: I321bcffad3c68191e22a435f8f2e337cc4d3e890
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347227
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-05-29 15:47:52 +00:00
Xander Moffatt 7ecf32b8a0 support Lti::Registration API show
why:
* to facilitate showing and eventually editing an LTI registration
using the new Manage Extensions UI

closes INTEROP-8608
flag=lti_registrations_page

test plan:
* create an Lti::Registration in the rails console, using an Account,
a User, and a name or two
* create an Lti::RegistrationAccountBinding for that registration and
Account
* if you have dynamic registration set up, create an
Lti::IMS::Registration using dynamic registration, then in the rails
console set the ims_registration's `lti_registration` to the newly
created Registration
* use an HTTP client to send a GET request to this endpoint:
`<canvas>/api/v1/accounts/<id>/lti_registrations/<id>`
* the request should return the serialized Lti::Registration, including
the account binding, configuration from the Dynamic Registration, and
the User objects for created/updated_by
* with the flag disabled, this endpoint should 404
* if your user doesn't have the manage_lti_registrations permission,
or you are logged out, this endpoint should 401

Change-Id: I7ab6bc70eb678f5171514b1d5fdc352a15f4dbca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347250
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
2024-05-29 12:41:07 +00:00
Xander Moffatt 96213adfe0 support API Lti::Registration delete
why:
* first and smallest API endpoint for Lti::Registrations
allows us to lay down some foundational boilerplate, like
  * API models in controller docs
  * API shape via serializer, including account binding and
  tool configuration

closes INTEROP-8505
flag=none

test plan
* create an Lti::Registration in the rails console, using an Account,
a User, and a name or two
* create an Lti::RegistrationAccountBinding for that registration and
Account
* if you have dynamic registration set up, create an
Lti::IMS::Registration using dynamic registration, then in the rails
console set the ims_registration's `lti_registration` to the newly
created Registration
* use an HTTP client to send a DELETE request to this endpoint:
`<canvas>/api/v1/accounts/<id>/lti_registrations/<id>`
* the request should return the serialized Lti::Registration, including
the account binding, configuration from the Dynamic Registration, and
the User objects for created/updated_by
* the Lti::Registration should be marked workflow_state: 'deleted'

Change-Id: Ic78e1bd1056f4ee8b8aa3db7853c55b1b2cd94e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346988
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2024-05-28 23:36:33 +00:00
August Thornton 2bfb1350d8 remove guard from active duplicate merge data objects
We have a guard in place to end the user merge early if there is already
an active merge. However, it’s possible on user split a different user
merge data object is used, leaving behind a prior active one that could
potentially trigger the error. Given these circumstances, I’m going to
remove this guard as it causes more confusion than good in most cases.

refs FOO-4479
flag = none

test plan:
- create two active user merge data objects with the same from_user_id
  and user_id combination
- run the split_db_users method and verify that the second merge data
  object does not get picked up
- user merges should still work as expected

Change-Id: Ic495a5fa2b7bb38ed52c6c86e19f7bf34bb38bc7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348515
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2024-05-28 23:01:53 +00:00
Jacob Windle bb47c62b2b Strip HTML from post message in translation
flag=translate_compose_message
refs ADV-113

- Update translation controls to present in users' preferred locale.
- Append translated message to original discussion post message.

Change-Id: I7fd6f3451d11cd45afb41d1aa0a2426b9d7e3f7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348462
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Jacob Windle <jacob.windle@instructure.com>
Product-Review: Jacob Windle <jacob.windle@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-05-28 22:19:40 +00:00
Steve McGee 80b6535a00 sync DeveloperKey and Lti::Registration on save
why: An existing DeveloperKey can be updated, or a new one can be
     created, from the existing DeveloperKey UI or from other sources.
     We want to keep the LIME page in sync with the existing state of
     the world until we cut over to using it, so a corresponding
     Lti::Registration needs to be created and kept in sync for each
     LTI 1.3 DeveloperKey.

closes: INTEROP-8576
flag=none
[pin-commit-multiple_root_accounts=a1383c040391503c889e28fffc50f66961e981cb]

test plan:
would be easiest to start with no Lti::Registrations locally
- when you update the name of an existing Developer Key you should be
  able to check in a rails console for a new registration to have been
  created.
- then update that same developer key name again and you should now be
  able to check in a rails console that the previously created
  registration has been updated

Change-Id: Ifd1dde6670c1e2e12ca9d67f48cd07251dfde8d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346498
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2024-05-28 22:05:02 +00:00
Evan Battaglia 18f48b26da spec: convert qunit spec to jest
refs INTEROP-8581

[fsc-max-nodes=18]
[fsc-timeout=40]

Change-Id: Ibd0cf1d1ade86b5c4901e556b66583a4f8f95483
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346980
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2024-05-28 21:44:04 +00:00
Sarah Gerard bf2e54176f Correctly set only_visible_to_overrides
only_visible_to_overrides should be set to false
IF - there is an everyone card that is NOT because of
a course override, or if there are only module overrides.
Otherwise only_visible_to_override should be set to
true.

closes LX-1670
flag=differentiated_modules

test plan:
- this should work anywhere the tray works, test
  in assignment edit pages and discussion edit
  pages as well
- have a module with assignment overrides and a learning
  object in the module
- I suggest having a rails console open to check the
  value of only_visible_to_overrides as you test.
  Aka, run learning_object.only_visible_to_overrides
- if you're testing a graded discussion, run
  discussion.assignment.only_visible_to_overrides
- open the assign to tray for the object, and add an override
- expect only_visible_to_overrides to be true
- remove the override, leaving only the module overrides
- expect only_visible_to_overrides to be false
- if you add everyone back to the assignment, because you are
  adding everyone through a course override,
  only_visible_to_overrides should be true.
- expect behavior without any module overrides to be the same
  (aka, if there is an everyone card then only_visible_to_overrides
  is false)

Change-Id: I6fd71ec27227df72c7d9c8227660b6242057a411
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348243
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2024-05-28 19:32:13 +00:00