openedx.core.djangoapps.ccxcon package#
Submodules#
openedx.core.djangoapps.ccxcon.api module#
Module containing API functions for the CCXCon
- exception openedx.core.djangoapps.ccxcon.api.CCXConnServerError#
Bases:
ExceptionCustom exception to be raised in case there is any issue with the request to the server
- openedx.core.djangoapps.ccxcon.api.course_info_to_ccxcon(course_key)#
Function that gathers informations about the course and makes a post request to a CCXCon with the data.
- Parameters:
course_key (CourseLocator) – the master course key
- openedx.core.djangoapps.ccxcon.api.get_oauth_client(server_token_url, client_id, client_secret)#
Function that creates an oauth client and fetches a token. It intentionally doesn’t handle errors.
- Parameters:
server_token_url (str) – server URL where to get an authentication token
client_id (str) – oauth client ID
client_secret (str) – oauth client secret
- Returns:
an instance of OAuth2Session with a token
- Return type:
OAuth2Session
- openedx.core.djangoapps.ccxcon.api.is_valid_url(url)#
Helper function used to check if a string is a valid url.
- Parameters:
url (str) – the url string to be validated
- Returns:
whether the url is valid or not
- Return type:
bool
openedx.core.djangoapps.ccxcon.apps module#
Configuration for CCX connector
openedx.core.djangoapps.ccxcon.models module#
Models for the ccxcon
- class openedx.core.djangoapps.ccxcon.models.CCXCon(*args, **kwargs)#
Bases:
ModelDefinition of the CCXCon model. Stores the url and the oauth key to access the REST APIs on the CCX Connector.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- oauth_client_id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- oauth_client_secret#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>#
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
openedx.core.djangoapps.ccxcon.signals module#
Signal handler for posting course updated to CCXCon
openedx.core.djangoapps.ccxcon.tasks module#
This file contains celery tasks for ccxcon
Module contents#
The ccxcon app contains the models and the APIs to interact with the CCX Connector, an application external to openedx that is used to interact with the CCX and their master courses.
The ccxcon app needs to be placed in openedx.core.djangoapps because it will be used both in CMS and LMS.