Commit Graph

25095 Commits

Author SHA1 Message Date
Cody Cutrer b77e9f969b remove OpenObject usage
it's really just OpenStruct, which needs to be removed because it has
abysmal performance, and is being removed from Ruby 3.4

Change-Id: I9b692bfefaee7649cf117d846047e531a7e09309
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345718
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-04-23 17:47:19 +00:00
Caleb Guanzon 5213903e17 show view due dates button for student view checkpoints
flag=react_discussions_post
flag=discussion_create
flag=discussion_checkpoints
fixes VICE-4199

Change-Id: Ifb38282b822ff2f400a04e089aeb240cc0b18367

important things to note:
- for all scenarios, show due dates (number)
now only says View Due Dates to match figma
and latest product decisions

test plan:
- create a checkpointed discussion
- as a student, view the discussion
- verify you see a View Due Dates button
- verify than when you click on it,
you see an empty tray
(contents will be introduced in a different ticket)

Change-Id: I47b965857d552e38c776e1101149033fb5fcaeda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345889
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2024-04-23 17:31:36 +00:00
Jason Gillett 4dd1a7627f spec: graded to ungraded edit
flag=discussion_create
flag=discussion_checkpoints

Change-Id: Ic91101b568490a452fdf08a43b816ba6fa126aa5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345978
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2024-04-23 17:07:03 +00:00
Eric Saupe 9fc94bda39 spec: Remove enzyme.mount calls from various specs
fixes LF-1431
flag = none

test plan:
- tests pass
- tests continue testing what they did before

Change-Id: Ib77d437a5f3aed1787b63624516414fdee3782cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345701
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2024-04-23 16:32:48 +00:00
Samuel Lee f5af977ec2 fix discussion edit endpoint to create checkpoint
fix the discussion edit endpoint to create
checkpoints if none are found. This is to allow
editing a non checkpointed discussion into a
checkpointed discussion

closes VICE-4216
flag=discussion_checkpoints
flag=discussion_create

Test Plan:
- have a graded discussion that is not
  checkpointed
- go to edit the discussion and make it a
  checkpointed discussion and input checkpoint
  settings values
- save the discussion
- go back to edit the discussion and see that
  the discussion is now checkpointed with the
  respective checkpoint settings values

Change-Id: If8d285fd4c168ed0d02bf07a5198003c25ac31b3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345780
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
2024-04-23 16:23:09 +00:00
Drake Harper cecaf7659b Add submissionCommentDownloadUrl to submission interface
refs EVAL-4106
flag=platform_service_speedgrader

Test Plan:
- should be able to query submissionCommentDownloadUrl on submissions
- should see submissionCommentDownloadUrl in response in SG2

Sample Query:
query MyQuery {
  __typename
  legacyNode(_id: "1019", type: Course) {
    ... on Course {
      id
      _id
      name
      assignmentsConnection(filter: {userId: "5"}) {
        nodes {
          _id
          name
          submissionsConnection {
            nodes {
              submissionCommentDownloadUrl
            }
          }
        }
      }
    }
  }
}

Change-Id: Ie24328deb0e3df7e6cf86bdf3ea8164076985468
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345379
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@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-04-23 16:21:22 +00:00
Sarah Gerard 159cd82a95 Check for section visibilities in date_details api
Because ungraded discussion topics were previously
able to be differentiated by section, we need to ensure
that those sections are present in the assign to tray.
Note that the test plan uses the 'Post to' section
of the discussion edit page, which will be eventually
removed when the flag is on. This functionality is so
far only for the tray outside of the discussions edit
page.

closes LF-1493
flag=differentiated_modules

test plan:
- create an ungraded discussion and use the 'Post to'
  drop down to assign it to a certain section.
- save, and then open the assign to tray for that
  discussion
- expect to see the section assigned in the tray. Do not save
  the tray yet
- add the ungraded discussion to a module
- assign that module to the same section that the you assigned to
  the discussion
- open the tray again for the discussion, expect to still only see
  the section override (should not say inherited from module)
- save the tray, try making edits to the overrides, expect
  the tray to behave as normal.

Change-Id: I8d3967ffc18237b78821c541ee09cd3958830ab5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345626
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2024-04-23 16:06:10 +00:00
Jason Gillett ae0554b895 Add assignTo button to discussions index
closes LF-1383
flag=differentiated_modules

Test Plan
1. Open discussions index page
2. Open various discussions using new assign to menu option
3. Verify that discussion are displayed correctly
4. Verify that assignments are made correctly

Change-Id: Ib1d0b58c65d34a9643b726b72e651db4f04c8d3f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345869
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-04-23 15:17:07 +00:00
jonathan 3dce10beaa Add tray to page edit/create page
closes LF-1388

flag = differentiated_modules

Test plan:

- Go to edit page view
- Expect to see the Manage Assign to Link option
- Click on the link
- Wait for the allocation tray to be open with the overrides on the
cards
- Make some changes
- Save tray changes.
- Save edit page changes.
- Expect the changes to persist
-Expect the pending changes pill, cancel button (rollback of changes)
and rest of functionality to work as they do on the assignment page.
- Make sure the tray works properly on pages creation.

Change-Id: I3b33d1ef1f31b21216597d3aed8465c26f348b75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345644
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: Jonathan Guardado <jonathan.guardado@instructure.com>
2024-04-23 00:20:35 +00:00
Samuel Lee 034256e11f add checkpoints to update discussion mutation
add checkpoint to create discussion mutation.
This only supports reply to entry, reply to topic,
and additional replies required fields. This also
only supports updating a discussion with existing
checkpoints as the checkpoints updater service
will need to be modified to create checkpoints
if there are no existing checkpoints. This fix
will be done in VICE-4216.

closes VICE-4105
flag=discussion_checkpoints
flag=discussion_create

Test Plan:
- update an existing discussion with checkpoints
- set new points possible for reply to entry and
  reply to topic
- set new additional replies required
- save the discussion topic
- go to edit the discussion and confirm that
  the discussion is updated with the new values,
  can also confirm in rails console the sub
  assignment objects
- unclick the checkpoints checkbox and click save
- go back to edit the discussion and confirm
  that the checkpoints checkbox is no longer
  checked
- click on the checkpoints checkbox and confirm
  that the values in checkpoint settings are
  back to the default values
- in the rails console, confirm that
  the checkpoints have been deleted by checking
  the count of the sub assignments

Change-Id: Ifd2c118e58ec0781e1b94882be424d4ecec6bb48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345514
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2024-04-22 20:09:58 +00:00
Eric Saupe f1a929bfe0 spec: Remove enzyme.mount from various test files
fixes LF-1432
flag=none

test plan:
- tests pass
- tests are still testing what they were before

Change-Id: I7974a84dea2d57fbc0618baa135b50a5f871ccde
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345879
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2024-04-22 19:36:51 +00:00
Dustin Cowles 7c485d8a53 add external tool drawer to wiki pages
closes ADV-78
flag=external_tool_drawer

Test plan:
- PreReqs:
  - A tool with the `wiki_page_menu` placement
    and the `tray` launch_method.
  - Feature flag enabled
- Ensure the tool launches from the Wiki Page Menu
  and is placed in a Drawer on the right side of the layout.
- Ensure the DrawerLayout behaves correctly when resizing.
  - It should convert to a Tray when the viewport is small.
  - It should convert back to a Drawer when the page is expanded.
  - The breakpoint to convert back to a drawer is expected to be wider
    than the breakpint to convert to a Tray.
  - Rezizing quickly can cause the Tray not to convert back to a drawer.
    This is a limitation of the inst-ui component and out of scope.
- Verify placement also works for Students without Page Edit permission.
 - Students will only be able to see the menu if there are tools with
   the `tray` launch_method and other tools will be hidden.
- Verify placement works on mobile, though the layout will always be in
  Tray mode.
- With the external_tool_drawer flag disabled:
 - Ensure Student does not see the gear menu.
 - Ensure the Teacher only sees tools without `tray` launch_method in
   the gear menu.

Change-Id: Ice1d1a80ea9a0d89e46c107c186afca592fd7929
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343909
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-04-22 18:47:55 +00:00
Caleb Guanzon 897137beb3 add subAssignmentSubmissions to create discussion entry mutation
flag=react_discussions_post
flag=discussion_create
flag=discussion_checkpoints

fixes VICE-4214

