Skip to content
Snippets Groups Projects
common.py 35.2 KiB
Newer Older
# To use this block, add 'foobar-block' to the ADVANCED_COMPONENT_TYPES list.

ADVANCED_COMPONENT_TYPES = [
    'annotatable',
    'textannotation',  # module for annotating text (with annotation table)
    'videoannotation',  # module for annotating video (with annotation table)
    'imageannotation',  # module for annotating image (with annotation table)
    'word_cloud',
    'lti',
    'library_content',
    'problem-builder',
    'pb-dashboard',
Piotr Mitros's avatar
Piotr Mitros committed
    # Some of the XBlocks from pmitros repos are sometimes prototypes.
    # Use with caution.
    'concept',  # Concept mapper. See https://github.com/pmitros/ConceptXBlock
    'done',  # Lets students mark things as done. See https://github.com/pmitros/DoneXBlock
    'audio',  # Embed an audio file. See https://github.com/pmitros/AudioXBlock
    'recommender',  # Crowdsourced recommender. Prototype by dli&pmitros. Intended for roll-out in one place in one course.
    'profile',  # Prototype user profile XBlock. Used to test XBlock parameter passing. See https://github.com/pmitros/ProfileXBlock
Piotr Mitros's avatar
Piotr Mitros committed
    'rate',  # Allows up-down voting of course content. See https://github.com/pmitros/RateXBlock
    'split_test',
    'notes',
    'schoolyourself_review',
    'schoolyourself_lesson',
    # Office Mix
    'officemix',

    # Google Drive embedded components. These XBlocks allow one to
    # embed public google drive documents and calendars within edX units
    'google-document',
    'google-calendar',
Sarina Canelake's avatar
Sarina Canelake committed
    # Oppia block
    'oppia',

    # In-course reverification checkpoint
    'edx-reverification-block',
Pan Luo's avatar
Pan Luo committed

    # Peer instruction tool
    'ubcpi',
# Adding components in this list will disable the creation of new problem for
# those components in Studio. Existing problems will work fine and one can edit
# them in Studio.
DEPRECATED_ADVANCED_COMPONENT_TYPES = []

# Specify XBlocks that should be treated as advanced problems. Each entry is a
# dict:
#       'component': the entry-point name of the XBlock. See the comment for
#               ADVANCED_COMPONENT_TYPES for details of where to find this
#               name.
#       'boilerplate_name': an optional YAML template to be used.  Specify as
#               None to omit.
#
ADVANCED_PROBLEM_TYPES = [
    {
        'component': 'openassessment',
        'boilerplate_name': None,


# Files and Uploads type filter values

FILES_AND_UPLOAD_TYPE_FILTERS = {
    "Images": ['image/png', 'image/jpeg', 'image/jpg', 'image/gif', 'image/tiff', 'image/tif', 'image/x-icon'],
    "Documents": [
        'application/pdf',
        'text/plain',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
        'application/vnd.openxmlformats-officedocument.presentationml.presentation',
        'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
        'application/vnd.openxmlformats-officedocument.presentationml.template',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
        'application/msword',
        'application/vnd.ms-excel',
        'application/vnd.ms-powerpoint',
    ],
}

# Default to no Search Engine
ELASTIC_FIELD_MAPPINGS = {
    "start_date": {
        "type": "date"
    }
}

XBLOCK_SETTINGS = {
    "VideoDescriptor": {
        "licensing_enabled": FEATURES.get("LICENSING", False)
    },
    'VideoModule': {
        'YOUTUBE_API_KEY': YOUTUBE_API_KEY

################################ Settings for Credit Course Requirements ################################
# Initial delay used for retrying tasks.
# Additional retries use longer delays.
# Value is in seconds.
CREDIT_TASK_DEFAULT_RETRY_DELAY = 30

# Maximum number of retries per task for errors that are not related
# to throttling.
CREDIT_TASK_MAX_RETRIES = 5

# Maximum age in seconds of timestamps we will accept
# when a credit provider notifies us that a student has been approved
# or denied for credit.
CREDIT_PROVIDER_TIMESTAMP_EXPIRATION = 15 * 60


################################ Deprecated Blocks Info ################################

DEPRECATED_BLOCK_TYPES = [
    'peergrading',
    'combinedopenended',
    'graphical_slider_tool',
]

#### PROCTORING CONFIGURATION DEFAULTS

PROCTORING_BACKEND_PROVIDER = {
    'class': 'edx_proctoring.backends.null.NullBackendProvider',
    'options': {},
}
PROCTORING_SETTINGS = {}


############################ OAUTH2 Provider ###################################

# OpenID Connect issuer ID. Normally the URL of the authentication endpoint.
OAUTH_OIDC_ISSUER = 'https://www.example.com/oauth2'