Skip to content

Commit 39fc564

Browse files
committed
LTI: Update link target when updating parent tool - refs BT#17165
1 parent 8f9f043 commit 39fc564

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

plugin/ims_lti/edit.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,25 @@
9393
->setAdvantageServices(
9494
$tool->getAdvantageServices()
9595
)
96+
->setDocumenTarget($tool->getDocumentTarget())
9697
->publicKey = $tool->publicKey;
9798

9899
$em->persist($child);
100+
101+
$courseTool = $plugin->findCourseToolByLink(
102+
$child->getCourse(),
103+
$child
104+
);
105+
106+
$plugin->updateCourseTool($courseTool, $child);
99107
}
108+
} else {
109+
$courseTool = $plugin->findCourseToolByLink(
110+
$tool->getCourse(),
111+
$tool
112+
);
113+
114+
$plugin->updateCourseTool($courseTool, $tool);
100115
}
101116

102117
$em->persist($tool);

0 commit comments

Comments
 (0)