Best practice forum (Archived)

Access to course custom fields in External Tool (LTI) custom parameters?

 
Matt Williams
Access to course custom fields in External Tool (LTI) custom parameters?
by Matt Williams - Wednesday, 24 April 2019, 6:51 PM
 

I am using the LTI External Tool plugin on our totara environment. Today I learned I could add to custom parameters for the external tool something like 'thisuser=$User.username' and the LTI will see thisuser=adminuser. Great. So what else can I access like this. Is there a listing of other variables I can see???

The thing I really want is access to custom fields set on the course. Is this possible?

Wesley Holden
Re: access to course custom fields in lti custom parameters?
by Wesley Holden - Thursday, 2 May 2019, 2:45 PM
 

Hi Matt, 
Apologies for not responding sooner. The docs for the tool are here:  https://help.totaralearning.com/display/TLE/Enrolment#Enrolment-PublishasLTItool(experimental) 

I've poked around to see what is available and haven't found a list of variables. I'm also posting the question to the support team to see if they have additional details.


Thanks!

Wes

This forum post has been removed
Wednesday, 8 May 2019, 4:35 PM
The content of this forum post has been removed and can no longer be accessed.
Matt Williams
Re: access to course custom fields in lti custom parameters?
by Matt Williams - Wednesday, 8 May 2019, 5:25 PM
 

This is super useful. Thank you. What I was hoping to see was an ability to get course custom fields out as well. I guess I can do that via rest, but eliminating the need for another round trip call would be nice. 


Thanks again for this great answer. 

Matt Williams
Re: access to course custom fields in lti custom parameters?
by Matt Williams - Wednesday, 8 May 2019, 5:55 PM
 

For context, here is what I am doing. I run the learning environment in our company and we have a number of hands-on sections where folks can try working with the product. When they complete the section, the LTI service that I wrote will assess whether they have completed the tasks by interrogating their account using our API. The LTI service uses AWS Lambda and Step Functions and has been the topic of a couple of my talks at AWS re:Invent and other conferences. 

So recently we started implementing a hosted lab environment. The labs have a lab id based on an account name and specific scenario id. But I develop the course on my personal Github account, and then when it's complete, move it over to the company Github org. So a course might have 6 or so labs and that means when I move it over, I have to change the lab id 6 times or more. Chances are I am going to miss one. So, I want a way to store the first part of the lab id in the course info, such as a custom field, then the scenario id is in the custom parameters. If I have access to those custom fields then when I move from the personal account to the company org, I only have to change the value once. With all that info passed to the LTI, I then generate an embed code that is the contents of the iframe for the External Tool. Then when the student finishes that section, they run a command in the hosted lab environment that again uses the LTI to assess their progress and returns a grade to Totara. 

It works really well, I just want to solve this lab ID issue without a second call via the REST api. 

This forum post has been removed
Thursday, 9 May 2019, 1:47 PM
The content of this forum post has been removed and can no longer be accessed.
Matt Williams
Re: access to course custom fields in lti custom parameters?
by Matt Williams - Thursday, 9 May 2019, 6:19 PM
 

So the lab environment is provided by Katacoda. Each scenario is pushed to GitHub which then triggers a hook that pushes it to katacoda. I test each scenario on my personal GitHub account, the. When it goes live, I move it over to the Datadog organization on GitHub. So the account ids are technovangelist and datadog. I’m putting the whole thing in the custom parameters now, but I was hoping to make configuration a little easier. Each lab is only used in a single course. Right now I am building a course on monitoring Kubernetes with datadog. And so as I test it out, the katacoda ID is for one of the scenarios is technovangelist/k8s1-install, but when it goes live it will be datadog/k8s1-install. But then there are times when we do in person courses and we have katacoda provision a bunch of extra machines for us. The course would have a slightly different ID for those labs.

The lab config is identical for all all users, but one of the functions of the lti is to generate a datadog account for the user, gather api keys for the user, and generate the embed code for the katacoda labs with those api keys and other things which then get injected into the lab scenario.

As an org we really like tools that can be store the config in GitHub. A little off topic, but it would be super amazing if there was a way to push a course config and all content to GitHub and have a job in Jenkins or even the new GitHub actions to push it to our Totara instance. 

This forum post has been removed
Monday, 13 May 2019, 3:44 PM
The content of this forum post has been removed and can no longer be accessed.
Jussi Tuominen
Re: access to course custom fields in lti custom parameters?
by Jussi Tuominen - Thursday, 4 February 2021, 9:06 AM
 

Hello Matt,

My customer wants to build similar arrangement for their training labs. Any possibility that you would share your details with us?

What LTI solution you used? Did you considered implementing with REST API?

/jussi