test plan:
- create a checkpointed graded discussion
- as a student
- visit /graphiql
- create a new discussion root entry via graphql
```
mutation MyMutation {
  __typename
  createDiscussionEntry(input: {discussionTopicId: "7", message: "another day"}) {
    discussionEntry {
      _id
      message
    }
    errors {
      attribute
      message
    }
    mySubAssignmentSubmissions {
      _id
      submissionStatus
      submissionType
      submittedAt
      subAssignmentTag
      state
    }
  }
}
```
- where discussionTopicId and message are something you supply
- verify response looks like this
```
{
  "data": {
    "__typename": "Mutation",
    "createDiscussionEntry": {
      "discussionEntry": {
        "_id": "29",
        "message": "another day"
      },
      "errors": null,
      "mySubAssignmentSubmissions": [
        {
          "_id": "128",
          "submissionStatus": "submitted",
          "submissionType": "discussion_topic",
          "submittedAt": "2024-04-16T14:05:16-06:00",
          "subAssignmentTag": "reply_to_topic",
          "state": "submitted"
        },
        {
          "_id": "155",
          "submissionStatus": "submitted",
          "submissionType": "discussion_topic",
          "submittedAt": "2024-04-16T15:33:22-06:00",
          "subAssignmentTag": "reply_to_entry",
          "state": "submitted"
        }
      ]
    }
  }
}
```
-where for reply_to_topic, submissionStatus is submitted
- and reply_to_entry, only returns submitted when you have enough entries
to satisfy number of additional replies required

Change-Id: Idfee9c17b595ab1e14354e1c3c7fde9e10c0c813
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345606
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-04-22 18:37:12 +00:00
Jorge Arteaga fe6dffd959 convert links in New Quizzes QTI/XML during CC exports
closes QUIZ-13331
flag = none

test plan:
- create a course in Canvas
- add a wiki page
- add an assignment
- create a New Quiz with at least
one question
- on rich content fields, insert
"internal links" to the wiki page
and the assignment
(feel free t add more internal links
if you have more resources that could
be linked)
- on a rich content field, attach an
image
- export the course and download the .imscc
file
- go to an empty course and import the .imscc
package without migrating to New Quizzes
- observe that all the links on rich content fields
work
- go to an empty course and import the .imscc
file, migrating CQ to NQ
- observe that links appear on the rich content
fields

- Important note: there is a known issue with
Common Cartridge imports where some internal links
don't work in New Quizzes generated by converting
CQ into NQ. For example, wiki page links, and links
to classic quizzes that were migrated into NQ during
the import.

Change-Id: I109a63daf5996dec2dfcecd030dc43852c3d9766
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344713
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Griffin Zody <griffin.zody@instructure.com>
QA-Review: Griffin Zody <griffin.zody@instructure.com>
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
2024-04-22 14:58:09 +00:00
Rohan Chugh 50db70eecd Revert "fix issue with grading selector"
This reverts commit ea1c6b8154.

Reason for revert: re-factor to be minimal change that fixes issue

Change-Id: I287ad5c0806bdf9af834eecd8360cc050e2a6401
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345731
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
2024-04-20 02:28:36 +00:00
rohanchugh14 ea1c6b8154 fix issue with grading selector
add check to cover property not being defined

closes EVAL-4122

flag=archived_grading_schemes

test plan:
- tests pass
- grading schemes selector shows up when creating a new graded
  discussion

Change-Id: I1247f0fdb9e7d1bbfa51edad3d40200438cf3097
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345720
Reviewed-by: Cameron Ray <cameron.ray@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-04-20 01:31:47 +00:00
Cody Cutrer be20e877ae remove OpenStruct usage from AccessToken
Change-Id: I3a203d298a01e2e6f355a0cd4e401ecd42fb37c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345275
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-04-19 21:12:49 +00:00
Tucker McKnight 84a1371aed Retry once when saving submissions
If two submissions are saved in rapid successon,
the simply_versioned gem can throw a unique constraint
error when it tries to create new records.

simply_versioned creates a new version of a record, which
is numbered as simply (previous_version_number + 1). The
version numbers must be unique. So, if two get started at
the same time -- or almost the same time -- they can
have the same number.

The unique_constraint_retry method will retry whatever
is in its block one time if there is a unique constraint
error. Retrying one time should be enough for us to avoid
this simply_versioned error that we're getting; in our
logs, we rarely get more than one in a row. The stack
traces show that it's happening in the broadcast_group_submission
method.

fixes INTEROP-8494

flag = none

test plan:
- specs pass

Change-Id: I0fa67c9c766e98f27a29c83a45576b5900164ed9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345096
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2024-04-19 19:34:08 +00:00
rohanchugh14 0a8628e50a fix viewing with archived grading schemes
fix issues with using the wrong endpoint when requesting schemes and
summaries for archived grading schemes. added query parameter to the
endpoints to allow for course scheme management page to include
archived schemes.

closes EVAL-4101

flag=archived_grading_schemes

test plan:
- make a grading scheme
- change an assignment to letter grade and choose that grading scheme
- save those changes
- go back to the edit assignment page, and click manage all grading
  schemes
- archive the grading scheme that is assigned to that assignment
- close the manage grading schemes modal
- ensure that the grading scheme is still assigned to the assignment
  and still selected
- go back to the manage grading schemes modal
- archive some schemes
- ensure they are not shown in the course settings page nor the
  assignment edit page when choosing a grading scheme (unless they are
  set to that assignment's grading scheme or the course default)
- ensure that when you close out of the manage schemes modal and open
  it again, they show up in the archived schemes table
- go back to the course settings page and select an account scheme from
  the dropdown
- click 'view'
- ensure that the pencil icon to edit the scheme is disabled
- do the same from the assignment edit view

Change-Id: I4c67f9062172997d0ff94dd203ed95af71b96508
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345365
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-04-19 19:15:12 +00:00
Murilo Paiva fc18e6ce82 Revert "Remove from canvadocs session the crocodoc_id"
flag=none

fixes CAS-1765

This reverts commit 9db9e4ecf0.

Reason for revert: This may be causing CAS-1765 bug

Change-Id: Ia4539249f9dd3e0129290693440964ae8e835bc5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345398
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Luis Hilario <luis.hilario@instructure.com>
Product-Review: Luis Hilario <luis.hilario@instructure.com>
QA-Review: Luis Hilario <luis.hilario@instructure.com>
2024-04-19 18:37:09 +00:00
juan.chavez e02580e2e3 Add 'Assign To' tray to wiki index page
closes LF-1387

flag=differentiated_modules

[fsc-max-nodes=30] [fsc-timeout=60]

test plan:
- As a teacher, open a wiki page show page.
> Verify that the Assign To button appears.
- Click it.
> Verify that the Assign To tray appears.
> Verify that you can add/update assignees
 and dates.
- Verify that the data is persisted
(re-opening or refreshing).
- As a student, open a wiki page show page.
> Verify that the Assign To button does not
appear.

Change-Id: I36bb3f6e6c69dbb368de76d44ea59806abed78c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345594
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: Juan Chavez <juan.chavez@instructure.com>
2024-04-19 18:28:54 +00:00
Spencer Olson 7144a54a10 support group assignments for sg2
refs EVAL-3842
flag=platform_service_speedgrader

Test Plan:
1. Enable Platform SpeedGrader
2. Create a group assignment (grading students as
   as group).
3. Go to SpeedGrader and verify the dropdown
   contains group names.
4. Change the student_id query param to be the ID
   of a student that is part of a group but is not
   the group represenative. Then navigate to
   SpeedGrader. Notice the student_id query param
   is changed to the group rep's ID.
5. Change the assignment to grade group students
   individually.
6. Go to SpeedGrader and verify the dropdown
   contains student names.
7. Verify the comments section includes the option
   to send the comment to the individual or the
   group. Try sending a comment to the individual
   and to the group and verify it works.

Change-Id: I3cbc9e57877b2b62ca3a018191483f3b75662451
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344689
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2024-04-19 17:45:39 +00:00
Ryan Hawkins b2ff0fe722 Create Lti::Registration table and model
why:
- For the LIME project, we decided to rework the current data model for
  storing LTI related data. The current system is quite old and has
  accumulated a lot of tech debt from little patches over the years, so
  we hope to refine and simplify the data model as much as is reasonably
  possible.
- This is the first step/table in that process.

closes INTEROP-8499

flag=none

test-plan:
- Setup sharding and ensure you have the relevant sharding update commit
  checked out (see the ticket description)
- Pull the commit and run your database migrations.
- A new "lti_registrations" table should have been created with the
  appropriate columns as listed in the ticket.
- Rollback the migration that's part of this commit and ensure that it
  completes successfully.
- Ensure that you have a user on a different shard.
- Run the migration again and ensure that you can create an
  Lti::Registration with something like:

```
user = Shard.second.activate { User.first }
Lti::Registration.create!(account: Account.default, name: "registration",
  created_by: user, updated_by: user)
```
  Note that those are all of the required fields

Optional, as these are tested by the specs themselves:
- Ensure that the Lti::Registration requires an account and a
  created_by/updated_by to be created/saved.
- Ensure that the Lti::IMS::Registration can be associated with the
  Lti::Registration model.
- Ensure that the DeveloperKey can be associated with the
  Lti::Registration model.

Change-Id: If7e8198956875a25fc8e545e3692e39e928222fe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345088
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: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
2024-04-19 17:30:13 +00:00
Dustin Cowles d8e5a1376a support tray launch_method
closes ADV-75
flag=none

Test Plan:
- Create a tool with the new placement and launch method
  ```
  {
      "placement": "wiki_page_menu",
      "message_type": "LtiResourceLinkRequest",
      "launch_method": "tray"
  }
  ```
- Ensure the tool is placed and launches from Wiki Page Menu
- The tool will launch full-page until a future PS

Co-authored-by: Dustin Cowles <dustin.cowles@instructure.com>
Co-authored-by: Paul Gray <paul.gray@instructure.com>
Change-Id: I16482bf2a09ea8bca98bbba1278f7eb121fb8e07
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341589
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: Zach Pendleton <zachp@instructure.com>
2024-04-19 16:23:04 +00:00
Dustin Cowles 508a9304be add lti.getPageContent to postMessage API
This new postMessage type will return all HTML elements tagged with the
`data-lti-page-content="true"` attribute. This commit adds that data
attribute to both Wiki Pages and Assignment Show.

closes ADV-80
flag=none

Test Plan:
- This will be easiest to test with new `tray` placements checked out.
  See g/345172 and related commits.
- Create an LTI tool with the following settings:
  scope: `http://canvas.instructure.com/lti/page_content/show`
  placements: `assignment_menu`, `wiki_page_menu`
  launch_method: `tray`
- On each placement page:
 - In the browser console, verify ENV[:LTI_TOOL_SCOPES] includes
     {
       "<tool-origin>": [
         "http://canvas.instructure.com/lti/page_content/show"
       ]
     }
 - Launch the tool and send the following postMessage:
  ```
  {"subject":"lti.getPageContent"}
  ```
 - Ensure the page content is returned

Change-Id: Ia57e52c37a6aea54ec7c66ac6e8b711903f87e8f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342669
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2024-04-19 15:33:59 +00:00
Samuel Lee 465305adad reset fields after checkpoint deletion
reset the has_sub_assignment and required replies
count fields after the checkpoint deleter service
is called

closes VICE-4217
flag=discussion_checkpoints

Test Plan:
- specs pass

Change-Id: I54ffba6ff3defceee934018b7bf60bea8b994bf2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345683
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
2024-04-19 15:14:35 +00:00
Jackson Howe 32ee8e6c53 Separate page/discussion visibility scopes
Each differentiable object has a visible_to_students_in_course_with_da
scope which is used by the DifferentiableAssignment module to determine
what learning objects a student should see. Each differentiable also has
a visible_ids_by_user class method, which is used in modules for the
same purpose. These methods used to be shared by DiscussionTopic and
WikiPage in the Submittable module because they were very similar. Now
that they're becoming more complex with 1st-class support for
differentiation, it makes sense for these scopes to live in their own
models.

The changes to Submittable and DiscussionTopic are primarily moving
the scopes from Submittable to DiscussionTopic. The changes in
WikiPage provide support for WikiPage assignment overrides - if a page
has an assignment (because it is part of mastery paths), then read the
assignment's overrides. Otherwise, read the page's overrides.

This is not flagged because there are no functional changes other than
reading a page's overrides, and no WikiPage overrides exist without the
flag.

Note: this commit does not yet guard directly-differentiated pages
and ungraded discussions.

refs LF-1050
flag = none

Test plan:
 - Regression test creating pages with and without "allow in mastery
   paths" - ensure that all students who should have access do
 - Regression test creating graded and ungraded discussions, including
   ungraded section-differentiated discussions

Change-Id: I107171d0d48d4bba1f44b7953869dd3f25450664
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345529
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-04-19 14:36:17 +00:00
viktor.szpisjak 07b42df821 Fix discussion setting import
closes CLAB-26
flag=none

Test plan:
- Create a course, enable Discussions Redesign FF
- Go to Discussion page and:
-- Turn off Report replies
-- Turn on Create anonymous discussion topics
- Save settings
- Now create another course, enable Discussions Redesign FF
- Go to second course import page, and copy over the first course
- See if the discussion page has the similar settings

Change-Id: I887cdfc811b93491d2a6ce87d525a156a4facad9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345150
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Kata Virag Keri <kata.keri@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2024-04-19 07:45:51 +00:00
viktor.szpisjak 22181bb304 Fix course search for blueprint
closes CLAB-31
flag=none

Test plan:
- Create a blueprint course
- Create a course with name: "Normal name"
- Create a course with name: "#!Special course"
- Go to blueprint course, open blueprint settings, go to associations
and try to search with string that starts "#!Sp"
- There is no error, you can find the "#!Special course"
- Searching for "Normal name" there is no regression, course can be found

Change-Id: I9f93e75d883eae754626aab0d12604fc60f3ad11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344951
Reviewed-by: Ferenc Marcsó <ferenc.marcso@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Kata Virag Keri <kata.keri@instructure.com>
QA-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
2024-04-19 07:07:53 +00:00
Michael Hulse f754ec0e7f fix confirmation_url in user creation API
This fix will make confirmation_ur context-aware and return
the proper host domain in the response.

closes FOO-4343
flag=none

test plan notes:
- cannot test locally because distinction between environments/instances
  does not exist in local development
- can test on cd, beta, or test
- this fix is patterned after a similar fix found here:
  https://gerrit.instructure.com/c/canvas-lms/+/340437

test plan:
- create auth token for chosen environment/instance
- make POST with these key/values:

user[name]:Sour Patch Ghosty
pseudonym[unique_id]:spghosty
pseudonym[send_confirmation]:true
communication_channel[confirmation_url]:true
communication_channel[type]:email
communication_channel[address]:spghosty@instructure.com

- in the response, confirmation_url should point to the chosen
  environment/instance
- also, existing/modified tests should pass

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

Change-Id: I0e35841228c277c3d410acbcd55c65360948e748
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344917
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
2024-04-18 21:00:04 +00:00
Kai Bjorkman 83bf5d4bc7 correct body word count with <br>
closes EVAL-4019
flag=none

Test Plan:
- Create a text entry assignment
- As a student, start your submission
- Add a single word to the submission box, hit shift+return/enter to add
 a line break, then add a second word
- Notice that the the total word count below the RCE shows 2 words
- Submit to the assignment
- Navigate to Speedgrader and view the word count. Notice that it shows
that there is 2 words and matches the RCE count.

Change-Id: I6ad8b20eff50805a12ffef0362adaaa5bbe96050
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345625
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2024-04-18 20:47:11 +00:00
Spencer Olson 0e4dc94fcb link to new assignment page when a2 enabled
closes EVAL-4086
flag=assignments_2_student

Test Plan:
1. Enable the "Assignment Enhancements — Student" and "Peer Review
   Support in Assignment Enhancements" feature flags.
2. Go into a course that has student enrollments and create a Peer
   Review Assignment.
3. Have some students submit to the Assignment.
4. Manually assign the submitting students a review to complete.
5. Masquerade as one of those students and you will see the review
   listed in the ToDo List or within their Dashboard list view.
   Click one of those and verify you are taken to the newer,
   "Assignment Enhancements" assignment page with the peer review
   tray open.
6. Repeat steps 2-5 but make the Peer Review assignment anonymous.

Change-Id: Ic3573788ebea388e945d31589125562f4bc69449
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345619
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-04-18 20:25:06 +00:00
juan.chavez 64b47146c6 Add 'Assign To' tray to page show page
closes LF-1386

flag=differentiated_modules

[fsc-max-nodes=30] [fsc-timeout=60]

test plan:
- As a teacher, open a wiki page show page.
> Verify that the Assign To button appears.
- Click it.
> Verify that the Assign To tray appears.
> Verify that you can add/update assignees
 and dates.
- Verify that the data is persisted
(re-opening or refreshing).
- As a student, open a wiki page show page.
> Verify that the Assign To button does not
appear.

Change-Id: I82c901b337baf0c6c3ffb4a1bbb4d1730a243393
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345388
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: Juan Chavez <juan.chavez@instructure.com>
2024-04-18 19:20:45 +00:00
Jeremy Stanley 4df67eaf0d report correct state in state_change_proc after deleting ff
when you delete a feature flag to allow it to inherit the parent
account or default setting, the state change proc is currently
called with the default setting, which may be incorrect if
a higher account has a setting.

test plan:
 - enable "smart_search" in an account, but do not lock it
 - turn the feature off in a course under the account
 - turn it back on, and check that the state change hook
   is called with the proper target state ("allowed_on")
   and the course gets re-indexed

flag=none
fixes FOO-4430

Change-Id: If9c286b90e4d4e0ddcbc49c7f469719ba8babfa0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345610
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2024-04-18 19:19:55 +00:00
Jorge Arteaga edc3a4070c include new quizzes resources in Common Cartridge IMS manifest
flag = none

closes QUIZ-13332

test plan:
- create a course
- create an item bank shared with the course
- create one New Quiz
- add at least one quiz entry that loads
questions from the item bank
- go to the course Settings page
- go to "Export Course Content"
- export the course and download the export package
- decompress the package and inspect the IMS manifest
- observe that the New Quizzes content is included
in the manifest

- go to an empty course
- import the common cartridge package and enable the option
"Import existing quizzes as New Quizzes"
- observe that the new quiz is imported correctly

- importing the pacakge with the option
"Import existing quizzes as New Quizzes" disabled
- observe that the quiz is imported (this has known limitations
due to question types incompatibilities)

Change-Id: Ibd3a2c22600ce37f61c5143f8960cc04ad1a03eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343469
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Jorge Arteaga <jorge.arteaga@instructure.com>
QA-Review: James Logan <james.logan@instructure.com>
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
2024-04-18 19:00:46 +00:00
Eric Saupe 3bc74a4844 spec: Remove enzyme.mount from blueprint_courses components
fixes LF-1430
flag=none

test plan:
- tests pass
- tests are still testing what they were before

Change-Id: I1bec3043950a31b22e38a25085e6baf618c42322
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345618
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2024-04-18 18:54:29 +00:00
Jason Perry 47633af85d Use identifiers for headings in ePub module pages
Fixes FOO-4102
flag=none

Test Plan:
- Have a course with published modules containing pages
- Enable epub export feature flag
- Export the course to ePub, see that you can link to module pages now

Change-Id: If872e1f39005189136e16cc5e04f8a018798ef66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345617
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Perry <jason.perry@instructure.com>
Product-Review: Jason Perry <jason.perry@instructure.com>
2024-04-18 18:29:27 +00:00
Sarah Gerard b4bc4a31a1 Prefer 'unlock_at' to 'delayed_post_at' column
the two columns on DiscussionTopics serve the same
function. Eventually we will deprecate delayed_post_at,
but until then, make sure both are compatible.
Reference the ticket for further details. Also updates raw
SQL that references these columns

closes LF-1495
flag=differentiated_modules

test plan:
- with the flag OFF
- create an ungraded discussion topic and set the
  'Available From' date on the edit page
- turn the flag ON
- open the assign to tray anywhere for the
  discussion. Expect to see the 'Available From'
  date set correctly
- edit the 'Available From' date in the tray and save
- go to the discussion edit page, and expect the
  date to have been correctly update.
- edit the Available From date in the edit page, save
  and check the assign to tray to ensure it was updated
  there as well
- generally, the date in the assign to tray and on the edit
  page should stay consistent.

Change-Id: I30822c85288c6a71e0b264e14ef743466ea6c447
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345390
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: Sarah Gerard <sarah.gerard@instructure.com>
2024-04-18 18:11:14 +00:00
Kai Bjorkman 8174381c2f edit flash message for observers
This changes the flash message to be more informative when an observer
is currently not observing any students. It was incorrectly directing
the user back to the dashboard even though in this state they are not
linked to any students yet.

closes EVAL-4075
flag=assignments_2_student

Test Plan:
- Create a new observer
- enroll them in a course, but do not link them
to any students
- visit the any assignment page
- verify the edited flash message is displayed

Change-Id: Ie3dc7354886a35b745afc772e9cba056851785e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345607
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-04-18 18:01:12 +00:00
Jeremy Stanley 1fcc28217e detach file from cloned_item after replacing instfs_uuid
to avoid orphaning an instfs uuid after replacing a file
with itself more than once

test plan: using inst-fs,
 - have a file in a course
 - copy the course
 - overwrite the file in the copy with itself.
   both files should still work
 - overwrite the file in the copy with itself again.
   both files should still work, but the first overwrite's
   instfs_uuid should be deleted from the service

flag=none
refs LF-1460

Change-Id: I2582aa13631c79df697e39b660d5362c5803f392
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345174
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2024-04-18 17:15:28 +00:00
Chawn Neal 311c932671 Add anonymousAuthor to updateDiscussionEntryParticipant
fixes VICE-4149
flag=none

Test Plan:
1) see the short video in the ticket.
2) create a 2 layer de with an anonymous user.
3) like the post. it will now not break.

