Best practice forum (Archived)

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

 
WilliamsMatt
Access to course custom fields in External Tool (LTI) custom parameters?
WilliamsMatt 发表于 2019年04月24日 Wednesday 18:51
 

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?

??
Re: access to course custom fields in lti custom parameters?
?? 发表于 2019年05月2日 Thursday 14:45
 

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

该论坛帖子已被删除
2019年05月8日 Wednesday 16:35
该论坛帖子的内容已被删除,无法再访问。
WilliamsMatt
Re: access to course custom fields in lti custom parameters?
WilliamsMatt 发表于 2019年05月8日 Wednesday 17:25
 

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. 

WilliamsMatt
Re: access to course custom fields in lti custom parameters?
WilliamsMatt 发表于 2019年05月8日 Wednesday 17:55
 

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. 

该论坛帖子已被删除
2019年05月9日 Thursday 13:47
该论坛帖子的内容已被删除,无法再访问。
WilliamsMatt
Re: access to course custom fields in lti custom parameters?
WilliamsMatt 发表于 2019年05月9日 Thursday 18:19
 

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. 

该论坛帖子已被删除
2019年05月13日 Monday 15:44
该论坛帖子的内容已被删除,无法再访问。
TuominenJussi
Re: access to course custom fields in lti custom parameters?
TuominenJussi 发表于 2021年02月4日 Thursday 09:06
 

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