web service token creation
Hi,
We are trying to integrate moodle quizzes to our web application. Users log in to our web app from Open LMS with LTI. We retrieve a quiz with web services and display it in our web app. User should be able to submit his answers. A token is required to send the quiz answers to OpenLMS. We don’t want to manually create tokens for our users, because we get new users all the time. Is it possible to create a token for a specific user with web services? Or can you suggest a workaround?
-
Official comment
Hi Tuomo,
Thank you for your message.
Let me reiterate the process workflow to make sure we're on the same page.
- A Quiz in your Open LMS site is created, and published as an LTI Tool.
- Your web app connects\"registers" to the LMS and "publishes"\displays the quiz.
- A user logs into your web app to complete the Quiz. The user either already has an account in the LMS that hosts the quiz, or a new one could be provisioned. (Ideally the sites are connected via SSO.)
- The user completes the Quiz, the results are stored in the LMS and optionally reported back or displayed on the web app.
If this is more or less your scenario, the "LTI Publish" (enrol_lti) plugin might be the solution you're looking for. Please reach out to our support team if you want to enable it and test it on your site.
And let us know if it works!
Kind regards,
-
Hi,
Thanks for your answer. I’ll try to be more precise.
- A quiz in Open LMS is created manually. Questions are added to a quiz.
- A user of our web application wants to start a quiz. We fetch information about a quiz with web service calls to our web app. We use functions mod_quiz_start_attempt, mod_quiz_get_attempt_data
- We display the quiz in our web app
- A student fills out the quiz
- Our web app needs to send the answers to OpenLMS . At this point we need to send the answers to Open LMS with web service function mod_quiz_process_attempt.
- All the functions we use require the web service token of the student who is attempting the quiz. We do not have this information at the moment. We know the Lms username and userid of the user. We only have one LMS user whose token we have been using to handle web service functions. We need to be able to retrieve the web service token of the student with web services. If the user doesn’t have a token, token should be created. Is this possible with web services?
It seems that the lti_enrol plugin is already active in our account. We’ll look into it as well, although it using it might involve too many steps for our teachers. Every quiz should be published separately as an LTI tool.
1 -
Hi Tuomo, I think I understand now. Please submit the ticket so one of our agents can validate what is possible, as the scenario you're describing is quite specific and technical. Thank you!
0
Please sign in to leave a comment.
Comments
3 comments