This change adds two columns to the temporary_enrollment_pairings table.
One for the created_by_id and one for the deleted_by_id. These are
references to the users table. The created_by_id is set when the
temporary_enrollment_pairing is created. The deleted_by_id is set when
the temporary_enrollment_pairing is deleted via API.
closes FOO-4113
flag = temporary_enrollments
test plan:
• create a temporary_enrollment_pairing via the user interface
or API, verify the created_by_id is set to the current user
Change-Id: Ic952513be528050154248d4b336673f677fbb09f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334840
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
closes LF-1037
flag = none
Test plan:
- Find a WikiPage and create an assignment override with
`wp.assignment_overrides.create!`
- Expect to be able to run `wp.assignment_overrides` and
`ao.wiki_page`
- Repeat with a DiscussionTopic and an Attachment
Change-Id: I8d01165f8b63947c9d28b1d48c4ee63e4ded174d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334845
Migration-Review: Cody Cutrer <cody@instructure.com>
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: Jackson Howe <jackson.howe@instructure.com>
this commit adds the ability to hide custom grade statuses from being
applied to submissions and only allow them to be applied to the final
grade override if there is no score.
closes EVAL-3737
flag=custom_gradebook_statuses
test plan:
- Create a new custom status for a course.
- In a rails console run:
CustomGradeStatus
.find(id)
.update(applies_to_submissions: false, allow_final_grade_value: false)
- Go to gradebook and open the submission tray. You should not see the
custom status radio button in the list of statuses.
- Click on a final grade override and open the tray. You should see the
custom status radio button in the list of statuses.
- Verify the next steps:
- For a final grade override with null values, you should be able to
select the custom grade statuses.
- For a final grade override with valid values, you should not be able
to select the custom grade statuses.
- If the custom status is selected, you should not be able to input
a final grade override score.
- Head to speed grader and verify that the custom status is not
available when assigning a status to a submission.
Change-Id: Iba89ab7498b62bd3d187274e44e14e50c807ad9b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334717
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
refs AE-547
they won't have any user account associations, so grab root account ids
from even active links
Change-Id: Ic1f04152f6e6bd28213d2eb4055d52990a5963bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334687
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
why
A guid is needed to identify a registration in the dynamic registration
modal flow UI before it's actually created. The overlay is needed to
store user edits in a way that the user can restore the defaults easily.
test plan:
1. Run the migration
2. Ensure that the dynamic registration flow still works
flag=lti_dynamic_registration
refs INTEROP-8259
Change-Id: Ic2389fe8a5254ca1823d4f182a2987a1572bbc3b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333296
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
test plan:
"Impact - Manage" should appear in account permissions
flag=none
closes FOO-4060
Change-Id: Id9baf994fecbed3a120e6554e11415491899df91
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333161
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
closes LF-681
closes LF-682
flag=differentiated_modules
test plan:
- with the flag on
- have an assignment/quiz with different types of overrides
- the only overrides with unassign_item as true are section
and ADHOC overrides
- run assignment.assignment_student_visibilities
or quiz.quiz_student_visibilities with different scenarios
- assignment has an adhoc unassigned override
- assignment has a section unassigned override
- assignment has an assigned adhoc override with an
unassigned section override (student should still have
visibility)
- assignment has an unassigned adhoc override with an
assigned section override (student should not have
visibility)
- test out including the assignment in a module with
overrides as well (the module itself should not have
unassigned overrides)
Change-Id: Ia2e62b3dac069c37c18babc9c5dbae34ca11c52b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333103
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
Migration-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Note: we will mark this migration as run in production Canvas, and will
manually clear the cache there during low-tide. This commit is to clear
the cache for open source canvas.
closes VICE-3955
flag=discussion_checkpoints
Test Plan:
- Verify that running the migration clears the cache
Change-Id: I2a59d463e41a2275ce9cd82e77b6658697136f0b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333172
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
this commit creates the first step in moving the rubric criteria into
their own model & database table.
closes EVAL-3666
flag=enhanced_rubrics
test plan:
- pipeline & tests pass
Change-Id: If101c1daf08b2c2fa9a75ed1db67831439b2590d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332800
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
closes LF-671
closes LF-672
flag=differentiated_modules
test plan:
- with the flag on
- have a course with multiple assignments/quizzes
and modules
- for each assignment/quiz, run
assignment.assignment_student_visibilities
or quiz.quiz_student_visibilities
- test out different scenarios:
- an assignment that is in a module with an ADHOC override
- an assignment that is in a module with a section override
- an assignment in two modules, one with an override and
one without (should be visible to everyone)
- an assignment that has an assignment override and a
module with an override
- for each scenario, ensure that only the users with overrides
are given visibility, unless there is a module with no
overrides that contains the assignment.
Change-Id: I9c62c619e3f76456ca5a5eda0a85819d5c84158a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332730
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>
Migration-Review: Jackson Howe <jackson.howe@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
and actually enforce the linter (by setting a cutoff date for old migrations)
Change-Id: I50001b479e24b30714c37c331515b186bc089468
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332721
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
closes VICE-3934
flag=none
test plan:
- Specs pass.
- Make sure you can run this migration locally
by doing bundle exec rails db:migrate
- Make sure you can rollback this migration locally
by doing bundle exec rails db:migrate:down VERSION=20231107133109
- After the migration is run, create assignments
using new and create and make sure the type is Assignment:
a1 = Assignment.create
a2 = Assignment.new
And verify a1.type and a2.type.
- Verify that all your current assignments have Assignment as type:
Assignment.where(type: "Assignment").count == Assignment.count
qa risk: low
Change-Id: Ic1afd53de81d449963ef4d27141c7d04c367264c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332282
QA-Review: Spencer Olson <solson@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes LF-678
closes LF-677
flag=differentiated_modules
test plan:
- run migrations
- with the flag on (if you flipped your flag make sure
to restart canvas)
- test with both an assignment and quiz
- create a course override for the assignment/quiz
override = assignment.assignment_overrides.create!
override.update_attribute(:set_type, "Course")
override.update_attribute(:set_id, course.id)
- run assignment.assignment_student_visibilities or
quiz.quiz_student_visibilities
- expect to see all students in the course listed
Change-Id: Icad2a2f67f41273cf89a43db288983eb0218ff3c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331992
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>
Migration-Review: Jackson Howe <jackson.howe@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
In order to allow the changes we'll be making to
the ASV/QSV views to be feature flaged, we want to
create duplicates of both views that will have the
flagged changes. We'll also start keeping track of
the different versions in lib/migration_helpers
closes LF-938
flag=differentiated_modules
test plan:
- run migrations
- in a rails console, with the flag on
check that AssignmentStudentVisibilities.table_name
is equal to v2, same with QuizStudentVisibilities
- as of now these views should work exactly the same
as the current views
- you may need to restart canvas after switching
the flag on/off
Change-Id: I0a372823a9c7b31a53c76a9ecc205105936e89d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331100
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
closes FOO-3963
closes FOO-3964
flag = temporary_enrollments
test plan:
• in rails console create a temporary enrollment pairing
TemporaryEnrollmentPairing.create!(root_account: Account.default)
• should be created with a default workflow_state of "active"
• temporary enrollment pairings are soft-deletable
• they have a one to many association on enrollments to be used for
tracking the enrollments that were created from the pairing
during temporary enrollment creation (TempEnrollAssign) modal
Change-Id: I75083d3163af13a609b15d984313f4dc8ec944a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330991
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Perry <jason.perry@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
test plan:
- create a role that can manage_user_logins
- run the migration
- that role should be have the temporary enrollments permissions
flag=temporary_enrollments
closes FOO-3938
Change-Id: Ib62c0e4224246ba1584bbab3768eb467b35123dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330346
Reviewed-by: August Thornton <august@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes VICE-3859
flag=discussion_checkpoints
Test Plan:
1. Verify migration can be run and rolled back without issues
2. Verify in a rails console that associations work as intended on
Assignment model:
- belongs_to :parent_assignment
- has_many :checkpoint_assignments
3. Verify in a rails console that associations work as intended on
DiscussionTopic model:
- has_many :checkpoint_assignments, through: :assignment
4. Verify in a rails console that you can set a checkpoint_label (string)
on an assignment.
Change-Id: I259df6989c42a2d5bc2e5bb011142d1ff706d915
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330016
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
This will hopefully improve performance for the $Context.id.history
expansion which times out sometimes. This comes from DBA recommendations
in DBA-3999.
Test plan:
- check migration runs
- we can do more tests in beta
refs INTEROP-8258
Change-Id: I6d8aaeb91f846a5ab27f7e9d0b3df452e06bbbc6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329982
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Also improve deletion performance by deleting in parallel
Change-Id: I38c13e543f0f962b5361b3a612882bc44067f3eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328121
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
fixes INTEROP-8201
flag = none
test plan:
- using the 1.3 test tool, create an LTI 1.3 assignment
- make a note of the ID of the line item that is created
(might be easiest to do Lti::LineItem.last in a rails console)
- in the Canvas UI, edit the assignment's due date
- call the /api/lti/courses/:course_id/line_items/:line_item_id endpoint
- see that the end_date_time field matches the due date you gave the
assignment
Change-Id: If94edb3d795860c6746d2367e4799541a43aae8c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326864
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
It appears this is unused, and we only have active notifications anyway.
refs AE-238
flag=none
test plan:
- specs pass
Change-Id: I15e13bc2bee595ade68a68debdf6469d6fc2e559
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327919
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
In newer postgres versions, this migration will fail, because of the
foreign key of `root_account_id` -> `id`. For this reason, we will
defer constraint checking when making this insert.
fixes AE-474
flag=none
test plan:
- with the fix:
- the migration completes successfully on newer postgres
- without the fix:
- the migration does not complete successfully on newer postgres
Change-Id: I1ea7b874aea4d3cae979248edafd249675fb4221
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326597
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
rather than assuming it's in `public`, in case someone installs
it elsewhere rather than using our own EnableVectorExtension migration
refs ADV-22
Change-Id: I7ee86103cc63a4738076d1df8ec56c6ec51ba82f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327503
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
in the previous commit in this saga, we found that the extension
was installed in "dba" which was inaccessible to the application
also attempting to drop the extension in `down` would remove it
entirely, which isn't what we want in a sharded environment
refs ADV-22
Change-Id: I0fc7ada77beb87dee6e23d8a20951bb703fc467e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327384
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
- predeploys run
flag=smart_search
refs ADV-22
Change-Id: I3c1c303e804307b154cc5ca8dfb4280ea161c601
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327269
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
still very much a prototype
test plan:
- install pgvector extension
(i.e. `brew install pgvector` or your operating system's
package manager)
- run db migrations and verify the "vector" extension
gets enabled
- set up OpenAI API key via `bin/rails credentials:edit`
and add
smart_search:
openai_api_token: <...>
- enable the smart_search feature flag in an account
- in a course under that account, create some wiki pages
with nontrivial content
- as a user who can see those pages, using the magnifying
glass that appears in the global nav, search for things
(by ideas and concepts rather than just keywords)
- it should find results
limitations:
- lots, please refer to the ADV-22 epic for next steps
flag=smart_search
closes ADV-21
Change-Id: I4a6cf4bc98cb144707df156baf143c3f9b70acdf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325880
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
it's O(1) to set the column NOT NULL once the check constraint exists
Change-Id: I5b0be774b1dea598d8c3d9a5d271e057e2f117cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327176
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
not that we really need to change, but it serves as an example for future
migrations
Change-Id: Ie1a1975311c81b0c145c17af46e57e604a01eca5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327026
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
A boolean column which defaults to false. Will be used to indicate
that the AssignmentOverride's presence unassigns the item from
the linked set.
closes LF-665
flag = none
Test plan:
- Run migrations
- In a rails console, find an Assignment and run:
`assignment.assignment_overrides.create!`
- Expect assignment_override.unassign_item? to be false
Change-Id: I61e1bfb46f2a4b5434d439576769be11bdf953aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326726
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>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
flag = none
closes LF-650
Test plan:
- Run the migration
- In a rails console, find a module and run:
`ao = context_module.assignment_overrides.create!
ao.assignment_override_students.create!(user: <a student>,
context_module: context_module)`
- Expect an AssignmentOverrideStudent to be created with a
reference to the module and the assignment override
- In psql, run `\d assignment_override_students` and observe that
the column is created along with the unique index and foreign key
Change-Id: I36d5d4250df09a67a2a27152bf6abc1c43d9f181
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326702
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Also updates the check constraint to allow AssignmentOverride to
have an assignment, a quiz, or a module. Changes the original
migration which created this check constraint to a predeploy to
match this migration (so that the 2 migrations are run in
chronological order on fresh databases).
flag = none
closes LF-649
Test plan:
- Run the migration
- In a rails console, find a module and run:
`context_module.assignment_overrides.create!`
- Expect an AssignmentOverride to be created with a
context_module_id pointing to the module
- In psql, run `\d assignment_overrides` and observe that the
column was created, the index was created, the foreign key
exists, and the check constraint also checks for a
context_module_id
Change-Id: I93195e28d082411ac43ed715f8eab5b42bd0094c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326620
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@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>
why:
* a bug in the assignment importer assumed that all migrations were BP
syncs and caused a NoMethodError on nil, which skipped the rest of
the importer
* this meant that the default line item for each assignment never got
updated with the correct data from the source assignment's line item,
and subsequent line items were never created
refs LF-467
closes INTEROP-8168
flag=none
test plan:
* reproducing the bug now that it's been patched involves changing
some code in app/models/importers/assignment_importer.rb:
* replace line 510 with `if true`
* remove the safe access modifier `&.` from
`migration.master_course_subscription&.content_tag_for` on line 554
* in a course with the 1.3 test tool installed, create an assignment
for the 1.3 test tool
* pass back some values for the resourceId, tag, scoreMaximum, and
label (or modify the Lti::LineItem in a rails console after creation)
* modify the assignment in a rails console to have "been updated" during
the period in which this bug was present in prod (7/5 - 7/10)
* `assignment.update!(updated_at: Date.parse("2023-07-06"))`
* create a new course and import the first course to it
* the created Lti::LineItem for the new assignment in the new course
should not have the same values for resource_id, tag, score_maximum,
and label
* in a rails console, run the data fixup and reload the affected
Lti::LineItem:
```
DataFixup::RepairLineItemsFromBrokenContentMigrations.run(1)
```
* alternately, run migrations if you haven't already
* the affected Lti::LineItem should now have the same values as its
source line item
Change-Id: I6d64a3cccf768fb54bda62180bf5dc1c06fa5223
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322632
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
closes EVAL-3393
closes EVAL-3394
closes EVAL-3395
flag=none
[fsc-timeout=100]
test plan:
- all tests pass
- create an assignment with an ab_guid
- using the assignments api, verify that the ab_guid is returned in the
show response when `?include[]=ab_guid is passed`
- using the assignments api, verify that the ab_guid is returned in the
index response when `?include[]=ab_guid is passed`
- using the assignments api, verify that you are able to update the
ab_guid
Change-Id: Ic4e8d78a6b4dfb112168ec68bd7f6e117a8030f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324884
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
and default it on for account roles that enable :view_analytics
and :view_all_grades
test plan:
*before running the included datafix migration or
enabling the "Admin Analytics - view permission" feature flag*
- check out the analytics plugin to gems/plugins/analytics
(we just need it for the :view_analytics permission;
no need to get it working or anything)
- set up some custom roles that enable/disable various
permutations of :view_analytics and :view_all_grades
*run migrations*
- the "Admin Analytics - view and export" permission still
does not appear because the feature flag is off
*turn on the feature flag*
- the permission appears
- custom roles that granted :view_analytics and :view_all_grades
enable the permission
- custom roles that disabled one or both disable the permission
flag=admin_analytics_view_permission
closes FOO-3701
Change-Id: Ib006293eb3b8e5dea7aeb38a4a5f5307eec3537f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325131
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
looks for progresses for course_pace_publish that
are in a queued state and have a delayed_job_id where
the DelayedJob for that id does not exist and set them to failed
Fixes LF-506
flag=none
test plan:
- if you don't have some already, make some course pacings, thus
making progresses for publishing the pacings
- in a rails console, find some completed progresses for
course_pace_publish:
Progress.where(tag: "course_pace_publish", workflow_state: "completed")
- set some of those progresses to "queued"
Progress.find(id).update_attribute(:workflow_state, "queued")
- run the migration
- the progresses that were set to queued should now have a
workflow_state of "failed"
Change-Id: I599b224cad9bf84b12b3e39c75c988a7c0289aaf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324928
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
This index was added when the table was created, but
it is not used
flag=none
Test plan
- Specs pass
Change-Id: I20ed228b19af4831651cde7a74be27a8d604d7f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323878
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
This index was added when the table was created, but
it is not used
flag=none
Test plan
- Specs pass
Change-Id: I651e440786ab39ff63fd2888b07e11ced6d81a98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323877
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Aaron Suggs <aaron.suggs@instructure.com>
QA-Review: Aaron Suggs <aaron.suggs@instructure.com>
Product-Review: Aaron Suggs <aaron.suggs@instructure.com>
This index was added when the table was created, but
it is not used
flag=none
Test plan
- Specs pass
Change-Id: I6c544a64894ebb755c5568a63d738ae5f81093cd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323880
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>