一个IMS-LTI提供程序接口,用于Django应用程序,使用IMS-LTI py库,创建用于Catalunya UOC-Nfiney 2013大学
django-uocLT的Python项目详细描述
django uoclti是一个用于将django应用程序与lms平台连接的应用程序,创建用于加泰罗尼亚大学(uoc)。此应用程序将Django项目转换为LTI提供程序,创建用户和基于使用者提供的LTI字段(ims-lti)的相关字段的配置文件。
这个应用程序或多或少只是一个例子,说明了如何使用ims-lti-py library和一个简单的概要模型来保存感兴趣的字段,设置一个django项目来处理来自消费者的lti请求。
安装和设置
运行setup.py安装Uoclti及其依赖项。然后,将'uoclti'添加到您设置中已安装的应用程序,并运行syncdb添加配置文件表。
在main urls.py文件中添加以下行:
url(r'^uocLTI/', include('uocLTI.urls')),
设置:
- CONSUMER_URL: This field is not currently being used. - CONSUMER_KEY: Used for authentication, along with LTI_SECRET (required) - LTI_SECRET: Used for authentication, along with CONSUMER_KEY (required) - VELVET_ROLES: List of roles which are allowed access to the app (optional: if not set, any role is allowed entry) - VELVET_ADMIN_ROLES: List of roles which are added as administrators (optional: make sure these are rock solid, they set is_staff=True, is_superuser=True thereby giving full access to the app. If not set no users entering via LTI will have staff or superuser privaledges) - AUTH_PROFILE_MODULE: Set by default to 'uocLTI.LTIProfile', make sure this is not overridden in settings. If you are going to be using another custom profile model, then you'll need to remove the code related to the profile fields in views.py.
- lti_debug:默认设置为false
- login_redirect_url:设置为成功登录后重定向的url
用法
launchurl是http://<;域>;/uoclti/launch-lti/。ActuoJoLLTI视图处理请求,如果用户不存在,则创建新用户和关联的配置文件,否则用户将登录并重定向到项目设置中定义的LogiNeReNeTTURURL URL。