Change-Id: Idb8e435d4a742ccedb807e80c2c187408340add2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343992
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
2024-04-18 16:30:41 +00:00
Caleb Guanzon bed9fc1b0a use sub_assignment_submissions in AssignmentType
flag=discussion_create
flag=discussion_checkpoints
flag=react_discussions_post

fixes VICE-4202

test plan:
- create a graded, checkpointed discussion
- as a student post a reply to the topic
- visit /graphql

- query this:
```
query MyQuery {
  legacyNode(_id: "7", type: Discussion) {
    ... on Discussion {
      id
      _id
      assignment {
        _id
        name
        mySubAssignmentSubmissionsConnection {
          nodes {
            submissionStatus
            submissionType
            subAssignmentTag
            _id
          }
        }
      }
    }
  }
}
```

-verify response looks something like this:
```
{
  "data": {
    "legacyNode": {
      "id": "RGlzY3Vzc2lvbi03",
      "_id": "7",
      "assignment": {
        "_id": "4",
        "name": "the first checkpoints assignment",
        "mySubAssignmentSubmissionsConnection": {
          "nodes": [
            {
              "submissionStatus": "submitted",
              "submissionType": "discussion_topic",
              "subAssignmentTag": "reply_to_topic",
              "_id": "128"
            },
            {
              "submissionStatus": "unsubmitted",
              "submissionType": null,
              "subAssignmentTag": "reply_to_entry",
              "_id": "155"
            }
          ]
        }
      }
    }
  }
}
```

