Skip to content

Harvard-University-iCommons/django-lti-dynamic-registration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-lti-dynamic-registration

Add-on to django-lti to support dynamic registration.

See: https://www.imsglobal.org/spec/lti-dr/v1p0

More details to come.

Using

from lti_dynamic_registration.views import DynamicRegistrationBaseView
from lti_dynamic_registration.types import (
    CanvasLtiMessage,
    CanvasLtiRegistration,
    CanvasLtiToolConfiguration,
)
from django.shortcuts import redirect, render


class DynamicRegistrationView(DynamicRegistrationBaseView):
    tool_friendly_name = "Tool Name"

    def get(self, request, *args, **kwargs) -> HttpResponse:
        # Return a form to the user where they can customize the registration
        return render(request, 'registration.html')


    def post(self, request, *args, **kwargs) -> HttpResponse:
        # Perform the registration steps. Typically this would involve:
        # 1. Register the platform in the tool
        # 2. Register the tool in the platform
        # 3. Update the platform registration with the client ID returned in step 2


        # Return a page containing javascript that calls a special
        # platform postMessage endpoint
        return self.success_response()

About

Add-on to django-lti to support dynamic registration.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages