closes OUT-4402
flag=outcomes_friendly_description
Test plan:
- Create 2 outcomes (outcome 1 and 2) in a course
Make sure you have those 2 outcomes inside the same group
to make the test easier
- Create an outcome friendly description for:
outcome 1: for the course and for the account
outcome 2: just for the account
can create using the snippet in console
OutcomeFriendlyDescription.create!({
learning_outcome: outcome,
context: course || account,
description: "account or course description"
})
- Open graphiql and the queries (replace THE_GROUP_ID,
THE_COURSE_ID and THE_ACCOUNT_ID):
{
legacyNode(type: LearningOutcomeGroup, _id: THE_GROUP_ID) {
... on LearningOutcomeGroup {
outcomes(first: 2) {
nodes {
... on LearningOutcome {
_id
title
friendlyDescription(
contextId: THE_COURSE_ID
contextType: "Course"
) {
_id
description
}
}
}
}
}
}
}
Make sure you see an account friendlyDescription and a course
friendlyDescription
{
legacyNode(type: LearningOutcomeGroup, _id: THE_GROUP_ID) {
... on LearningOutcomeGroup {
outcomes(first: 2) {
nodes {
... on LearningOutcome {
_id
title
friendlyDescription(
contextId: THE_ACCOUNT_ID
contextType: "Account"
) {
_id
description
}
}
}
}
}
}
}
Make sure you see only account friendlyDescriptions for both outcomes
Change-Id: I809422d8762c961ec4e5586fce645e9911ca22ff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267852
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>