Change-Id: Iec0ae798f9d00088f9b0726b85ed41f2e8f62d94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345416
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-04-17 18:34:18 +00:00
Matheus fe86cce25e spec: Remove enzyme mount from GradeSummary tests Part 2
flag=none
closes LF-1428

Test Plan: Passes Jenkins

Change-Id: Ibb6926706cc81fdb7583a03f971e67a8d633aecf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344711
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2024-04-17 15:05:46 +00:00
Balint Kartyas 6856d6749d discussions: Fix non anonymous response in partial anonymous mode
fixes VICE-3810
flag=react_discussions_post

test plan:
- Check responder user details on discussion responses

Change-Id: I19287d83641cc0201a82db6e53510a3694fa36ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345119
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-04-17 00:50:19 +00:00
Robin Kuss aa9fee3cd0 keep calendar rendered instead of wrong publish icon
Closes LF-1414

Test Plan:

1. Create a page and set the page available date to later.
2. On the pages index page, hover over the calendar icon for that
page and then move off the icon.  The icon should remain a calendar
instead of turning into the publish icon.
3. Click on the button and interact with it (publish, etc.)
4. Go try the publish button in other places (assignment index, etc.)

Change-Id: Ice264fd2c9274a72f0c07de72b31b997571e02eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345053
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: Robin Kuss <rkuss@instructure.com>
2024-04-16 20:12:30 +00:00
August Thornton 3d6901030c handle conflicting notification policies for user merge
We rely on cloning communication channels and their associated
notification policies when merging users across shards and the
target user is new and _may_ not have an existing communication
channel.

