Integrating open edX with your Website

Open edX Conference 2018

Juan Montoya

Felipe Montoya

about eduNEXT

  • Conference sponsors
  • Open source contributors
  • Open edX solutions providers for 4+ years
  • Open edX as Service
    • +1800 sites in 25 countries
    • 15 languages

Integrating open edX with your Website

www.yourdomain.com

CONTENT MANAGEMENT SYSTEM

openedx.yourdomain.com

LMS

Who does it?

Why would you?

  • Flexibility.
  • Simplicity - Faster publishing.
  • Different development cycle, team or provider.
  • Existing web content platform.
  • Other functionality needed,  blog, discussions, community, portfolios.
  • Integrating courses from different platforms.
  • Friendly URLs
  • SEO
  • Web content Authoring
  • Content hierarchy
  • Editing rights management
  • Role based access to content

Some things CMS do better:

 

  • Seamless UX

  • Data consistency - accuracy

  • High performance

 

  • Simple management

  • Code Maintainability - long term

  • Your choice of technology

  • Flexibility

How to get it right?

  • Extending open edX to perform CMS functions?

How to go about it?

  • Integrating open edX with an existing CMS

How far can I go?

Session Awareness

User Menu

Redirections

Enrollment Awareness

Access the list of courses

  • Search
  • Sort
  • Filter:

by availability

by organization

by subject

by language

by level

by program

by tags

by course instructor

by score

Sync Authentication

External Registration

External Enrollment 

Access course updates, important dates

Access learner's enrollments, grades, certificates

Access the                     profile

instructor

user

other user

Access courseware components

Diving in

Sharing cookies

Session Awareness

User Menu

Redirections

"SESSION_COOKIE_DOMAIN": ".yourdomain.com"

On the settings:

"SESSION_COOKIE_DOMAIN": "*"

From:

To:

https://

Its 2018, encrypt already

  • edx-user-info:






     
  • edxloggedin: true|false
     
  • sessionid:
     
  • openedx-language-preference: fr-CA

What you get

{
  "username": "FelipeMontoya",
  "version": 1,
  "enrollmentStatusHash": "ed68ba6c8fdf0dd84b230773f8c07c90",
  "header_urls": {
    "learner_profile": "https://openedx.yourdomain.com/u/FelipeMontoya",
    "resume_block": "https://openedx.yourdomain.com/courses/course-v1:BerkeleyX+Data8.1x+1T2018/jump_to/block-v1:BerkeleyX+Data8.1x+1T2018+type@html+block@4a4936bfd5344d3cbf8efbaac66f6d3d",
    "logout": "https://openedx.yourdomain.com/logout",
    "account_settings": "https://openedx.yourdomain.com/account/settings"
  }
}
"1|iY2JlMTA0MmZjZmM0YzM0|hCvYuvywId4E|ImRiY2JlMTANmYmZmMzBhNzBlODFhYzVmOTIzMTExMTYi:1fO51c:0ExrOk9MMlPlLGBjN381iJaQWHw"

All that for what?

Basic http redirection

  • /
  • /courses
  • /honor
  • /about
  • /faq
  • /tos
  • /privacy
  • /moar_statics

Redirections

Nginx

/edx/app/nginx/sites-available/lms

location /tos$ {
  return  301 https://www.yourdomain.com/tos;
}

Application

lms/djangoapps/static_template_view/views.py

@ensure_csrf_cookie
@cache_if_anonymous()
def render(request, template):
    """
    This view function renders the template sent without ...

    """
    mktg_redirects = microsite.get_value('MKTG_REDIRECTS', {})
    if mktg_redirects.get(template, False):
        return redirect(mktg_redirects.get(template, '/'))

Enrollment Awareness

Next step

APIs

Diving Deeper

"ENABLE_MKTG_SITE": true,

Configuration

"MKTG_URLS": {
    "ROOT": "https://www.yourdomain.com/",
    "ABOUT": "about",
    "HONOR": "honor",
    "HOW_IT_WORKS": "about",
    "COURSES": "our-courses",
    "PRIVACY": "https://somethingelse.entirely.com/privacy/",
    "TOS": "tos",
    "BLOG": "",
    "CONTACT": "",
    "DONATE": "",
    "FAQ": "",
    "PRESS": "",
    "SCHOOLS": "",
    "WHAT_IS_VERIFIED_CERT": ""
},

Now what?

Collateral damage

Wordpress plugin

by

How to use

Search for edunext-openedx-integrator at the wp plugin registry

What do you get?

 Session awareness

User Menu integration

Enrollment button logic

Use wordpress style shortcodes

Security: CSRF

​Cross Site Request Forgery

/edx/app/nginx/sites-available/lms

add_header 'Access-Control-Allow-Origin' 'https://www.yourdomain.com';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'OPTIONS';

Even deeper

Access the list of courses

No go

It's deprecated

Course catalogue

Discovery service

sudo su discovery -s /bin/bash
cd
source venvs/discovery/bin/activate
source discovery_env
cd discovery/
./manage.py refresh_course_metadata

Index keeping

What is it?

Elasticsearch

Haystack

Oauth

DRF

Access to consolidated course and program metadata

 

  • Marketing page (drupal, WP, something else)

  • Webview (used for mobile apps course discovery)

  • Ecommerce

  • Mobile apps

What is it for?

Dreamland

The closest thing is a fork for now

APIs

Enrollment Administration API

User creation and management API

External Registration

External Enrollment 

Use cases

Sync Authentication

Access course updates, important dates

Access learner's enrollments, grades, certificates

Access the                     profile

instructor

user

other user

Access courseware components

Integrating open edX with your Website

Open edX Conference 2018

Juan Montoya

Felipe Montoya

Thank you !

Integrating open edX with your Website or CMS

By Juan Camilo Montoya

Integrating open edX with your Website or CMS

  • 241
Loading comments...