#1
by
LucaP
Hello, I am trying to setup a tool based on LTI 1.3 to connect Moodle and oTree (deployed on Heroku). As far as I have understood, I need the API from oTree to complete the connection of the two platforms. Do you know if such an API exists? Or else, can you share any suggestion on how to proceed? I thank you very much! Best regards, Luca
#2
by
Chris_oTree
oTree has a REST API: https://otree.readthedocs.io/en/latest/misc/rest_api.html But it doesn't sound what you are looking for. oTree doesn't support LTI or any Moodle integration. Can you describe in more detail how you want to integrate it?
#3
by
LucaP
Dear Chris, Thank you very much for your message. Our working environment is as follows: Students access the University Moodle platform with their credentials for authentication. From their course webpage, they may be directed to external platforms to complete course-related tasks (assignments, exercises, etc.). Once a task is completed, the external platform can send back information about its completion. We are interested in using oTree as one of these external tools. To this end, we would like to connect Moodle and oTree so that (i) students can interact on oTree directly in Moodle and (ii) session information can be saved and sent back to Moodle after once the task is completed. The following steps summarize the relevant process: 1) Students log in to Moodle via SSO authentication. 2) From their course's webpage, they interact with oTree (deployed on Heroku, for example) to perform the experiment. 3) At the end of the experiment, oTree sends a completion message to Moodle confirming that the student has finished the task. Moodle can handle external tools via LTI 1.1/1.3. As I understand it, this requires the use of an API. However, as you pointed out, the REST API may not be suitable. Could you suggest a solution for implementing the above process? Thank you in advance for your help and your suggestions! Best regards, Luca
#4
by
Chris_oTree
if your other server has a scripting interface to make API GET/POST calls, then you can call oTree's REST API. You can write some code using our endpoints. See the documentation i linked above.
#5
by
LucaP
Dear Chris, Thank you very much for your suggestion! Best, Luca