flag = improved_outcomes_management
closes OUT-4153
Test Plan:
- Setup some global outcomes
- Execute some queries in the /graphiql
- Import a whole group from global outcomes to account
mutation ImportOutcomes {
importOutcomes(input: {
contextId: ACCOUNT_ID,
contextType: "Account",
groupId: GROUP_ID
}) {
errors {
attribute
message
}
progress {
id
}
}
}
- Import a whole group from account to course
mutation ImportOutcomes {
importOutcomes(input: {
contextId: COURSE_ID,
contextType: "Course",
sourceContextId: ACCOUNT_ID,
sourceContextType: "Account",
groupId: GROUP_ID
}) {
errors {
attribute
message
}
progress {
id
}
}
}
- Try to import some outcomes replacing groupId to
outcomeIds: [OUTCOME_ID_1, OUTCOME_ID_2, ... OUTCOME_ID_N]
- You can import outcomes that belongs to differents subgroups,
but they must have at least one common parent group
- The response must be an empty object in case of success,
check the ui to see if the groups were imported correctly.
Change-Id: I586fcbce9ccf33db956ff5ef57903bb3f5d7f30b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259131
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
fixes OUT-4498
flag=none
test plan:
- launch the rails console
- create or find an outcome at the global level, and the group it belongs
to
- create or find a different global group
- call adopt_outcome_link on the group you're moving the outcome to
with the outcome passed in
- observe that this successfully moves the outcome
- check that the group includes the outcome
- check that the original group no longer has the outcome
Change-Id: I6b3f79d03a07862341064d3db9703c49d77a4b15
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267053
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
closes OUT-4401
flag=improved_outcomes_management
Test plan:
- Navigate to canvas.docker/graphiql
- Test moving an outcome link using the mutation bellow
mutation {
moveOutcomeLinks(input: {
groupId: DESTINATION_GROUP_ID
outcomeLinkIds: [OUTCOME_LINK_ID]
}) {
movedOutcomeLinkIds
errors {
attribute
message
}
}
}
- Assertions:
- Required arguments: groupId, outcomeLinkIds
- Assert group/outcome links exists on database
- Assert can manage group/outcome links
- If you pass one outcome link that can be managed
and other that can't, assert it moves that one who can
and check for the correct movedOutcomeLinkIds and errors response
Change-Id: I976255a1dadb9bb5f9fcb0def52a7b623c4538d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265297
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
closes OUT-4354
flag=improved_outcomes_management
When importing a learning outcome group from one context
to another, its useful to know what group was copied from,
so this association will help us track that source.
test plan:
- qa-cr
Change-Id: I642b1db42a685dbd81117c037443241b37b52ed7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262149
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
Updates Outcomes::LearningOutcomeGroupChildren by adding cache
at the queries for getting the total subgroups and outcomes.
closes OUT-4148
flag=improved_outcomes_management
Test plan:
- Create nested learning outcome groups
- For each nested learning outcome group create learning outcomes
> With FF improved_outcomes_management: OFF
- On Rails console: calls to Outcomes::LearningOutcomeGroupChildren
methods should return a default value
- On web: when generating actions over ContentTag, LearningOutcome
and LearningOutcomeGroup it should not lead to clear any cache
> With FF improved_outcomes_management: ON
- On Rails console: call Outcomes::LearningOutcomeGroupChildren
methods for getting total subgroups and outcomes, queries to the
DB should be made (it will need the root context)
- Call again the same methods, it should return the values from
cache
- Create a new instance of the class and call the same methods,
it should return the values from cache
- Clear the cache with `Rails.cache.clear`
- On web (or through GraphiQL) get the total subgroups and total
outcomes multiple times; it should cache the data and should not
run additional queries
- On web: clear the cache by executing the following actions:
- Add a Learning Outcome Group
- Adopt a Learning Outcome Group
- Copy a Learning Outcome Group from global
- Remove a Learning Outcome Group
- Add an Outcome
- Remove an Outcome
- Get the total subgroups and total outcomes, it should run new
queries
- Run the same tests for global context, it should generate and
clear the cache in the same way
Change-Id: I9b0bfc68b84b3e36869d69a926ef84d9989ea96d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257257
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Change-Id: I70825be7ec7e24458afe0c63dc48c5a76158f520
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs OUT-3904
Test plan:
- manually create a global outcome group
g = LearningOutcomeGroup.create! title: 'Global Group'
- verify that root_account_id is set to 0
g.root_account_id
Change-Id: I0b94880bced635f7cb35206c0ddbaf5fcd7b9428
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246977
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
closes OUT-3640, OUT-3639
flag=none
Test plan:
- create an assignment with rubric aligned
to an outcome
- assess a student using the rubric
- create a question bank aligned to an outcome
- create a quiz using the question bank
- take the quiz
- verify in the console that the created results
have root_account_id set
> LearningOutcomeResult.last(2).map &:root_account_id
> LearningOutcomeQuestionResult.last.root_account_id
Change-Id: I869b794c9d4859caabaf17717c8ac41f582847e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240010
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
* prereq for root_account on ContentTag
refs PLAT-5727
flag=none
test plan:
* specs
* if you want, save a LearningOutcomeGroup and observe that
its root_account and root_account_id attributes are not nil
Change-Id: Id268ea78377574cdb3bd2cef4a53bb6b4ca135b1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236478
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
* prereq for root_account on ContentTag
refs PLAT-5727
flag=none
test plan:
* specs
* if you want, save a LearningOutcomeGroup and observe that
its root_account and root_account_id attributes are not nil
Change-Id: I4f275c75620ad3e77f7eea442dc7bdcf7821543f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235225
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
refs OUT-3561
flag=none
Test-plan:
- Create a course with an outcome group and another outcome
within that group
- Import that course into another course and ensure
that a outcome_link_created event is emitted via live events
(see live_events.md for details on how to set up/view the
live event logs)
Change-Id: I29005a8d63d713ac5866a0d31ef190af36e092a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228388
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Pat Renner <prenner@instructure.com>
refs OUT-1107
flag = none
Test plan:
Check the following operations in canvas:
- manually create outcomes, groups
- import outcomes, groups from csv
- import outcomes, groups from Academic Benchmarks
- course copy with outcomes, groups, and rubrics
- account reports with outcomes export and outcome
results reports
Change-Id: I15d20d216515d0a29d6a5812ac153dd65a15569b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221528
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
closes OUT-3469
flag = none
Test plan:
- In docker-compose.override.yml, set
STUB_LIVE_EVENTS_KINESIS: "true"
in the jobs container's environment config.
- restart canvas
- watch logs of web and jobs containers
in the console:
dc logs -f web jobs | grep stubbed_kinesis_stream
- create a course called "Downstream"
- create a course called "Blueprint"
- in Blueprint's settings, enable as a blueprint
course
- Add course outcomes and groups to the Blueprint course
- In the blueprint sidebar, add Downstream
as an associated course
- wait a minute for course copy job to run
- verify that a live event is received
for the Downstream root outcome group
event_name: learning_outcome_group_created
title: 'Downstream'
parent_outcome_group_id: nil
Change-Id: Ie7a46472e68e6a3f054a0ba628d520bf8e106a6f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223098
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
It is possible for multiple outcomes/outcome groups with the same
`vendor_guid` to be present in a given context.
When updating an outcome/group via CSV, we should
always prefer to update an active outcome to restoring a deleted outcome.
fixes OUT-3138
test plan:
- For both an outcome/outcome group, create two records
with identical `vendor_guid's`. To do this, create two records via CSV
with guids that you define. After importing the CSV, manually update both
records to have the same `vendor_guid`.
- Mark one record as deleted and delete (via CSV)
- When updating a record, ensure only
the active record is updated
Change-Id: I420a2435255af4bfb807be7d5dd761456151a016
Reviewed-on: https://gerrit.instructure.com/204087
Tested-by: Jenkins
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
fixes OUT-2583
test plan:
* Create an outcome group at the account-level
* Create another outcome group at the course-level
* Add the second outcome group to the first
You can do the last step via UI or in rails console:
a = LearningOutcomeGroup.find(id1)
b = LearningOutcomeGroup.find(id2)
a.add_outcome_group(b)
Everything should work as expected, but the account's updated_at column
is only touched once now
Change-Id: I23f405a4bfc75431f719caec507fc22cd0974484
Reviewed-on: https://gerrit.instructure.com/169952
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
Fixes OUT-2525
Test Plan:
- Import a CSV with a long (>255 character) vendor_guid.
- Verify that on import, you get an email with an error referencing
the specific line that failed.
Change-Id: I9b71e937666e404ac70d9ff0014d0f81ce541657
Reviewed-on: https://gerrit.instructure.com/168903
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
Fixes OUT-2336
Test Plan:
- Create or import a group with lots of outcomes and groups.
- Attempt to import that group into another context.
- Immediately open another tab and navigate to the parent group of the
import.
- Verify that the imported group does not appear currently.
- Reload / wait for the import to finish and group to appear.
Change-Id: Ic97f86201932ff7751914e4cc2f95290b6e1c8b8
Reviewed-on: https://gerrit.instructure.com/157757
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
- have files, quizzes, learning outcomes, outcome groups,
and modules in a blueprint course. no items should be
locked.
- ensure outcome group changes appear in the unsynced
changes list correctly
- sync to an associated course
- delete items in the associated course
- change the same items in the blueprint in some way
(i.e., rename them)
- re-sync
- the deleted items should not be undeleted in the
associated course
- non-deleted outcome groups should not gain a link
to a deleted outcome (that shows only in the left pane)
fixes ADMIN-559
Change-Id: Ibe8842353760260b050a6330cd27df986b17b5e7
Reviewed-on: https://gerrit.instructure.com/133374
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
* have a blueprint course with an associated course
* add an outcome to the blueprint course
* it should copy over to the associated course
closes #MC-290
Change-Id: I7baf402be34541db55bc7291b6ad8d1d5c85aae6
Reviewed-on: https://gerrit.instructure.com/125039
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: I3ba018a7110a7530c9af4a59c97422f626a749b6
Reviewed-on: https://gerrit.instructure.com/99260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: Ied89f6194ea3f63c546b50d056fe7cbe3a038609
Reviewed-on: https://gerrit.instructure.com/94678
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs OUT-450
test plan:
- enable Academic Benchmarks using v1 credentials
- import any set of standards
- confirm that only vendor_guid and migration_id
columns in learning_outcomes and learning_outcome_groups
are populated
- clear out all outcomes and outcome groups
- configure Academic Benchmarks using v3 credentials
- enable the use of the new GUID columns by running the following
in a Rails console:
* plugin = Canvas::Plugin.find('academic_benchmark_importer')
* pluginSettings = PluginSetting.find_by_name(plugin.id)
* pluginSettings.settings[:new_guid_columns]=true
* pluginSettings.save!
- import any set of standards
- confirm that only vendor_guid_2 and migration_id_2
columns in learning_outcomes and learning_outcome_groups
are populated
- restore the use of the current GUID columns by running
the following in the previous Rails console:
* pluginSettings.settings.delete(:new_guid_columns)
* pluginSettings.save!
Change-Id: I77e5d578a55a0967310208029f1c5225188c3455
Reviewed-on: https://gerrit.instructure.com/98347
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
destroy! is now a method in rails
refs #CNVS-26056
Change-Id: I66e512265ff5cda6a12d7820e3cf69c77ef9e746
Reviewed-on: https://gerrit.instructure.com/69721
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
either with Relation#all or Association#scope
refs #CNVS-26056
Change-Id: Ie370a3c47c575007ce3b0ba75a122d854e6f8fbc
Reviewed-on: https://gerrit.instructure.com/69497
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
* create an account-level outcome group
* create an outcome in that group, but then delete it
* in a course, find and import the account-level group
* should not import a broken outcome link to the deleted outcome
fixes #CNVS-2015
Change-Id: I59d3404038960e156cd7b3e8540df286f27d1569
Reviewed-on: https://gerrit.instructure.com/34797
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
instead of passing an :exportable option to
ActiveRecord::Associations, simply define a constant
on the class containing exportable associations and
attributes. This is due to :exportable breaking
ActiveRecord, and we can't simply monkey-patch in
config/initializers because models are included in
migrations before the initializers are run
Change-Id: I11f1a6b4570c397d8e01010c517bc6efdac7afca
Reviewed-on: https://gerrit.instructure.com/33235
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
test plan:
* migration regressions
Change-Id: Ibed8d4820c05b9c69101b215932af32055c3e006
Reviewed-on: https://gerrit.instructure.com/33728
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-7045
test plan:
- create an outcome group with some outcomes in it
- delete the group and refresh
- the group should stay deleted
- watch a query log when you delete and make sure the context is only touched
once, not once per outcome in the group
Change-Id: I656f2685b20959f2096820acc604d940e1f1c63d
Reviewed-on: https://gerrit.instructure.com/22842
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* confirm that the 'vendor_guid' property is accessible
and editable through the API for outcomes and outcome
groups
* confirm that in the api, if an assignment's rubric
criterion is associated with a learning outcome, that it
returns the vendor guid
closes #CNVS-6387
Change-Id: I28d4cfb42172e69f07a03a398ba15011aaab4f7c
Reviewed-on: https://gerrit.instructure.com/21642
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>