简体   繁体   English

Moodle与我的PHP项目集成

[英]Moodle Integration with a PHP project of mine

I've been developing a project using php that my students use to take quizes (that moodle can't do itself) Now I would like to integrate moodle and my project such that my project authenticates against moodle users and reports grades into a courses gradebook. 我一直在使用php开发一个项目,我的学生用来进行测验(那个小家伙自己做不到)现在,我想将它们与我的项目集成在一起,这样我的项目就可以针对小家伙的用户进行身份验证,并将成绩报告到课程成绩簿中。 I've so far been authenticating using direct database reading but I'm very hesitant to do writes to the moodle database. 到目前为止,我一直在使用直接数据库读取进行身份验证,但是我非常犹豫是否要对moodle数据库进行写操作。 I'm also aware of LTI; 我也知道LTI; I am open to using it but the human readable documentation and any samples are impossible to find. 我愿意使用它,但是找不到可读的文档和任何示例。 If you could provide me a sample or documentation thats less theory and more applicable for LTI it would be greatly appreciated. 如果您能提供给我的样品或文档不那么理论,更适合LTI,将不胜感激。

Thanks in advance. 提前致谢。

To do this you need to use the Web Services API. 为此,您需要使用Web服务API。 You need to setup a web service first, see Using web services . 您需要首先设置一个Web服务,请参阅使用Web服务 The entire API documentation is available on your Moodle site via Administration > Plugins > Web services > API Documentation . 您可以通过管理>插件> Web服务> API文档在您的Moodle网站上获取完整的API文档

You need to use moodle's External Tool, which is created precisely for this kind of uses. 您需要使用moodle的外部工具,该工具正是为此用途而创建的。 External tool uses LTI in the background to send user, course, role etc information to an external application and the external application can even send back scores to moodle if configured as a quiz. 外部工具在后台使用LTI将用户,课程,角色等信息发送到外部应用程序,并且如果配置为测验,则外部应用程序甚至可以将分数发送回moodle。

Check out : https://docs.moodle.org/23/en/External_tool 签出: https : //docs.moodle.org/23/en/External_tool

You will also have to make your quiz taking app, an LTI provider. 您还必须制作自己的测验应用程序,即LTI提供程序。 This open source package is out of the box package to create LTI provider in ruby - https://github.com/instructure/ims-lti There are similar tools in other languages too, but this one is the most polished one. 这个开源软件包是开箱即用的软件包,用于在ruby中创建LTI提供程序-https: //github.com/instructure/ims-lti也有其他语言的类似工具,但这是最完善的工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM