Why am I inserting rows anyway? I have found this as the easiest way for me to bring in an IMSCC folders from Pearson learning into our Moodle which will be far easier than the many workarounds I found before. One of my departments chose Pearson learning and to integrate it with their system I need to put all their LTI's (thousands for each book x 5) into a moodle class. I already tested these imscc modules in canvas and 25 other LMS's which work fine there but in Moodle there have been various issues. Opening up the imsmanifest file I see it's actually quite simple and easy for me to create a csv file from that information with a title, url, secret, and key for each one and then import them into mysql using adminer. But my test insertion is not showing up in my moodle test course yet. Thanks in advance
I would strongly recommend that you do not manipulate the database directly. There may be (and this appears to be the case here) dependencies that you don't know about. In this case, I imagine you are hitting caching issues.
Moodle has a bunch of web services for creating activities and manipulating LTI. That would be the sensible way to proceed.
Thanks for the quick reply Howard. I tried clearing my cache just now but still can't see it. I know it's not the best way to go but fixing 15000 entries is just not doable for me manually. I tried various ways for months to import the imscc into other LMS's that could export into mbz format or cc version 1.0 that Moodle can handle and the best of those solutions still left me with 15000 entries to fix. Mysql is so much easier. I have been looking over the other tables and I don't see any references to the LTI in another table there than this one but I'll search again thanks.
...or, you could use the webservice API which exists for exactly this purpose.
HI Howard, can you explain further as I would LOVE not to have to do it in this more dangerous workaround. I have tried importing IMSCC files from pearson but every time even after updating moodle to 3.4 it fails to pull in any link to any lti's. I tried 25 other lms's with varying success - canvas worked best and blackboard second but of course I don't want my users going there and I don't want to use their system. I tried exporting from every one of the 25 LMS's but had the same limitation as it would not pull in a single LTI signed with a url. With 15,000 of these I am all ears but so far using an update mysql statement finally worked for one but it is very cumbersome. Please tell me more about using the webservice API as Pearson says not a single Moodle person has been successful in their knowledge of making the IMSCC cartridge work. I may succeed but only by using an inordinate amount of time to do so. Please teach me your ways . . . .
Unfortunately, I don't know anything about Pearson or IMSCC so can't help directly. Can you share how you are doing what you are doing? What data are you getting and what are you adding (where) in the database?
Thanks Howard for brainstorming with me. also for anyone who is facing the same challenge with many LTI's unsigned here's my best workaround so far until I learn a better way:
First I abandoned adding a single new mysql row in the table mdl_lti and and mass importing rows as both were problematic maybe due to the servicesalt being null not sure what that is but correctly working fields have a value there and I don't know how it is created.
My new process which at least saves a little time:
1. duplicate a working LTI in any course say 100 times (this example shows just 1) and then
2. go to mysql find it's id number in adminer and then
3. run an update command to fix whatever you need to fix like this example
update mdl_lti set name = 'Biography: John J. Pershing', toolurl = 'https://www.pearsonrealize.com/community/lti/realize/launch/01a439bf-c590-3cb8-8cad-ed1a4bc0252c/viewer', password = 'some-number-from-your-provider', resourcekey= 'some-number-from-your-provider'
where ID = 158
This worked right away in Moodle without even purging cache.
Unzip your imscc file and you'll find the imsmanifest file deep within the folder, open that file with notepad +. Inside you will see each title and it's identifier number which points to one of many many folders each with an xml file which if you open it in notepad basically tells you the title again and the launch url which is all you need to make each lti work (besides the key and secret added elsewhere)
However, rather than opening each file folder it's easier to just use the IMSManifest because the identifier number in my case (all Pearson imscc files I hope) is the same number used in the url I need it's just a truncation:
example, in imsmanifest file you see this title and identifier
identifier="I_0dcdd503-c286-3c3b-9a73-835c35e864d8_R"> <title>Geography Core Concepts: Teacher Support</title>
Now, if I were to look within a folder named I_0dcdd503-c286-3c3b-9a73-835c35e864d8_R I would find the title and the needed url:
<blti:title>Geography Core Concepts: Teacher Support</blti:title>
rather than open thousands of folder to find that url just used excel (or better vba) to first find each instance of
identifier="I_ in the file imsmanifest
and then copy the next 36 consecutive numbers and concatenate the number like this
take all these values and use an update mysql statement like the example at the very top and here (remember to use ' at start and end of each:
update mdl_lti set name = 'Geography Core Concepts: Teacher Support', toolurl = 'https://www.pearsonrealize.com/community/lti/realize/launch/0dcdd503-c286-3c3b-9a73-835c35e864d8/viewer', password = 'some-number-from-your-provider', resourcekey= 'some-number-from-your-provider'
where ID = 158
I hope this helps someone. back up your database first
Howard - I would like to know that there are no other dependent tables and see there are a couple of tools to find dependencies but in a graphical interface. My ubuntu is not graphical and I don't know either in the server mysql nor in adminer online how to find dependent tables. I'm hoping LTI is such a small part of moodle that mdl_lti is the only table I need to worry about.
I attached the imsmanifest so you can see it. I had to delete a few hundred lines and zip it so it was below 500kb but those lines are just more links all with the same basic format at the thousands above it.