Fixed `User.clone_communication_channel` to handle the case where the
new communication channel clone could be in a state where it doesn't
have any associated notification policies and is in an `active`
workflow state. This case would trigger an
`after_save :consider_building_notification_policies` callback that
would end up backfilling the notification policies for the new
communication channel clone and causing a conflict with the existing
notification policies for the source user's communication channel.

fixes FOO-4418
flag = none

Test plan:
 - Have a centrally-managed consortia
 - Create a user on the source shard
 - The source shard user should have an active communication channel
   with a notification policy and a pseudonym with an integration_id
 - Run a SIS Import with home_account set to TRUE in the target shard
   using the same user's login info
 - The source shard user should be merged into the target shard user

Change-Id: Iabce86f9525998b0cab6a2f49161d83c7f643294
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345181
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2024-04-16 18:53:33 +00:00
Aaron Ogata 6e08b48c9d bump graphiql to v1.7.2
Change-Id: Iebfa265faaeec0804c821d6549c55a70fd6ab327
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345373
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2024-04-16 18:16:00 +00:00
Caleb Guanzon 70a51573ea Revert "show embedded discussion view in speedgrader"
This reverts commit 4cf61e395c.

Reason for revert: this will be reintroduced with next / previous buttons later

Change-Id: I29dc3b7ecd459c8590692894ef54e59a03c1571e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345392
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-04-16 17:41:41 +00:00
Samuel Lee 97234c71ed add checkpoint to create discussion mutation
add checkpoint to create discussion mutation.
This only supports reply to entry, reply to topic,
and additional replies required fields

closes VICE-4104
flag=discussion_checkpoints
flag=discussion_create

Test Plan:
- create a discussion with checkpoints
- set points possible for reply to entry and
  reply to topic
- set additional replies required
- submit the discussion topic
- go to edit the discussion and confirm that
  the discussion is checkpointed with the
  reply to topic, reply to entry, and additional
  replies required fields populated with the
  values set at creation
- go to the rails console and confirm that the
  newly created discussion topic's assignment
  contains two sub assignments with the correct
  point values and tag

Change-Id: I4f40c9b3abbadccab35b78661574a84a1e64ee6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345228
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-04-16 17:17:05 +00:00
Caleb Guanzon fc41228955 Revert "intruduce hide student names to discussions redesign"
This reverts commit a9fa4203e3.

Reason for revert: this will be reintroduced with next / previous buttons later

Change-Id: Ib546da143988798760c40464a1bc8e831d5bf6a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345391
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-04-16 17:14:58 +00:00