Open tomitrescak opened 1 month ago
Hello, @tomitrescak is this solved...I was able to implement LTI in my org. and we even have customers using it on Avendoo and Moodle...let me know if you need help with this :)
No, the deep linking is evading us. Linking of type “link” works but linking “ltitoollink” always leads to the “invalid link” above. I have no idea how to debug it. It seems like configuration issue or me not sending correct data. But it just does not work.
Hello, @tomitrescak is this solved...I was able to implement LTI in my org. and we even have customers using it on Avendoo and Moodle...let me know if you need help with this :)
Are you using any custom parameters? Would you be so kind to show me screeshot of your blackboard config and the code for deep linking route? This is mine:
router.post("/deeplink", async (req, res) => {
try {
const resource = req.body;
const items = [
{
type: "ltiResourceLink",
title: "My Tool Link",
},
];
const form = await lti.DeepLinking.createDeepLinkingForm(
res.locals.token,
items,
{ message: "Successfully Registered" }
);
if (form) return res.send(form);
return res.sendStatus(500);
} catch (err) {
console.log(err.message);
return res.status(500).send(err.message);
}
});
Hello @tomitrescak Sorry for seeing this message late, let me send you some links https://github.com/siddrc/ltijs-nestjs-server - this is the implementation that I am using at my company, some parts have been skipped but this should give you an idea on how to achieve onboarding various customers , doing deeplinking, assigning different tools to each customer and launching the deep linking UI interface
I also have a medium article on this, so that no one has to break their head on how to implement LTIv1.3 https://medium.com/@debu2in/implementing-ltiv1-3-using-ltijs-1ab38ab87567
I have a discord as well siddharthroyc_97017 , this will notify me on mobile..and I can help sooner...I would ask you to go through the code and the article, if the answer below does not help, or may be reach me out on discord.
Ok, so you are asking if I am using any custom parameters for deep-linking- I think not because the LMS stores the link to the tool provided by me, but when the course is launched by the LMS I get a kind of id from the LMS and I use it to launch the course.
For all my testing purposes I have used Moodle. For custom parameters, what I would do is may be call some endpoint to store those parameters somewhere just before the deeplinking request and retrieve them and use it when the course is launched -- dont know if this helps.. but may I ask why do you need custom parameters.
Here are some screenshots for Deeplinking, On Moodle/LMS what we do is we create a course shell, with minimal data and then link our content to it
upon clicking Select Content
we show a UI which has like checkboxes and shows courses and the submit button
submitDeeplinkRequest
On the Server
@Post()
async deeplink(
@Req() req: Request,
@Res() res: Response,
@Body() deeplinkDto: DeepLinkingDto,
) {
try {
if (
Array.isArray(deeplinkDto.courses) &&
deeplinkDto.courses.length > 0
) {
const token = res.locals.token as Token;
const deepLinkedCourses = deeplinkDto.courses.map((course) => {
return {
type: 'ltiResourceLink',
title: course.courseName,
custom: {
name: course.courseName,
value: course.courseId,
},
};
});
const deepLinkingMessage =
await lti.DeepLinking.createDeepLinkingMessage(
token,
deepLinkedCourses,
{ message: 'Successfully Registered' },
);
const responseJson = {
deepLinkingMessage,
lmsEndpoint:
token.platformContext.deepLinkingSettings.deep_link_return_url,
};
if (deepLinkingMessage) res.send(responseJson);
else throw new Error('No Deep Linking Message created.');
} else throw new Error('No Courses selected for deep linking.');
} catch (err) {
console.log(`${err.message} - ${err.stack}`);
res.status(500).send(err.message);
}
}
We make a JSON message using lti.DeepLinking.createDeepLinkingMessage
and return back to the deep linking ui component.
Finally, then my deep linking UI component submits it to the LMS and voila!
Hello, this is very helpful and amazing article! I have a couple of questions:
ltiaas: true
my whole app breaks as the ltik is not somehow generated. what did you do to make it work?~ (I made it work by parsing res.locals.ltik)Thanks a lot
Custom Parameters I did not use but I think this is something like key value pair seperated with a ; or a & or something - this again might be LMS dependent, because I remember seeing some websites on the internet mentioning this since deep linking request originates from the LMS ( essentially from its LTI deeplinking module ) first then send it out to the deeplinking URL I remember seeing something like KEY1=VALUE&KEY2=VALUE2 , I don't know I am just shooting in the dark there. I presume since it says custom, it should work in a simple intuitive way.
Here is the screenshot of my config for your reference
..also thanks for the first point highlight..I will try it out...
This more of a questions. Igot everything working but Deep Linking.
For some reason, when I submit the deep lnked form, it generates "Tool (Invalid Link)" In Balckboard fro me that I cannot click on. Any idea what could be the issue?
This is the jwt token generated by ltijs.
This is in Blckboard: