Merge branch 'openedx:master' into master

This commit is contained in:
Santhosh Kumar
2025-09-24 12:57:37 +05:30
committed by GitHub
63 changed files with 3316 additions and 3837 deletions

View File

@@ -123,6 +123,8 @@ compile-requirements: pre-requirements $(COMMON_CONSTRAINTS_TXT) ## Re-compile *
@# time someone tries to use the outputs.
sed 's/Django<5.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
sed 's/pip<24.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
pip-compile -v --allow-unsafe ${COMPILE_OPTS} -o requirements/pip.txt requirements/pip.in
pip install -r requirements/pip.txt

View File

@@ -168,9 +168,13 @@ Set up CMS SSO (for Production):
* Set ``SOCIAL_AUTH_EDX_OAUTH2_KEY`` to the client ID (``studio-sso-id``).
* Set ``SOCIAL_AUTH_EDX_OAUTH2_SECRET`` to the client secret (which you copied).
Run the Platform
----------------
Startup the Platform
====================
First, ensure MySQL, Mongo, and Memcached are running.
Start the LMS::
@@ -183,16 +187,46 @@ Start the CMS::
This will give you a mostly-headless Open edX platform. Most frontends have
been migrated to "Micro-Frontends (MFEs)" which need to be installed and run
separately. At a bare minimum, you will need to run the `Authentication MFE`_,
separately. At a bare minimum, you will need to run the `Authoring MFE`_,
`Learner Home MFE`_, and `Learning MFE`_ in order meaningfully navigate the UI.
A full list of the MFEs expected to run by default are listed below.
.. _Tutor: https://github.com/overhangio/tutor
.. _Site Ops home on docs.openedx.org: https://docs.openedx.org/en/latest/site_ops/index.html
.. _development mode: https://docs.tutor.edly.io/dev.html
.. _building static assets: ./docs/references/static-assets.rst
.. _Authentication MFE: https://github.com/openedx/frontend-app-authn/
.. _Learner Home MFE: https://github.com/openedx/frontend-app-learner-dashboard
.. _Learning MFE: https://github.com/openedx/frontend-app-learning/
.. _Authoring MFE: https://github.com/openedx/frontend-app-authoring/
Expected MFEs and Default Ports
-------------------------------
Currently the following MFEs are enabled by default, and are expected to be
running at the given ports.
.. list-table::
:header-rows: 1
* - Service Name
- Expected Location
- Override Setting Name
* - frontend-app-authoring
- localhost:2001
- COURSE_AUTHORING_MICROFRONTEND_URL
* - frontend-app-learning
- localhost:2000
- LEARNING_MICROFRONTEND_URL
* - frontend-app-learner-dashboard
- localhost:1996
- LEARNER_HOME_MICROFRONTEND_URL
* - frontend-app-profile
- localhost:1995
- PROFILE_MICROFRONTEND_URL
* - frontend-app-account
- localhost:1997
- ACCOUNT_MICROFRONTEND_URL
License
*******

View File

@@ -40,23 +40,3 @@ def _django_clear_site_cache():
with what has been working for us so far.
"""
pass # lint-amnesty, pylint: disable=unnecessary-pass
@pytest.fixture(autouse=True)
def no_webpack_loader(monkeypatch):
"""
Monkeypatch webpack_loader to make sure that webpack assets don't need to be
compiled before unit tests are run.
"""
monkeypatch.setattr(
"webpack_loader.templatetags.webpack_loader.render_bundle",
lambda entry, extension=None, config='DEFAULT', attrs='': ''
)
monkeypatch.setattr(
"webpack_loader.utils.get_as_tags",
lambda entry, extension=None, config='DEFAULT', attrs='': []
)
monkeypatch.setattr(
"webpack_loader.utils.get_files",
lambda entry, extension=None, config='DEFAULT', attrs='': []
)

View File

@@ -491,17 +491,24 @@ def _generate_course_updates_content(course, updates_links, course_key=None):
if not update_items:
return course_updates
# Group links by update ID and categorize them
links_by_update = {}
for item in updates_links:
if len(item) >= 2:
update_id, link = item[0], item[1]
link_state = item[2] if len(item) >= 3 else LinkState.BROKEN
links_by_update.setdefault(update_id, _create_empty_links_data())
_categorize_link_by_state(link, link_state, links_by_update[update_id], course_key)
for update in update_items:
if update.get("status") != "deleted":
update_content = update.get("content", "")
update_link_data = _process_content_links(update_content, updates_links, course_key)
update_id = update.get("id")
course_updates.append(
{
"id": str(update.get("id")),
"id": str(update_id),
"displayName": update.get("date", "Unknown Date"),
"url": f"/course/{str(course.id)}/course_info",
**update_link_data,
**links_by_update.get(update_id, _create_empty_links_data()),
}
)
@@ -522,14 +529,21 @@ def _generate_handouts_content(course, handouts_links, course_key=None):
):
return course_handouts
links_data = _process_content_links(handouts_block.data, handouts_links, course_key)
# Group links by block_id and categorize them
links_by_handout = {}
for item in handouts_links:
if len(item) >= 2:
block_id, link = item[0], item[1]
link_state = item[2] if len(item) >= 3 else LinkState.BROKEN
links_by_handout.setdefault(block_id, _create_empty_links_data())
_categorize_link_by_state(link, link_state, links_by_handout[block_id], course_key)
course_handouts = [
{
"id": str(usage_key),
"displayName": "handouts",
"url": f"/course/{str(course.id)}/course_info",
**links_data,
**links_by_handout.get(str(usage_key), _create_empty_links_data()),
}
]
return course_handouts

View File

@@ -15,7 +15,7 @@ from cms.djangoapps.contentstore.core.course_optimizer_provider import (
)
from cms.djangoapps.contentstore.tasks import LinkState, extract_content_URLs_from_course
from cms.djangoapps.contentstore.tests.utils import CourseTestCase
from cms.djangoapps.contentstore.utils import contains_previous_course_reference
from cms.djangoapps.contentstore.utils import contains_course_reference
from xmodule.tabs import StaticTab
@@ -329,7 +329,7 @@ class TestLinkCheckProvider(CourseTestCase):
for url, expected_match in test_cases:
with self.subTest(url=url, expected=expected_match):
result = contains_previous_course_reference(url, previous_course_key)
result = contains_course_reference(url, previous_course_key)
self.assertEqual(
result,
expected_match,

View File

@@ -18,7 +18,7 @@ from .proctoring import (
)
from .settings import CourseSettingsSerializer
from .textbooks import CourseTextbooksSerializer
from .vertical_block import ContainerHandlerSerializer, VerticalContainerSerializer
from .vertical_block import ContainerHandlerSerializer, ContainerChildrenSerializer
from .videos import (
CourseVideosSerializer,
VideoDownloadSerializer,

View File

@@ -105,6 +105,15 @@ class ContainerHandlerSerializer(serializers.Serializer):
return None
class UpstreamChildrenInfoSerializer(serializers.Serializer):
"""
Serializer holding the information about the children of an xblock that is syncing.
"""
name = serializers.CharField()
upstream = serializers.CharField(allow_null=True)
id = serializers.CharField()
class UpstreamLinkSerializer(serializers.Serializer):
"""
Serializer holding info for syncing a block with its upstream (eg, a library block).
@@ -115,9 +124,12 @@ class UpstreamLinkSerializer(serializers.Serializer):
version_declined = serializers.IntegerField(allow_null=True)
error_message = serializers.CharField(allow_null=True)
ready_to_sync = serializers.BooleanField()
is_modified = serializers.BooleanField()
has_top_level_parent = serializers.BooleanField()
ready_to_sync_children = UpstreamChildrenInfoSerializer(many=True, required=False)
class ChildVerticalContainerSerializer(serializers.Serializer):
class ContainerChildSerializer(serializers.Serializer):
"""
Serializer for representing a xblock child of vertical container.
"""
@@ -160,11 +172,11 @@ class ChildVerticalContainerSerializer(serializers.Serializer):
return actions
class VerticalContainerSerializer(serializers.Serializer):
class ContainerChildrenSerializer(serializers.Serializer):
"""
Serializer for representing a vertical container with state and children.
"""
children = ChildVerticalContainerSerializer(many=True)
children = ContainerChildSerializer(many=True)
is_published = serializers.BooleanField()
can_paste_component = serializers.BooleanField()

View File

@@ -1,32 +1,33 @@
""" Contenstore API v1 URLs. """
from django.conf import settings
from django.urls import re_path, path
from django.urls import path, re_path
from openedx.core.constants import COURSE_ID_PATTERN
from .views import (
ContainerChildrenView,
ContainerHandlerView,
CourseCertificatesView,
CourseDetailsView,
CourseTeamView,
CourseTextbooksView,
CourseIndexView,
CourseGradingView,
CourseGroupConfigurationsView,
CourseIndexView,
CourseRerunView,
CourseSettingsView,
CourseTeamView,
CourseTextbooksView,
CourseVideosView,
CourseWaffleFlagsView,
HomePageView,
HelpUrlsView,
HomePageCoursesView,
HomePageLibrariesView,
HomePageView,
ProctoredExamSettingsView,
ProctoringErrorsView,
HelpUrlsView,
VideoUsageView,
VideoDownloadView,
VerticalContainerView,
VideoUsageView,
vertical_container_children_redirect_view,
)
app_name = 'v1'
@@ -127,11 +128,17 @@ urlpatterns = [
ContainerHandlerView.as_view(),
name="container_handler"
),
# Deprecated url, please use `container_children` url below
re_path(
fr'^container/vertical/{settings.USAGE_KEY_PATTERN}/children$',
VerticalContainerView.as_view(),
vertical_container_children_redirect_view,
name="container_vertical"
),
re_path(
fr'^container/{settings.USAGE_KEY_PATTERN}/children$',
ContainerChildrenView.as_view(),
name="container_children"
),
re_path(
fr'^course_waffle_flags(?:/{COURSE_ID_PATTERN})?$',
CourseWaffleFlagsView.as_view(),

View File

@@ -3,10 +3,10 @@ Views for v1 contentstore API.
"""
from .certificates import CourseCertificatesView
from .course_details import CourseDetailsView
from .course_index import CourseIndexView
from .course_index import ContainerChildrenView, CourseIndexView
from .course_rerun import CourseRerunView
from .course_waffle_flags import CourseWaffleFlagsView
from .course_team import CourseTeamView
from .course_waffle_flags import CourseWaffleFlagsView
from .grading import CourseGradingView
from .group_configurations import CourseGroupConfigurationsView
from .help_urls import HelpUrlsView
@@ -14,7 +14,7 @@ from .home import HomePageCoursesView, HomePageLibrariesView, HomePageView
from .proctoring import ProctoredExamSettingsView, ProctoringErrorsView
from .settings import CourseSettingsView
from .textbooks import CourseTextbooksView
from .vertical_block import ContainerHandlerView, VerticalContainerView
from .vertical_block import ContainerHandlerView, vertical_container_children_redirect_view
from .videos import (
CourseVideosView,
VideoDownloadView,

View File

@@ -1,5 +1,7 @@
"""API Views for course index"""
import logging
import edx_api_doc_tools as apidocs
from django.conf import settings
from opaque_keys.edx.keys import CourseKey
@@ -8,10 +10,24 @@ from rest_framework.response import Response
from rest_framework.views import APIView
from cms.djangoapps.contentstore.config.waffle import CUSTOM_RELATIVE_DATES
from cms.djangoapps.contentstore.rest_api.v1.serializers import CourseIndexSerializer
from cms.djangoapps.contentstore.utils import get_course_index_context
from cms.djangoapps.contentstore.rest_api.v1.mixins import ContainerHandlerMixin
from cms.djangoapps.contentstore.rest_api.v1.serializers import (
CourseIndexSerializer,
ContainerChildrenSerializer,
)
from cms.djangoapps.contentstore.utils import (
get_course_index_context,
get_user_partition_info,
get_visibility_partition_info,
get_xblock_render_error,
get_xblock_validation_messages,
)
from cms.djangoapps.contentstore.xblock_storage_handlers.view_handlers import get_xblock
from cms.lib.xblock.upstream_sync import UpstreamLink
from common.djangoapps.student.auth import has_studio_read_access
from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin, verify_course_exists, view_auth_classes
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order
@view_auth_classes(is_authenticated=True)
@@ -98,3 +114,169 @@ class CourseIndexView(DeveloperErrorViewMixin, APIView):
serializer = CourseIndexSerializer(course_index_context)
return Response(serializer.data)
@view_auth_classes(is_authenticated=True)
class ContainerChildrenView(APIView, ContainerHandlerMixin):
"""
View for container xblock requests to get state and children data.
"""
@apidocs.schema(
parameters=[
apidocs.string_parameter(
"usage_key_string",
apidocs.ParameterLocation.PATH,
description="Container usage key",
),
],
responses={
200: ContainerChildrenSerializer,
401: "The requester is not authenticated.",
404: "The requested locator does not exist.",
},
)
def get(self, request: Request, usage_key_string: str):
"""
Get an object containing vertical state with children data.
**Example Request**
GET /api/contentstore/v1/container/{usage_key_string}/children
**Response Values**
If the request is successful, an HTTP 200 "OK" response is returned.
The HTTP 200 response contains a single dict that contains keys that
are the vertical's container children data.
**Example Response**
```json
{
"children": [
{
"name": "Drag and Drop",
"block_id": "block-v1:org+101+101+type@drag-and-drop-v2+block@7599275ace6b46f5a482078a2954ca16",
"block_type": "drag-and-drop-v2",
"user_partition_info": {},
"user_partitions": {}
"upstream_link": null,
"actions": {
"can_copy": true,
"can_duplicate": true,
"can_move": true,
"can_manage_access": true,
"can_delete": true,
"can_manage_tags": true,
},
"has_validation_error": false,
"validation_errors": [],
},
{
"name": "Video",
"block_id": "block-v1:org+101+101+type@video+block@0e3d39b12d7c4345981bda6b3511a9bf",
"block_type": "video",
"user_partition_info": {},
"user_partitions": {}
"upstream_link": {
"upstream_ref": "lb:org:mylib:video:404",
"version_synced": 16
"version_available": null,
"error_message": "Linked library item not found: lb:org:mylib:video:404",
"ready_to_sync": false,
},
"actions": {
"can_copy": true,
"can_duplicate": true,
"can_move": true,
"can_manage_access": true,
"can_delete": true,
"can_manage_tags": true,
}
"validation_messages": [],
"render_error": "",
},
{
"name": "Text",
"block_id": "block-v1:org+101+101+type@html+block@3e3fa1f88adb4a108cd14e9002143690",
"block_type": "html",
"user_partition_info": {},
"user_partitions": {},
"upstream_link": {
"upstream_ref": "lb:org:mylib:html:abcd",
"version_synced": 43,
"version_available": 49,
"error_message": null,
"ready_to_sync": true,
},
"actions": {
"can_copy": true,
"can_duplicate": true,
"can_move": true,
"can_manage_access": true,
"can_delete": true,
"can_manage_tags": true,
},
"validation_messages": [
{
"text": "This component's access settings contradict its parent's access settings.",
"type": "error"
}
],
"render_error": "Unterminated control keyword: 'if' in file '../problem.html'",
},
],
"is_published": false,
"can_paste_component": true,
}
```
"""
usage_key = self.get_object(usage_key_string)
current_xblock = get_xblock(usage_key, request.user)
is_course = current_xblock.scope_ids.usage_id.context_key.is_course
with modulestore().bulk_operations(usage_key.course_key):
# load course once to reuse it for user_partitions query
course = modulestore().get_course(current_xblock.location.course_key)
children = []
if current_xblock.has_children:
for child in current_xblock.children:
child_info = modulestore().get_item(child)
user_partition_info = get_visibility_partition_info(child_info, course=course)
user_partitions = get_user_partition_info(child_info, course=course)
upstream_link = UpstreamLink.try_get_for_block(child_info, log_error=False)
validation_messages = get_xblock_validation_messages(child_info)
render_error = get_xblock_render_error(request, child_info)
children.append({
"xblock": child_info,
"name": child_info.display_name_with_default,
"block_id": child_info.location,
"block_type": child_info.location.block_type,
"user_partition_info": user_partition_info,
"user_partitions": user_partitions,
"upstream_link": (
# If the block isn't linked to an upstream (which is by far the most common case) then just
# make this field null, which communicates the same info, but with less noise.
upstream_link.to_json(include_child_info=True) if upstream_link.upstream_ref
else None
),
"validation_messages": validation_messages,
"render_error": render_error,
})
is_published = False
try:
is_published = not modulestore().has_changes(current_xblock)
except ItemNotFoundError:
logging.error('Could not find any changes for block [%s]', usage_key)
container_data = {
"children": children,
"is_published": is_published,
"can_paste_component": is_course,
}
serializer = ContainerChildrenSerializer(container_data)
return Response(serializer.data)

View File

@@ -195,7 +195,7 @@ class ContainerVerticalViewTest(BaseXBlockContainer):
Unit tests for the ContainerVerticalViewTest.
"""
view_name = "container_vertical"
view_name = "container_children"
def test_success_response(self):
"""
@@ -279,6 +279,8 @@ class ContainerVerticalViewTest(BaseXBlockContainer):
"version_declined": None,
"error_message": "Linked upstream library block was not found in the system",
"ready_to_sync": False,
"has_top_level_parent": False,
"is_modified": False,
},
"user_partition_info": expected_user_partition_info,
"user_partitions": expected_user_partitions,

View File

@@ -1,33 +1,26 @@
""" API Views for unit page """
import logging
import edx_api_doc_tools as apidocs
from django.http import HttpResponseBadRequest
from django.http import HttpResponseBadRequest, HttpResponsePermanentRedirect
from django.urls import reverse
from rest_framework.request import Request
from rest_framework.response import Response
from rest_framework.views import APIView
from cms.djangoapps.contentstore.utils import (
get_container_handler_context,
get_user_partition_info,
get_visibility_partition_info,
get_xblock_validation_messages,
get_xblock_render_error,
)
from cms.djangoapps.contentstore.views.component import _get_item_in_course
from cms.djangoapps.contentstore.xblock_storage_handlers.view_handlers import get_xblock
from cms.djangoapps.contentstore.rest_api.v1.mixins import ContainerHandlerMixin
from cms.djangoapps.contentstore.rest_api.v1.serializers import (
ContainerHandlerSerializer,
VerticalContainerSerializer,
)
from cms.lib.xblock.upstream_sync import UpstreamLink
from cms.djangoapps.contentstore.utils import (
get_container_handler_context,
)
from cms.djangoapps.contentstore.views.component import _get_item_in_course
from openedx.core.lib.api.view_utils import view_auth_classes
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order
from cms.djangoapps.contentstore.rest_api.v1.mixins import ContainerHandlerMixin
log = logging.getLogger(__name__)
@@ -154,167 +147,16 @@ class ContainerHandlerView(APIView, ContainerHandlerMixin):
return Response(serializer.data)
@view_auth_classes(is_authenticated=True)
class VerticalContainerView(APIView, ContainerHandlerMixin):
"""
View for container xblock requests to get vertical state and children data.
def vertical_container_children_redirect_view(request: Request, usage_key_string: str):
"""
Redirects GET requests to container_children url.
@apidocs.schema(
parameters=[
apidocs.string_parameter(
"usage_key_string",
apidocs.ParameterLocation.PATH,
description="Vertical usage key",
),
],
responses={
200: VerticalContainerSerializer,
401: "The requester is not authenticated.",
404: "The requested locator does not exist.",
},
This view will return a 301 Moved Permanently response to the provided
usage_key string and automatically redirect the browser to the correct URL.
"""
redirect_location = reverse(
'cms.djangoapps.contentstore:v1:container_children',
kwargs={'usage_key_string': usage_key_string},
)
def get(self, request: Request, usage_key_string: str):
"""
Get an object containing vertical state with children data.
**Example Request**
GET /api/contentstore/v1/container/vertical/{usage_key_string}/children
**Response Values**
If the request is successful, an HTTP 200 "OK" response is returned.
The HTTP 200 response contains a single dict that contains keys that
are the vertical's container children data.
**Example Response**
```json
{
"children": [
{
"name": "Drag and Drop",
"block_id": "block-v1:org+101+101+type@drag-and-drop-v2+block@7599275ace6b46f5a482078a2954ca16",
"block_type": "drag-and-drop-v2",
"user_partition_info": {},
"user_partitions": {}
"upstream_link": null,
"actions": {
"can_copy": true,
"can_duplicate": true,
"can_move": true,
"can_manage_access": true,
"can_delete": true,
"can_manage_tags": true,
},
"has_validation_error": false,
"validation_errors": [],
},
{
"name": "Video",
"block_id": "block-v1:org+101+101+type@video+block@0e3d39b12d7c4345981bda6b3511a9bf",
"block_type": "video",
"user_partition_info": {},
"user_partitions": {}
"upstream_link": {
"upstream_ref": "lb:org:mylib:video:404",
"version_synced": 16
"version_available": null,
"error_message": "Linked library item not found: lb:org:mylib:video:404",
"ready_to_sync": false,
},
"actions": {
"can_copy": true,
"can_duplicate": true,
"can_move": true,
"can_manage_access": true,
"can_delete": true,
"can_manage_tags": true,
}
"validation_messages": [],
"render_error": "",
},
{
"name": "Text",
"block_id": "block-v1:org+101+101+type@html+block@3e3fa1f88adb4a108cd14e9002143690",
"block_type": "html",
"user_partition_info": {},
"user_partitions": {},
"upstream_link": {
"upstream_ref": "lb:org:mylib:html:abcd",
"version_synced": 43,
"version_available": 49,
"error_message": null,
"ready_to_sync": true,
},
"actions": {
"can_copy": true,
"can_duplicate": true,
"can_move": true,
"can_manage_access": true,
"can_delete": true,
"can_manage_tags": true,
},
"validation_messages": [
{
"text": "This component's access settings contradict its parent's access settings.",
"type": "error"
}
],
"render_error": "Unterminated control keyword: 'if' in file '../problem.html'",
},
],
"is_published": false,
"can_paste_component": true,
}
```
"""
usage_key = self.get_object(usage_key_string)
current_xblock = get_xblock(usage_key, request.user)
is_course = current_xblock.scope_ids.usage_id.context_key.is_course
with modulestore().bulk_operations(usage_key.course_key):
# load course once to reuse it for user_partitions query
course = modulestore().get_course(current_xblock.location.course_key)
children = []
if hasattr(current_xblock, "children"):
for child in current_xblock.children:
child_info = modulestore().get_item(child)
user_partition_info = get_visibility_partition_info(child_info, course=course)
user_partitions = get_user_partition_info(child_info, course=course)
upstream_link = UpstreamLink.try_get_for_block(child_info, log_error=False)
validation_messages = get_xblock_validation_messages(child_info)
render_error = get_xblock_render_error(request, child_info)
children.append({
"xblock": child_info,
"name": child_info.display_name_with_default,
"block_id": child_info.location,
"block_type": child_info.location.block_type,
"user_partition_info": user_partition_info,
"user_partitions": user_partitions,
"upstream_link": (
# If the block isn't linked to an upstream (which is by far the most common case) then just
# make this field null, which communicates the same info, but with less noise.
upstream_link.to_json() if upstream_link.upstream_ref
else None
),
"validation_messages": validation_messages,
"render_error": render_error,
})
is_published = False
try:
is_published = not modulestore().has_changes(current_xblock)
except ItemNotFoundError:
logging.error('Could not find any changes for block [%s]', usage_key)
container_data = {
"children": children,
"is_published": is_published,
"can_paste_component": is_course,
}
serializer = VerticalContainerSerializer(container_data)
return Response(serializer.data)
http_response = HttpResponsePermanentRedirect(redirect_location)
return http_response

View File

@@ -56,7 +56,7 @@ from cms.djangoapps.contentstore.storage import course_import_export_storage
from cms.djangoapps.contentstore.toggles import enable_course_optimizer_check_prev_run_links
from cms.djangoapps.contentstore.utils import (
IMPORTABLE_FILE_TYPES,
contains_previous_course_reference,
contains_course_reference,
create_course_info_usage_key,
create_or_update_xblock_upstream_link,
delete_course,
@@ -1190,7 +1190,7 @@ def _check_broken_links(task_instance, user_id, course_key_string, language):
# Separate previous run links from regular links BEFORE validation
urls_to_validate = []
for block_id, url in url_list:
if contains_previous_course_reference(url, previous_run_course_key):
if contains_course_reference(url, previous_run_course_key):
previous_run_links.append([block_id, url, LinkState.PREVIOUS_RUN])
else:
urls_to_validate.append([block_id, url])
@@ -1917,28 +1917,45 @@ def _course_link_update_required(url, course_key, prev_run_course_key):
Args:
url: The URL to check
course_key: The current course key
prev_run_course_key: The previous course run key
Returns:
bool: True if the link needs updating
"""
if not url or not course_key:
if not all((url, course_key, prev_run_course_key)):
return False
course_id_match = contains_previous_course_reference(url, prev_run_course_key)
if not course_id_match:
return False
# Check if it's the same org and course but different run
if (
prev_run_course_key.org == course_key.org
and prev_run_course_key.course == course_key.course
and prev_run_course_key.run != course_key.run
):
course_id_match = contains_course_reference(url, prev_run_course_key)
if course_id_match:
return True
return False
def _replace_exact_course_reference(url, old_course_key, new_course_key):
"""
Replaces exact course key references in a URL, avoiding partial matches.
Args:
url: The URL to update
old_course_key: The course key to replace
new_course_key: The course key to replace with
Returns:
str: Updated URL with exact course key replacements
"""
if not old_course_key or not new_course_key or not url:
return url
old_course_pattern = re.escape(str(old_course_key))
# Ensure the course key is followed by '/' or end of string
pattern = old_course_pattern + r'(?=/|$)'
return re.sub(pattern, str(new_course_key), url, flags=re.IGNORECASE)
def _determine_link_type(block_id):
"""
Determines the type of link based on block_id and URL.
@@ -1987,22 +2004,13 @@ def _update_link_to_latest_rerun(link_data, course_key, prev_run_course_key, use
if not original_url:
return original_url
prev_run_course_org = prev_run_course_key.org if prev_run_course_key else None
prev_run_course_course = (
prev_run_course_key.course if prev_run_course_key else None
)
if prev_run_course_key == course_key:
return original_url
# Validate url based on previous-run org
if (
prev_run_course_org != course_key.org
or prev_run_course_course != course_key.course
):
return original_url
new_url = _replace_exact_course_reference(original_url, prev_run_course_key, course_key)
new_url = original_url.replace(str(prev_run_course_key), str(course_key))
if new_url == original_url:
return original_url
# condition because we're showing handouts as updates
if link_type == "course_updates" and "handouts" in str(block_id):

View File

@@ -2477,18 +2477,24 @@ def get_previous_run_course_key(course_key):
return rerun_state.source_course_key
def contains_previous_course_reference(url, previous_course_key):
def contains_course_reference(url, course_key):
"""
Checks if a URL contains references to the previous course.
Checks if a URL contains an exact reference to the specified course key.
Uses specific delimiter matching to ensure exact matching and avoid partial matches.
Arguments:
Args:
url: The URL to check
previous_course_key: The previous course key to look for
course_key: The course key to look for
Returns:
bool: True if URL contains reference to previous course
bool: True if URL contains exact reference to the course
"""
if not previous_course_key:
if not course_key or not url:
return False
return str(previous_course_key).lower() in url.lower()
course_key_pattern = re.escape(str(course_key))
# Ensure the course key is followed by '/' or end of string
pattern = course_key_pattern + r'(?=/|$)'
return bool(re.search(pattern, url, re.IGNORECASE))

View File

@@ -66,43 +66,19 @@ from openedx.core.djangoapps.theming.helpers_dirs import (
from openedx.core.lib.license import LicenseMixin
from openedx.core.lib.derived import Derived
from openedx.core.release import doc_version
from openedx.core.lib.features_setting_proxy import FeaturesProxy
# A proxy for feature flags stored in the settings namespace
FEATURES = FeaturesProxy(globals())
# pylint: enable=useless-suppression
################ Enable credit eligibility feature ####################
ENABLE_CREDIT_ELIGIBILITY = True
################################ Block Structures ###################################
BLOCK_STRUCTURES_SETTINGS = dict(
# Delay, in seconds, after a new edit of a course is published
# before updating the block structures cache. This is needed
# for a better chance at getting the latest changes when there
# are secondary reads in sharded mongoDB clusters. See TNL-5041
# for more info.
COURSE_PUBLISH_TASK_DELAY=30,
# Delay, in seconds, between retry attempts if a task fails.
TASK_DEFAULT_RETRY_DELAY=30,
# Maximum number of retries per task.
TASK_MAX_RETRIES=5,
)
############################ FEATURE CONFIGURATION #############################
PLATFORM_NAME = _('Your Platform Name Here')
CONTACT_MAILING_ADDRESS = _('Your Contact Mailing Address Here')
PLATFORM_DESCRIPTION = _('Your Platform Description Here')
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
# Dummy secret key for dev/test
SECRET_KEY = 'dev key'
FAVICON_PATH = 'images/favicon.ico'
# .. setting_name: STUDIO_NAME
# .. setting_default: Your Platform Studio
@@ -110,387 +86,180 @@ FAVICON_PATH = 'images/favicon.ico'
# templates.
STUDIO_NAME = _("Your Platform Studio")
STUDIO_SHORT_NAME = _("Studio")
FEATURES = {
'GITHUB_PUSH': False,
# See annotations in lms/envs/common.py for details.
'ENABLE_DISCUSSION_SERVICE': True,
# See annotations in lms/envs/common.py for details.
'ENABLE_TEXTBOOK': True,
# FEATURES
# When True, all courses will be active, regardless of start date
# DO NOT SET TO True IN THIS FILE
# Doing so will cause all courses to be released on production
'DISABLE_START_DATES': False,
GITHUB_PUSH = False
# email address for studio staff (eg to request course creation)
'STUDIO_REQUEST_EMAIL': '',
# email address for studio staff (eg to request course creation)
STUDIO_REQUEST_EMAIL = ''
# Segment - must explicitly turn it on for production
'CMS_SEGMENT_KEY': None,
# Segment - must explicitly turn it on for production
CMS_SEGMENT_KEY = None
# Enable URL that shows information about the status of various services
'ENABLE_SERVICE_STATUS': False,
# If set to True, new Studio users won't be able to author courses unless
# an Open edX admin has added them to the course creator group.
ENABLE_CREATOR_GROUP = True
# Don't autoplay videos for course authors
'AUTOPLAY_VIDEOS': False,
# If set to True, organization staff members can create libraries for their specific
# organization and no other organizations. They do not need to be course creators,
# even when ENABLE_CREATOR_GROUP is True.
ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES = True
# Move the course author to next page when a video finishes. Set to True to
# show an auto-advance button in videos. If False, videos never auto-advance.
'ENABLE_AUTOADVANCE_VIDEOS': False,
# Turn off account locking if failed login attempts exceeds a limit
ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = False
# If set to True, new Studio users won't be able to author courses unless
# an Open edX admin has added them to the course creator group.
'ENABLE_CREATOR_GROUP': True,
# .. toggle_name: settings.EDITABLE_SHORT_DESCRIPTION
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: This feature flag allows editing of short descriptions on the Schedule & Details page in
# Open edX Studio. Set to False if you want to disable the editing of the course short description.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-02-13
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2334
EDITABLE_SHORT_DESCRIPTION = True
# If set to True, organization staff members can create libraries for their specific
# organization and no other organizations. They do not need to be course creators,
# even when ENABLE_CREATOR_GROUP is True.
'ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES': True,
# Hide any Personally Identifiable Information from application logs
SQUELCH_PII_IN_LOGS = False
# Turn off account locking if failed login attempts exceeds a limit
'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': False,
# Allow creating courses with non-ascii characters in the course id
ALLOW_UNICODE_COURSE_ID = False
# .. toggle_name: FEATURES['EDITABLE_SHORT_DESCRIPTION']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: This feature flag allows editing of short descriptions on the Schedule & Details page in
# Open edX Studio. Set to False if you want to disable the editing of the course short description.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-02-13
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2334
'EDITABLE_SHORT_DESCRIPTION': True,
# Prevent concurrent logins per user
PREVENT_CONCURRENT_LOGINS = False
# Hide any Personally Identifiable Information from application logs
'SQUELCH_PII_IN_LOGS': False,
# Turn off Video Upload Pipeline through Studio, by default
ENABLE_VIDEO_UPLOAD_PIPELINE = False
# Toggles the embargo functionality, which blocks users
# based on their location.
'EMBARGO': False,
# Show a new field in "Advanced settings" that can store custom data about a
# course and that can be read from themes
ENABLE_OTHER_COURSE_SETTINGS = False
# Allow creating courses with non-ascii characters in the course id
'ALLOW_UNICODE_COURSE_ID': False,
# Enable support for content libraries. Note that content libraries are
# only supported in courses using split mongo.
ENABLE_CONTENT_LIBRARIES = True
# Prevent concurrent logins per user
'PREVENT_CONCURRENT_LOGINS': False,
# .. toggle_name: settings.ENABLE_CONTENT_LIBRARIES_LTI_TOOL
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True, Content Libraries in
# Studio can be used as an LTI 1.3 tool by external LTI platforms.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-08-17
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/27411
ENABLE_CONTENT_LIBRARIES_LTI_TOOL = False
# Turn off Video Upload Pipeline through Studio, by default
'ENABLE_VIDEO_UPLOAD_PIPELINE': False,
# Toggle course entrance exams feature
ENTRANCE_EXAMS = False
# See annotations in lms/envs/common.py for details.
'ENABLE_EDXNOTES': False,
# Enable the courseware search functionality
ENABLE_COURSEWARE_INDEX = False
# Toggle to enable coordination with the Publisher tool (keep in sync with lms/envs/common.py)
'ENABLE_PUBLISHER': False,
# Enable content libraries (modulestore) search functionality
ENABLE_LIBRARY_INDEX = False
# Show a new field in "Advanced settings" that can store custom data about a
# course and that can be read from themes
'ENABLE_OTHER_COURSE_SETTINGS': False,
# .. toggle_name: settings.ALLOW_COURSE_RERUNS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: This will allow staff member to re-run the course from the studio home page and will
# always use the split modulestore. When this is set to False, the Re-run Course link will not be available on
# the studio home page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-02-13
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6965
ALLOW_COURSE_RERUNS = True
# Write new CSM history to the extended table.
# This will eventually default to True and may be
# removed since all installs should have the separate
# extended history table. This is needed in the LMS and CMS
# for migration consistency.
'ENABLE_CSMH_EXTENDED': True,
# Whether archived courses (courses with end dates in the past) should be
# shown in Studio in a separate list.
ENABLE_SEPARATE_ARCHIVED_COURSES = True
# Enable support for content libraries. Note that content libraries are
# only supported in courses using split mongo.
'ENABLE_CONTENT_LIBRARIES': True,
ENABLE_GRADE_DOWNLOADS = True
# .. toggle_name: FEATURES['ENABLE_CONTENT_LIBRARIES_LTI_TOOL']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True, Content Libraries in
# Studio can be used as an LTI 1.3 tool by external LTI platforms.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-08-17
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/27411
'ENABLE_CONTENT_LIBRARIES_LTI_TOOL': False,
ENABLE_DISCUSSION_HOME_PANEL = True
# Milestones application flag
'MILESTONES_APP': False,
ENABLE_COUNTRY_ACCESS = False
ENABLE_CREDIT_API = False
# Prerequisite courses feature flag
'ENABLE_PREREQUISITE_COURSES': False,
### ORA Feature Flags ###
# Toggle course entrance exams feature
'ENTRANCE_EXAMS': False,
# .. toggle_name: settings.DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Warn about removing support for deprecated course keys.
# To enable, set to True.
# To disable, set to False.
# To enable with a custom support deadline, set to an ISO-8601 date string:
# eg: '2020-09-01'
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-06-12
# .. toggle_target_removal_date: 2021-04-01
# .. toggle_warning: This can be removed once support is removed for deprecated
# course keys.
# .. toggle_tickets: https://openedx.atlassian.net/browse/DEPR-58
DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO = True
# Toggle platform-wide course licensing
'LICENSING': False,
# .. toggle_name: settings.DISABLE_COURSE_CREATION
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If set to True, it disables the course creation functionality and hides the "New Course"
# button in studio.
# It is important to note that the value of this flag only affects if the user doesn't have a staff role,
# otherwise the course creation functionality will work as it should.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-12-02
# .. toggle_warning: Another toggle DISABLE_LIBRARY_CREATION overrides DISABLE_COURSE_CREATION, if present.
DISABLE_COURSE_CREATION = False
# Enable the courseware search functionality
'ENABLE_COURSEWARE_INDEX': False,
# .. toggle_name: settings.ENABLE_LTI_PII_ACKNOWLEDGEMENT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables the lti pii acknowledgement feature for a course
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-10
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://2u-internal.atlassian.net/browse/MST-2055'
ENABLE_LTI_PII_ACKNOWLEDGEMENT = False
# Enable content libraries (modulestore) search functionality
'ENABLE_LIBRARY_INDEX': False,
# .. toggle_name: settings.DISABLE_ADVANCED_SETTINGS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to `True` to disable the advanced settings page in Studio for all users except those
# having `is_superuser` or `is_staff` set to `True`.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-03-31
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/32015
DISABLE_ADVANCED_SETTINGS = False
# .. toggle_name: FEATURES['ALLOW_COURSE_RERUNS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: This will allow staff member to re-run the course from the studio home page and will
# always use the split modulestore. When this is set to False, the Re-run Course link will not be available on
# the studio home page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-02-13
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6965
'ALLOW_COURSE_RERUNS': True,
# .. toggle_name: settings.ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables sending xblock lifecycle events over the event bus. Used to create the
# EVENT_BUS_PRODUCER_CONFIG setting
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2023-10-10
# .. toggle_target_removal_date: 2023-10-12
# .. toggle_warning: The default may be changed in a later release. See
# https://github.com/openedx/openedx-events/issues/265
# .. toggle_tickets: https://github.com/edx/edx-arch-experiments/issues/381
ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS = False
# Certificates Web/HTML Views
'CERTIFICATES_HTML_VIEW': False,
# .. toggle_name: settings.ENABLE_HIDE_FROM_TOC_UI
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, exposes hide_from_toc xblock attribute so course authors can configure it as
# a section visibility option in Studio.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-02-29
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33952
ENABLE_HIDE_FROM_TOC_UI = False
# Teams feature
'ENABLE_TEAMS': True,
# Show video bumper in Studio
'ENABLE_VIDEO_BUMPER': False,
# How many seconds to show the bumper again, default is 7 days:
'SHOW_BUMPER_PERIODICITY': 7 * 24 * 3600,
# Enable credit eligibility feature
'ENABLE_CREDIT_ELIGIBILITY': ENABLE_CREDIT_ELIGIBILITY,
# Special Exams, aka Timed and Proctored Exams
'ENABLE_SPECIAL_EXAMS': False,
# Show the language selector in the header
'SHOW_HEADER_LANGUAGE_SELECTOR': False,
# At edX it's safe to assume that English transcripts are always available
# This is not the case for all installations.
# The default value in {lms,cms}/envs/common.py and xmodule/tests/test_video.py should be consistent.
'FALLBACK_TO_ENGLISH_TRANSCRIPTS': True,
# Set this to False to facilitate cleaning up invalid xml from your modulestore.
'ENABLE_XBLOCK_XML_VALIDATION': True,
# Allow public account creation
'ALLOW_PUBLIC_ACCOUNT_CREATION': True,
# Allow showing the registration links
'SHOW_REGISTRATION_LINKS': True,
# Whether or not the dynamic EnrollmentTrackUserPartition should be registered.
'ENABLE_ENROLLMENT_TRACK_USER_PARTITION': True,
'ENABLE_PASSWORD_RESET_FAILURE_EMAIL': False,
# Whether archived courses (courses with end dates in the past) should be
# shown in Studio in a separate list.
'ENABLE_SEPARATE_ARCHIVED_COURSES': True,
# For acceptance and load testing
'AUTOMATIC_AUTH_FOR_TESTING': False,
# Prevent auto auth from creating superusers or modifying existing users
'RESTRICT_AUTOMATIC_AUTH': True,
'ENABLE_GRADE_DOWNLOADS': True,
'ENABLE_MKTG_SITE': False,
'ENABLE_DISCUSSION_HOME_PANEL': True,
'ENABLE_CORS_HEADERS': False,
'ENABLE_CROSS_DOMAIN_CSRF_COOKIE': False,
'ENABLE_COUNTRY_ACCESS': False,
'ENABLE_CREDIT_API': False,
'ENABLE_OAUTH2_PROVIDER': False,
'ENABLE_MOBILE_REST_API': False,
'CUSTOM_COURSES_EDX': False,
'ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES': True,
'SHOW_FOOTER_LANGUAGE_SELECTOR': False,
'ENABLE_ENROLLMENT_RESET': False,
# Settings for course import olx validation
'ENABLE_COURSE_OLX_VALIDATION': False,
# .. toggle_name: FEATURES['DISABLE_MOBILE_COURSE_AVAILABLE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to remove Mobile Course Available UI Flag from Studio's Advanced Settings
# page else Mobile Course Available UI Flag will be available on Studio side.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-02-14
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/23073
'DISABLE_MOBILE_COURSE_AVAILABLE': False,
# .. toggle_name: FEATURES['ENABLE_CHANGE_USER_PASSWORD_ADMIN']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable changing a user password through django admin. This is disabled by
# default because enabling allows a method to bypass password policy.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-02-21
# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/21616'
'ENABLE_CHANGE_USER_PASSWORD_ADMIN': False,
### ORA Feature Flags ###
# .. toggle_name: FEATURES['ENABLE_ORA_ALL_FILE_URLS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not
# discoverable. If enabled, will iterate through all possible file key suffixes up to the max for displaying file
# metadata in staff assessments.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
'ENABLE_ORA_ALL_FILE_URLS': False,
# .. toggle_name: FEATURES['ENABLE_ORA_USER_STATE_UPLOAD_DATA']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not
# discoverable. If enabled, will pull file metadata from StudentModule.state for display in staff assessments.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
'ENABLE_ORA_USER_STATE_UPLOAD_DATA': False,
# .. toggle_name: FEATURES['DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Warn about removing support for deprecated course keys.
# To enable, set to True.
# To disable, set to False.
# To enable with a custom support deadline, set to an ISO-8601 date string:
# eg: '2020-09-01'
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-06-12
# .. toggle_target_removal_date: 2021-04-01
# .. toggle_warning: This can be removed once support is removed for deprecated
# course keys.
# .. toggle_tickets: https://openedx.atlassian.net/browse/DEPR-58
'DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO': True,
# .. toggle_name: FEATURES['DISABLE_COURSE_CREATION']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If set to True, it disables the course creation functionality and hides the "New Course"
# button in studio.
# It is important to note that the value of this flag only affects if the user doesn't have a staff role,
# otherwise the course creation functionality will work as it should.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-12-02
# .. toggle_warning: Another toggle DISABLE_LIBRARY_CREATION overrides DISABLE_COURSE_CREATION, if present.
'DISABLE_COURSE_CREATION': False,
# Can be turned off to disable the help link in the navbar
# .. toggle_name: FEATURES['ENABLE_HELP_LINK']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When True, a help link is displayed on the main navbar. Set False to hide it.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-03-05
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/26106
'ENABLE_HELP_LINK': True,
# .. toggle_name: FEATURES['ENABLE_INTEGRITY_SIGNATURE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether to replace ID verification course/certificate requirement
# with an in-course Honor Code agreement
# (https://github.com/edx/edx-name-affirmation)
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-02-15
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1348'
'ENABLE_INTEGRITY_SIGNATURE': False,
# .. toggle_name: FEATURES['ENABLE_LTI_PII_ACKNOWLEDGEMENT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables the lti pii acknowledgement feature for a course
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-10
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://2u-internal.atlassian.net/browse/MST-2055'
'ENABLE_LTI_PII_ACKNOWLEDGEMENT': False,
# .. toggle_name: MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If enabled, the Library Content Block is marked as complete when users view it.
# Otherwise (by default), all children of this block must be completed.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-03-22
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/28268
# .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name
# in the LMS and CMS.
'MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW': False,
# .. toggle_name: FEATURES['DISABLE_UNENROLLMENT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to disable self-unenrollments via REST API.
# This also hides the "Unenroll" button on the Learner Dashboard.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-10-11
# .. toggle_warning: For consistency in user experience, keep the value in sync with the setting of the same name
# in the LMS and CMS.
# .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429'
'DISABLE_UNENROLLMENT': False,
# .. toggle_name: FEATURES['DISABLE_ADVANCED_SETTINGS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to `True` to disable the advanced settings page in Studio for all users except those
# having `is_superuser` or `is_staff` set to `True`.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-03-31
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/32015
'DISABLE_ADVANCED_SETTINGS': False,
# .. toggle_name: FEATURES['ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables sending xblock lifecycle events over the event bus. Used to create the
# EVENT_BUS_PRODUCER_CONFIG setting
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2023-10-10
# .. toggle_target_removal_date: 2023-10-12
# .. toggle_warning: The default may be changed in a later release. See
# https://github.com/openedx/openedx-events/issues/265
# .. toggle_tickets: https://github.com/edx/edx-arch-experiments/issues/381
'ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS': False,
# .. toggle_name: FEATURES['ENABLE_HIDE_FROM_TOC_UI']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, exposes hide_from_toc xblock attribute so course authors can configure it as
# a section visibility option in Studio.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-02-29
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33952
'ENABLE_HIDE_FROM_TOC_UI': False,
# .. toggle_name: FEATURES['ENABLE_GRADING_METHOD_IN_PROBLEMS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables the grading method feature in capa problems.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-03-22
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33911
'ENABLE_GRADING_METHOD_IN_PROBLEMS': False,
# .. toggle_name: FEATURES['BADGES_ENABLED']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable the Badges feature.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-04-10
'BADGES_ENABLED': False,
# .. toggle_name: FEATURES['IN_CONTEXT_DISCUSSION_ENABLED_DEFAULT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Set to False to disable in-context discussion for units by default.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-09-02
'IN_CONTEXT_DISCUSSION_ENABLED_DEFAULT': True,
}
# .. toggle_name: settings.IN_CONTEXT_DISCUSSION_ENABLED_DEFAULT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Set to False to disable in-context discussion for units by default.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-09-02
IN_CONTEXT_DISCUSSION_ENABLED_DEFAULT = True
# .. toggle_name: ENABLE_COPPA_COMPLIANCE
# .. toggle_implementation: DjangoSetting
@@ -508,22 +277,6 @@ MARKETING_EMAILS_OPT_IN = False
############################# MICROFRONTENDS ###################################
COURSE_AUTHORING_MICROFRONTEND_URL = None
DISCUSSIONS_MICROFRONTEND_URL = None
DISCUSSIONS_MFE_FEEDBACK_URL = None
ACCOUNT_MICROFRONTEND_URL = None
LEARNING_MICROFRONTEND_URL = None
# .. toggle_name: ENABLE_DYNAMIC_REGISTRATION_FIELDS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this toggle adds fields configured in
# REGISTRATION_EXTRA_FIELDS to Authn MFE
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2022-04-21
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-838
ENABLE_DYNAMIC_REGISTRATION_FIELDS = False
############################# SOCIAL MEDIA SHARING #############################
SOCIAL_SHARING_SETTINGS = {
@@ -553,19 +306,9 @@ GEOIP_PATH = REPO_ROOT / "common/static/data/geoip/GeoLite2-Country.mmdb"
DATA_DIR = COURSES_ROOT
DJFS = {
'type': 'osfs',
'directory_root': '/edx/var/edxapp/django-pyfs/static/django-pyfs',
'url_root': '/static/django-pyfs',
}
######################## BRANCH.IO ###########################
BRANCH_IO_KEY = ''
######################## OPTIMIZELY ###########################
OPTIMIZELY_PROJECT_ID = None
OPTIMIZELY_FULLSTACK_SDK_KEY = None
######################## GOOGLE ANALYTICS ###########################
GOOGLE_ANALYTICS_ACCOUNT = None
@@ -647,14 +390,10 @@ TEMPLATES = [
DEFAULT_TEMPLATE_ENGINE = TEMPLATES[0]
#################################### AWS #######################################
AWS_ACCESS_KEY_ID = None
AWS_SECRET_ACCESS_KEY = None
AWS_SECURITY_TOKEN = None
##############################################################################
EDX_ROOT_URL = ''
# use the ratelimit backend to prevent brute force attacks
AUTHENTICATION_BACKENDS = [
'auth_backends.backends.EdXOAuth2',
@@ -664,12 +403,6 @@ AUTHENTICATION_BACKENDS = [
'bridgekeeper.backends.RulePermissionBackend',
]
# License for serving content in China
ICP_LICENSE = None
ICP_LICENSE_INFO = {}
LOGGING_ENV = 'sandbox'
LMS_BASE = None
# Use LMS SSO for login, once enabled by setting LOGIN_URL (see docs/guides/studio_oauth.rst)
@@ -684,52 +417,17 @@ FRONTEND_REGISTER_URL = Derived(lambda settings: settings.LMS_ROOT_URL + '/regis
ENTERPRISE_API_URL = Derived(lambda settings: settings.LMS_INTERNAL_ROOT_URL + '/enterprise/api/v1/')
ENTERPRISE_CONSENT_API_URL = Derived(lambda settings: settings.LMS_INTERNAL_ROOT_URL + '/consent/api/v1/')
ENTERPRISE_MARKETING_FOOTER_QUERY_PARAMS = {}
# Public domain name of Studio (should be resolvable from the end-user's browser)
CMS_BASE = None
CMS_ROOT_URL = None
LOG_DIR = '/edx/var/log/edx'
LOCAL_LOGLEVEL = "INFO"
MAINTENANCE_BANNER_TEXT = 'Sample banner message'
WIKI_ENABLED = True
CERT_QUEUE = 'certificates'
ELASTIC_SEARCH_CONFIG = [
{
'use_ssl': False,
'host': 'localhost',
'port': 9200
}
]
######################### CSRF #########################################
# Forwards-compatibility with Django 1.7
CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52
# It is highly recommended that you override this in any environment accessed by
# end users
CSRF_COOKIE_SECURE = False
CROSS_DOMAIN_CSRF_COOKIE_DOMAIN = ''
CROSS_DOMAIN_CSRF_COOKIE_NAME = ''
#################### CAPA External Code Evaluation #############################
XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
XQUEUE_INTERFACE = {
'url': 'http://localhost:18040',
'basic_auth': ['edx', 'edx'],
'django_auth': {
'username': 'lms',
'password': 'password'
}
}
################################# Middleware ###################################
MIDDLEWARE = [
@@ -818,12 +516,6 @@ MIDDLEWARE = [
EXTRA_MIDDLEWARE_CLASSES = []
# Clickjacking protection can be disabled by setting this to 'ALLOW'
X_FRAME_OPTIONS = 'DENY'
# Platform for Privacy Preferences header
P3P_HEADER = 'CP="Open EdX does not have a P3P policy."'
############# XBlock Configuration ##########
# Import after sys.path fixup
@@ -848,30 +540,11 @@ XBLOCK_MIXINS = (
AuthoringMixin,
)
# .. setting_name: XBLOCK_EXTRA_MIXINS
# .. setting_default: ()
# .. setting_description: Custom mixins that will be dynamically added to every XBlock and XBlockAside instance.
# These can be classes or dotted-path references to classes.
# For example: `XBLOCK_EXTRA_MIXINS = ('my_custom_package.my_module.MyCustomMixin',)`
XBLOCK_EXTRA_MIXINS = ()
# Paths to wrapper methods which should be applied to every XBlock's FieldData.
XBLOCK_FIELD_DATA_WRAPPERS = ()
# .. setting_name: XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE
# .. setting_default: default
# .. setting_description: The django cache key of the cache to use for storing anonymous user state for XBlocks.
XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE = 'default'
############################ ORA 2 ############################################
# By default, don't use a file prefix
ORA2_FILE_PREFIX = 'default_env-default_deployment/ora2'
# Default File Upload Storage bucket and prefix. Used by the FileUpload Service.
FILE_UPLOAD_STORAGE_BUCKET_NAME = 'SET-ME-PLEASE (ex. bucket-name)'
FILE_UPLOAD_STORAGE_PREFIX = 'submissions_attachments'
############################ Modulestore Configuration ################################
DOC_STORE_CONFIG = {
@@ -949,43 +622,6 @@ MODULESTORE = {
# require student context.
MODULESTORE_FIELD_OVERRIDE_PROVIDERS = ()
DATABASES = {
# edxapp's edxapp-migrate scripts and the edxapp_migrate play
# will ensure that any DB not named read_replica will be migrated
# for both the lms and cms.
'default': {
'ATOMIC_REQUESTS': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
},
'read_replica': {
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
},
'student_module_history': {
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp_csmh',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
}
}
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
DEFAULT_HASHING_ALGORITHM = 'sha256'
@@ -1017,49 +653,8 @@ CODE_JAIL = {
"limit_overrides": {},
}
# Some courses are allowed to run unsafe code. This is a list of regexes, one
# of them must match the course id for that course to run unsafe code.
#
# For example:
#
# COURSES_WITH_UNSAFE_CODE = [
# r"Harvard/XY123.1/.*"
# ]
COURSES_WITH_UNSAFE_CODE = []
# Cojail REST service
ENABLE_CODEJAIL_REST_SERVICE = False
# .. setting_name: CODE_JAIL_REST_SERVICE_REMOTE_EXEC
# .. setting_default: 'xmodule.capa.safe_exec.remote_exec.send_safe_exec_request_v0'
# .. setting_description: Set the python package.module.function that is reponsible of
# calling the remote service in charge of jailed code execution
CODE_JAIL_REST_SERVICE_REMOTE_EXEC = 'xmodule.capa.safe_exec.remote_exec.send_safe_exec_request_v0'
# .. setting_name: CODE_JAIL_REST_SERVICE_HOST
# .. setting_default: 'http://127.0.0.1:8550'
# .. setting_description: Set the codejail remote service host
CODE_JAIL_REST_SERVICE_HOST = 'http://127.0.0.1:8550'
# .. setting_name: CODE_JAIL_REST_SERVICE_CONNECT_TIMEOUT
# .. setting_default: 0.5
# .. setting_description: Set the number of seconds CMS will wait to establish an internal
# connection to the codejail remote service.
CODE_JAIL_REST_SERVICE_CONNECT_TIMEOUT = 0.5 # time in seconds
# .. setting_name: CODE_JAIL_REST_SERVICE_READ_TIMEOUT
# .. setting_default: 3.5
# .. setting_description: Set the number of seconds CMS will wait for a response from the
# codejail remote service endpoint.
CODE_JAIL_REST_SERVICE_READ_TIMEOUT = 3.5 # time in seconds
############################ DJANGO_BUILTINS ################################
# Change DEBUG in your environment settings files, not here
SESSION_COOKIE_SECURE = False
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'openedx.core.lib.session_serializers.PickleSerializer'
SESSION_COOKIE_NAME = 'sessionid'
# Site info
SITE_NAME = "localhost"
HTTPS = 'on'
ROOT_URLCONF = 'cms.urls'
COURSE_IMPORT_EXPORT_BUCKET = ''
@@ -1067,12 +662,10 @@ COURSE_METADATA_EXPORT_BUCKET = ''
ALTERNATE_WORKER_QUEUES = 'lms'
X_FRAME_OPTIONS = 'DENY'
# .. setting_name: GIT_REPO_EXPORT_DIR
# .. setting_default: '/edx/var/edxapp/export_course_repos'
# .. setting_description: When courses are exported to git, either with the export_git management command or the git
# export view from the studio (when FEATURES['ENABLE_EXPORT_GIT'] is True), they are stored in this directory, which
# export view from the studio (when settings.ENABLE_EXPORT_GIT is True), they are stored in this directory, which
# must exist at the time of the export.
GIT_REPO_EXPORT_DIR = '/edx/var/edxapp/export_course_repos'
# .. setting_name: GIT_EXPORT_DEFAULT_IDENT
@@ -1094,11 +687,6 @@ BUGS_EMAIL = 'bugs@example.com'
SERVER_EMAIL = 'devops@example.com'
UNIVERSITY_EMAIL = 'university@example.com'
PRESS_EMAIL = 'press@example.com'
ADMINS = []
MANAGERS = ADMINS
# Initialize to 'release', but read from JSON in production.py
EDX_PLATFORM_REVISION = 'release'
# Static content
STATIC_URL = '/static/studio/'
@@ -1113,32 +701,10 @@ STATICFILES_DIRS = [
XMODULE_ROOT / "static",
]
# Locale/Internationalization
CELERY_TIMEZONE = 'UTC'
TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
# Languages supported for custom course certificate templates
CERTIFICATE_TEMPLATE_LANGUAGES = {
'en': 'English',
'es': 'Español',
}
USE_I18N = True
USE_L10N = True
STATICI18N_FILENAME_FUNCTION = 'statici18n.utils.legacy_filename'
STATICI18N_ROOT = PROJECT_ROOT / "static"
# Messages
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
COURSE_IMPORT_EXPORT_STORAGE = 'django.core.files.storage.FileSystemStorage'
COURSE_METADATA_EXPORT_STORAGE = 'django.core.files.storage.FileSystemStorage'
##### EMBARGO #####
EMBARGO_SITE_REDIRECT_URL = None
STATICI18N_ROOT = PROJECT_ROOT / "static"
##### custom vendor plugin variables #####
@@ -1293,10 +859,6 @@ STATICFILES_IGNORE_PATTERNS = (
################################# DJANGO-REQUIRE ###############################
# The baseUrl to pass to the r.js optimizer, relative to STATIC_ROOT.
REQUIRE_BASE_URL = "./"
# The name of a build profile to use for your project, relative to REQUIRE_BASE_URL.
# A sensible value would be 'app.build.js'. Leave blank to use the built-in default build profile.
# Set to False to disable running the default profile (e.g. if only using it to build Standalone
@@ -1306,9 +868,6 @@ REQUIRE_BUILD_PROFILE = "cms/js/build.js"
# The name of the require.js script used by your project, relative to REQUIRE_BASE_URL.
REQUIRE_JS = "js/vendor/requiresjs/require.js"
# Whether to run django-require in debug mode.
REQUIRE_DEBUG = False
########################## DJANGO WEBPACK LOADER ##############################
WEBPACK_LOADER = {
@@ -1322,7 +881,6 @@ WEBPACK_LOADER = {
}
}
############################ SERVICE_VARIANT ##################################
# SERVICE_VARIANT specifies name of the variant used, which decides what JSON
@@ -1337,30 +895,6 @@ CONFIG_PREFIX = SERVICE_VARIANT + "." if SERVICE_VARIANT else ""
################################# CELERY ######################################
# Message configuration
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_MESSAGE_COMPRESSION = 'gzip'
# Results configuration
CELERY_IGNORE_RESULT = False
CELERY_STORE_ERRORS_EVEN_IF_IGNORED = True
# Events configuration
CELERY_TRACK_STARTED = True
CELERY_SEND_EVENTS = True
CELERY_SEND_TASK_SENT_EVENT = True
# Exchange configuration
CELERY_DEFAULT_EXCHANGE = 'edx.core'
CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
# Name the exchange and queues for each variant
QUEUE_VARIANT = CONFIG_PREFIX.lower()
@@ -1382,10 +916,6 @@ CELERY_QUEUES = {
# Queues configuration
CELERY_QUEUE_HA_POLICY = 'all'
CELERY_CREATE_MISSING_QUEUES = True
CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION = True
BROKER_USE_SSL = Derived(lambda settings: settings.CELERY_BROKER_USE_SSL)
@@ -1398,27 +928,6 @@ HEARTBEAT_CELERY_ROUTING_KEY = HIGH_PRIORITY_QUEUE
############################## Video ##########################################
YOUTUBE = {
# YouTube JavaScript API
'API': 'https://www.youtube.com/iframe_api',
'TEST_TIMEOUT': 1500,
# URL to get YouTube metadata
'METADATA_URL': 'https://www.googleapis.com/youtube/v3/videos',
# Web page mechanism for scraping transcript information from youtube video pages
'TRANSCRIPTS': {
'CAPTION_TRACKS_REGEX': r"captionTracks\"\:\[(?P<caption_tracks>[^\]]+)",
'YOUTUBE_URL_BASE': 'https://www.youtube.com/watch?v=',
'ALLOWED_LANGUAGE_CODES': ["en", "en-US", "en-GB"],
},
'IMAGE_API': 'http://img.youtube.com/vi/{youtube_id}/0.jpg', # /maxresdefault.jpg for 1920*1080
}
YOUTUBE_API_KEY = 'PUT_YOUR_API_KEY_HERE'
# Additional languages that should be supported for video transcripts, not included in ALL_LANGUAGES
EXTENDED_VIDEO_TRANSCRIPT_LANGUAGES = []
@@ -1698,17 +1207,8 @@ INSTALLED_APPS = [
################# EDX MARKETING SITE ##################################
EDXMKTG_LOGGED_IN_COOKIE_NAME = 'edxloggedin'
EDXMKTG_USER_INFO_COOKIE_NAME = 'edx-user-info'
EDXMKTG_USER_INFO_COOKIE_VERSION = 1
MKTG_URL_LINK_MAP = {}
MKTG_URLS = {}
MKTG_URL_OVERRIDES = {}
MKTG_URL_LINK_MAP = {
}
SUPPORT_SITE_LINK = ''
ID_VERIFICATION_SUPPORT_LINK = ''
PASSWORD_RESET_SUPPORT_LINK = ''
ACTIVATION_EMAIL_SUPPORT_LINK = ''
@@ -1716,7 +1216,6 @@ LOGIN_ISSUE_SUPPORT_LINK = ''
############################## EVENT TRACKING #################################
CMS_SEGMENT_KEY = None
TRACK_MAX_EVENT = 50000
TRACKING_BACKENDS = {
@@ -1776,11 +1275,6 @@ EVENT_TRACKING_PROCESSORS = []
EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST = []
#### PASSWORD POLICY SETTINGS #####
PASSWORD_POLICY_COMPLIANCE_ROLLOUT_CONFIG = {
'ENFORCE_COMPLIANCE_ON_LOGIN': False
}
##### ACCOUNT LOCKOUT DEFAULT PARAMETERS #####
MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 6
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 30 * 60
@@ -1835,15 +1329,6 @@ for app_name, insert_before in OPTIONAL_APPS:
except (IndexError, ValueError):
INSTALLED_APPS.append(app_name)
### External auth usage -- prefixes for ENROLLMENT_DOMAIN
SHIBBOLETH_DOMAIN_PREFIX = 'shib:'
# Set request limits for maximum size of a request body and maximum number of GET/POST parameters. (>=Django 1.10)
# Limits are currently disabled - but can be used for finer-grained denial-of-service protection.
DATA_UPLOAD_MAX_MEMORY_SIZE = None
DATA_UPLOAD_MAX_NUMBER_FIELDS = None
### Size of chunks into which asset uploads will be divided
UPLOAD_CHUNK_SIZE_IN_MB = 10
@@ -1854,9 +1339,6 @@ MAX_ASSET_UPLOAD_FILE_SIZE_IN_MB = 20
# a file that exceeds the above size
MAX_ASSET_UPLOAD_FILE_SIZE_URL = ""
### Default value for entrance exam minimum score
ENTRANCE_EXAM_MIN_SCORE_PCT = 50
### Default language for a new course
DEFAULT_COURSE_LANGUAGE = "en"
@@ -1886,12 +1368,6 @@ LIBRARY_BLOCK_TYPES = [
############### Settings for Retirement #####################
# See annotations in lms/envs/common.py for details.
RETIRED_USERNAME_PREFIX = 'retired__user_'
# See annotations in lms/envs/common.py for details.
RETIRED_EMAIL_PREFIX = 'retired__user_'
# See annotations in lms/envs/common.py for details.
RETIRED_EMAIL_DOMAIN = 'retired.invalid'
# See annotations in lms/envs/common.py for details.
RETIRED_USERNAME_FMT = Derived(lambda settings: settings.RETIRED_USERNAME_PREFIX + '{}')
# See annotations in lms/envs/common.py for details.
RETIRED_EMAIL_FMT = Derived(lambda settings: settings.RETIRED_EMAIL_PREFIX + '{}@' + settings.RETIRED_EMAIL_DOMAIN)
@@ -1900,39 +1376,6 @@ RETIRED_USER_SALTS = ['abc', '123']
# See annotations in lms/envs/common.py for details.
RETIREMENT_SERVICE_WORKER_USERNAME = 'RETIREMENT_SERVICE_USER'
# These states are the default, but are designed to be overridden in configuration.
# See annotations in lms/envs/common.py for details.
RETIREMENT_STATES = [
'PENDING',
'LOCKING_ACCOUNT',
'LOCKING_COMPLETE',
# Use these states only when ENABLE_DISCUSSION_SERVICE is True.
'RETIRING_FORUMS',
'FORUMS_COMPLETE',
# TODO - Change these states to be the LMS-only email opt-out - PLAT-2189
'RETIRING_EMAIL_LISTS',
'EMAIL_LISTS_COMPLETE',
'RETIRING_ENROLLMENTS',
'ENROLLMENTS_COMPLETE',
# Use these states only when ENABLE_STUDENT_NOTES is True.
'RETIRING_NOTES',
'NOTES_COMPLETE',
'RETIRING_LMS',
'LMS_COMPLETE',
'ERRORED',
'ABORTED',
'COMPLETE',
]
USERNAME_REPLACEMENT_WORKER = "REPLACE WITH VALID USERNAME"
# Files and Uploads type filter values
FILES_AND_UPLOAD_TYPE_FILTERS = {
@@ -1972,182 +1415,28 @@ FILES_AND_UPLOAD_TYPE_FILTERS = {
'text/coffeescript', 'text/x-matlab', 'application/sql', 'text/php', ]
}
# Default to no Search Engine
SEARCH_ENGINE = None
ELASTIC_FIELD_MAPPINGS = {
"start_date": {
"type": "date"
}
}
XBLOCK_SETTINGS = {}
XBLOCK_FS_STORAGE_BUCKET = None
XBLOCK_FS_STORAGE_PREFIX = None
STUDIO_FRONTEND_CONTAINER_URL = None
################################ 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
CREDIT_PROVIDER_SECRET_KEYS = {}
# .. setting_name: COMPREHENSIVE_THEME_DIRS
# .. setting_default: []
# .. setting_description: A list of paths to directories, each of which will
# be searched for comprehensive themes. Do not override this Django setting directly.
# Instead, set the COMPREHENSIVE_THEME_DIRS environment variable, using colons (:) to
# separate paths.
COMPREHENSIVE_THEME_DIRS = os.environ.get("COMPREHENSIVE_THEME_DIRS", "").split(":")
# .. setting_name: DEFAULT_SITE_THEME
# .. setting_default: None
# .. setting_description: See LMS annotation.
DEFAULT_SITE_THEME = None
# .. toggle_name: ENABLE_COMPREHENSIVE_THEMING
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: See LMS annotation.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2016-06-30
ENABLE_COMPREHENSIVE_THEMING = False
# .. setting_name: CUSTOM_RESOURCE_TEMPLATES_DIRECTORY
# .. setting_default: None
# .. setting_description: Path to an existing directory of YAML files containing
# html content to be used with the subclasses of xmodule.x_module.ResourceTemplates.
# Default example templates can be found in xmodule/templates/html.
# Note that the extension used is ".yaml" and not ".yml".
# See xmodule.x_module.ResourceTemplates for usage.
# "CUSTOM_RESOURCE_TEMPLATES_DIRECTORY" : null
CUSTOM_RESOURCE_TEMPLATES_DIRECTORY = None
############################ Global Database Configuration #####################
DATABASE_ROUTERS = [
'openedx.core.lib.django_courseware_routers.StudentModuleHistoryExtendedRouter',
]
############################ Cache Configuration ###############################
CACHES = {
'course_structure_cache': {
'KEY_PREFIX': 'course_structure',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': '604800', # 1 week
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'celery': {
'KEY_PREFIX': 'celery',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': '7200',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'mongo_metadata_inheritance': {
'KEY_PREFIX': 'mongo_metadata_inheritance',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': 300,
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'staticfiles': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'staticfiles_general',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'default': {
'VERSION': '1',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'default',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'configuration': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'configuration',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'general': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'general',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
}
############################ OAUTH2 Provider ###################################
# 5 minute expiration time for JWT id tokens issued for external API requests.
OAUTH_ID_TOKEN_EXPIRATION = 5 * 60
# Partner support link for CMS footer
PARTNER_SUPPORT_EMAIL = ''
# Affiliate cookie tracking
AFFILIATE_COOKIE_NAME = 'dev_affiliate_id'
# API access management
API_ACCESS_FROM_EMAIL = 'api-requests@example.com'
API_ACCESS_MANAGER_EMAIL = 'api-access@example.com'
EDX_DRF_EXTENSIONS = {
# Set this value to an empty dict in order to prevent automatically updating
# user data from values in (possibly stale) JWTs.
@@ -2157,66 +1446,17 @@ EDX_DRF_EXTENSIONS = {
############## Settings for Studio Context Sensitive Help ##############
HELP_TOKENS_INI_FILE = REPO_ROOT / "cms" / "envs" / "help_tokens.ini"
HELP_TOKENS_LANGUAGE_CODE = Derived(lambda settings: settings.LANGUAGE_CODE)
HELP_TOKENS_VERSION = Derived(lambda settings: doc_version())
HELP_TOKENS_BOOKS = {
'learner': 'https://edx.readthedocs.io/projects/open-edx-learner-guide',
'course_author': 'https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course',
}
# Used with Email sending
RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS = 5
RETRY_ACTIVATION_EMAIL_TIMEOUT = 0.5
# Software Secure request retry settings
# Time in seconds before a retry of the task should be 60 mints.
SOFTWARE_SECURE_REQUEST_RETRY_DELAY = 60 * 60
# Maximum of 6 retries before giving up.
SOFTWARE_SECURE_RETRY_MAX_ATTEMPTS = 6
############## DJANGO-USER-TASKS ##############
# How long until database records about the outcome of a task and its artifacts get deleted?
USER_TASKS_MAX_AGE = timedelta(days=7)
############## Settings for the Enterprise App ######################
ENTERPRISE_SERVICE_WORKER_USERNAME = 'enterprise_worker'
ENTERPRISE_API_CACHE_TIMEOUT = 3600 # Value is in seconds
# The default value of this needs to be a 16 character string
ENTERPRISE_CUSTOMER_CATALOG_DEFAULT_CONTENT_FILTER = {}
# The setting key maps to the channel code (e.g. 'SAP' for success factors), Channel code is defined as
# part of django model of each integrated channel in edx-enterprise.
# The absence of a key/value pair translates to NO LIMIT on the number of "chunks" transmitted per cycle.
INTEGRATED_CHANNELS_API_CHUNK_TRANSMISSION_LIMIT = {}
BASE_COOKIE_DOMAIN = 'localhost'
############## Settings for the Discovery App ######################
COURSE_CATALOG_URL_ROOT = 'http://localhost:8008'
COURSE_CATALOG_API_URL = f'{COURSE_CATALOG_URL_ROOT}/api/v1'
# which access.py permission name to check in order to determine if a course is visible in
# the course catalog. We default this to the legacy permission 'see_exists'.
COURSE_CATALOG_VISIBILITY_PERMISSION = 'see_exists'
# which access.py permission name to check in order to determine if a course about page is
# visible. We default this to the legacy permission 'see_exists'.
COURSE_ABOUT_VISIBILITY_PERMISSION = 'see_exists'
DEFAULT_COURSE_VISIBILITY_IN_CATALOG = "both"
DEFAULT_MOBILE_AVAILABLE = False
############################# Persistent Grades ####################################
# Queue to use for updating persistent grades
RECALCULATE_GRADES_ROUTING_KEY = DEFAULT_PRIORITY_QUEUE
# Rate limit for regrading tasks that a grading policy change can kick off
POLICY_CHANGE_TASK_RATE_LIMIT = '900/h'
# .. setting_name: DEFAULT_GRADE_DESIGNATIONS
# .. setting_default: ['A', 'B', 'C', 'D']
# .. setting_description: The default 'pass' grade cutoff designations to be used. The failure grade
@@ -2257,24 +1497,8 @@ VIDEO_IMAGE_ASPECT_RATIO_TEXT = '16:9'
VIDEO_IMAGE_ASPECT_RATIO_ERROR_MARGIN = 0.1
###################### ZENDESK ######################
ZENDESK_URL = ''
ZENDESK_USER = ''
ZENDESK_API_KEY = ''
ZENDESK_CUSTOM_FIELDS = {}
ZENDESK_OAUTH_ACCESS_TOKEN = ''
# A mapping of string names to Zendesk Group IDs
# To get the IDs of your groups you can go to
# {zendesk_url}/api/v2/groups.json
ZENDESK_GROUP_ID_MAPPING = {}
############## Settings for Completion API #########################
# Once a user has watched this percentage of a video, mark it as complete:
# (0.0 = 0%, 1.0 = 100%)
COMPLETION_VIDEO_COMPLETE_PERCENTAGE = 0.95
############### Settings for edx-rbac ###############
SYSTEM_WIDE_ROLE_CLASSES = []
############## Installed Django Apps #########################
@@ -2289,38 +1513,13 @@ add_plugins(__name__, ProjectType.CMS, SettingsType.COMMON)
# See: https://docs.python.org/2/library/wsgiref.html#wsgiref.util.FileWrapper
COURSE_EXPORT_DOWNLOAD_CHUNK_SIZE = 8192
# E-Commerce API Configuration
ECOMMERCE_PUBLIC_URL_ROOT = 'http://localhost:8002'
ECOMMERCE_API_URL = 'http://localhost:8002/api/v2'
ECOMMERCE_API_SIGNING_KEY = 'SET-ME-PLEASE'
CREDENTIALS_INTERNAL_SERVICE_URL = 'http://localhost:8005'
CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:8005'
CREDENTIALS_SERVICE_USERNAME = 'credentials_service_user'
# time between scheduled runs, in seconds
NOTIFY_CREDENTIALS_FREQUENCY = 14400
ANALYTICS_DASHBOARD_URL = 'http://localhost:18110/courses'
ANALYTICS_DASHBOARD_NAME = 'Your Platform Name Here Insights'
COMMENTS_SERVICE_URL = 'http://localhost:18080'
COMMENTS_SERVICE_KEY = 'password'
EXAMS_SERVICE_URL = 'http://localhost:18740/api/v1'
EXAMS_SERVICE_USERNAME = 'edx_exams_worker'
FINANCIAL_REPORTS = {
'STORAGE_TYPE': 'localfs',
'BUCKET': None,
'ROOT_PATH': 'sandbox',
}
############# CORS headers for cross-domain requests #################
if FEATURES.get('ENABLE_CORS_HEADERS'):
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_WHITELIST = ()
CORS_ORIGIN_ALLOW_ALL = False
CORS_ALLOW_INSECURE = False
# Set CORS_ALLOW_HEADERS regardless of whether we've enabled ENABLE_CORS_HEADERS
# because that decision might happen in a later config file. (The headers to
@@ -2331,10 +1530,6 @@ CORS_ALLOW_HEADERS = corsheaders_default_headers + (
'content-disposition',
)
LOGIN_REDIRECT_WHITELIST = []
DEPRECATED_ADVANCED_COMPONENT_TYPES = []
########################## VIDEO IMAGE STORAGE ############################
VIDEO_IMAGE_SETTINGS = dict(
@@ -2353,19 +1548,6 @@ VIDEO_IMAGE_SETTINGS = dict(
VIDEO_IMAGE_MAX_AGE = 31536000
########################## VIDEO TRANSCRIPTS STORAGE ############################
VIDEO_TRANSCRIPTS_SETTINGS = dict(
VIDEO_TRANSCRIPTS_MAX_BYTES=3 * 1024 * 1024, # 3 MB
# Backend storage
# STORAGE_CLASS='storages.backends.s3boto3.S3Boto3Storage',
# STORAGE_KWARGS=dict(bucket='video-transcripts-bucket'),
STORAGE_KWARGS=dict(
location=MEDIA_ROOT,
),
DIRECTORY_PREFIX='video-transcripts/',
BASE_URL=MEDIA_URL,
)
VIDEO_TRANSCRIPTS_MAX_AGE = 31536000
TRANSCRIPT_LANG_CACHE_TIMEOUT = 60 * 60 * 24
@@ -2384,17 +1566,6 @@ BULK_EMAIL_DEFAULT_FROM_EMAIL = 'no-reply@example.com'
# a bulk email message.
BULK_EMAIL_LOG_SENT_EMAILS = False
############### Settings for django file storage ##################
STORAGES = {
'default': {
'BACKEND': 'django.core.files.storage.FileSystemStorage'
},
'staticfiles': {
'BACKEND': 'openedx.core.storage.ProductionStorage'
}
}
###################### Grade Downloads ######################
# These keys are used for all of our asynchronous downloadable files, including
# the ones that contain information other than grades.
@@ -2409,59 +1580,21 @@ GRADES_DOWNLOAD = {
}
############### Settings swift #####################################
SWIFT_USERNAME = None
SWIFT_KEY = None
SWIFT_TENANT_ID = None
SWIFT_TENANT_NAME = None
SWIFT_AUTH_URL = None
SWIFT_AUTH_VERSION = None
SWIFT_REGION_NAME = None
SWIFT_USE_TEMP_URLS = False
SWIFT_TEMP_URL_KEY = None
SWIFT_TEMP_URL_DURATION = 1800 # seconds
############### The SAML private/public key values ################
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY = ""
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT = ""
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY_DICT = {}
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT_DICT = {}
############### Settings for facebook ##############################
FACEBOOK_APP_ID = 'FACEBOOK_APP_ID'
FACEBOOK_APP_SECRET = 'FACEBOOK_APP_SECRET'
FACEBOOK_API_VERSION = 'v2.1'
############### Settings for django-fernet-fields ##################
FERNET_KEYS = [
'DUMMY KEY CHANGE BEFORE GOING TO PRODUCTION',
]
### Proctoring configuration (redirct URLs and keys shared between systems) ####
PROCTORING_BACKENDS = {
'DEFAULT': 'null',
# The null key needs to be quoted because
# null is a language independent type in YAML
'null': {}
}
###################### PROCTORING SETTINGS ##########################
PROCTORING_SETTINGS = {}
###################### LEARNER PORTAL ################################
LEARNER_PORTAL_URL_ROOT = 'https://learner-portal-localhost:18000'
############################ JWT #################################
JWT_ISSUER = 'http://127.0.0.1:8000/oauth2'
DEFAULT_JWT_ISSUER = {
'ISSUER': 'http://127.0.0.1:8000/oauth2',
'AUDIENCE': 'SET-ME-PLEASE',
'SECRET_KEY': 'SET-ME-PLEASE'
}
JWT_EXPIRATION = 30
JWT_PRIVATE_SIGNING_KEY = None
SYSLOG_SERVER = ''
FEEDBACK_SUBMISSION_EMAIL = ''
REGISTRATION_EXTRA_FIELDS = {
'confirm_email': 'hidden',
'level_of_education': 'optional',
@@ -2478,9 +1611,6 @@ REGISTRATION_EXTRA_FIELDS = {
EDXAPP_PARSE_KEYS = {}
PARSE_KEYS = {}
############################ AI_TRANSLATIONS ##################################
AI_TRANSLATIONS_API_URL = 'http://localhost:18760/api/v1'
###################### DEPRECATED URLS ##########################
# .. toggle_name: DISABLE_DEPRECATED_SIGNIN_URL
@@ -2505,33 +1635,12 @@ DISABLE_DEPRECATED_SIGNIN_URL = False
# .. toggle_tickets: ARCH-1253
DISABLE_DEPRECATED_SIGNUP_URL = False
##### LOGISTRATION RATE LIMIT SETTINGS #####
LOGISTRATION_RATELIMIT_RATE = '100/5m'
LOGISTRATION_PER_EMAIL_RATELIMIT_RATE = '30/5m'
LOGISTRATION_API_RATELIMIT = '20/m'
LOGIN_AND_REGISTER_FORM_RATELIMIT = '100/5m'
RESET_PASSWORD_TOKEN_VALIDATE_API_RATELIMIT = '30/7d'
RESET_PASSWORD_API_RATELIMIT = '30/7d'
##### REGISTRATION RATE LIMIT SETTINGS #####
REGISTRATION_VALIDATION_RATELIMIT = '30/7d'
REGISTRATION_RATELIMIT = '60/7d'
OPTIONAL_FIELD_API_RATELIMIT = '10/h'
##### PASSWORD RESET RATE LIMIT SETTINGS #####
PASSWORD_RESET_IP_RATE = '1/m'
PASSWORD_RESET_EMAIL_RATE = '2/h'
######################## Setting for content libraries ########################
MAX_BLOCKS_PER_CONTENT_LIBRARY = 100_000
################# Student Verification #################
VERIFY_STUDENT = {
"DAYS_GOOD_FOR": 365, # How many days is a verficiation good for?
# The variable represents the window within which a verification is considered to be "expiring soon."
"EXPIRING_SOON_WINDOW": 28,
}
######################## Organizations ########################
# .. toggle_name: ORGANIZATIONS_AUTOCREATE
@@ -2550,39 +1659,9 @@ VERIFY_STUDENT = {
# .. toggle_tickets: https://github.com/openedx/edx-organizations/blob/master/docs/decisions/0001-phase-in-db-backed-organizations-to-all.rst
ORGANIZATIONS_AUTOCREATE = True
################# Settings for brand logos. #################
LOGO_IMAGE_EXTRA_TEXT = ''
LOGO_URL = None
LOGO_URL_PNG = None
LOGO_TRADEMARK_URL = None
FAVICON_URL = None
DEFAULT_EMAIL_LOGO_URL = 'https://edx-cdn.org/v3/default/logo.png'
############## Settings for course import olx validation ############################
COURSE_OLX_VALIDATION_STAGE = 1
COURSE_OLX_VALIDATION_IGNORE_LIST = None
################# show account activate cta after register ########################
SHOW_ACTIVATE_CTA_POPUP_COOKIE_NAME = 'show-account-activation-popup'
SHOW_ACCOUNT_ACTIVATION_CTA = False
################# Documentation links for course apps #################
# pylint: disable=line-too-long
CALCULATOR_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/add_calculator.html"
DISCUSSIONS_HELP_URL = "https://docs.openedx.org/en/latest/educators/concepts/communication/about_course_discussions.html"
EDXNOTES_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/enable_notes.html"
PROGRESS_HELP_URL = "https://docs.openedx.org/en/latest/educators/references/data/progress_page.html"
TEAMS_HELP_URL = "https://docs.openedx.org/en/latest/educators/navigation/advanced_features.html#use-teams-in-your-course"
TEXTBOOKS_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/manage_textbooks.html"
WIKI_HELP_URL = "https://docs.openedx.org/en/latest/educators/concepts/communication/about_course_wiki.html"
CUSTOM_PAGES_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/manage_custom_page.html"
COURSE_LIVE_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/add_course_live.html"
ORA_SETTINGS_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/Manage_ORA_Assignment.html"
# pylint: enable=line-too-long
# keys for big blue button live provider
COURSE_LIVE_GLOBAL_CREDENTIALS = {}
######################## Registration ########################
@@ -2593,9 +1672,6 @@ INACTIVE_USER_LOGIN = True
# Redirect URL for inactive user. If not set, user will be redirected to /login after the login itself (loop)
INACTIVE_USER_URL = f'http://{CMS_BASE}'
# String length for the configurable part of the auto-generated username
AUTO_GENERATED_USERNAME_RANDOM_STRING_LENGTH = 4
######################## Discussion Forum settings ########################
# Feedback link in upgraded discussion notification alert
@@ -2606,20 +1682,11 @@ DISCUSSIONS_INCONTEXT_FEEDBACK_URL = ''
DISCUSSIONS_INCONTEXT_LEARNMORE_URL = "https://docs.openedx.org/en/latest/educators/concepts/communication/about_course_discussions.html"
# pylint: enable=line-too-long
#### django-simple-history##
# disable indexing on date field its coming django-simple-history.
SIMPLE_HISTORY_DATE_INDEX = False
#### Event bus producing ####
def _should_send_xblock_events(settings):
return settings.FEATURES['ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS']
def _should_send_learning_badge_events(settings):
return settings.FEATURES['BADGES_ENABLED']
return settings.ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS
# .. setting_name: EVENT_BUS_PRODUCER_CONFIG
# .. setting_default: all events disabled
@@ -2673,13 +1740,13 @@ EVENT_BUS_PRODUCER_CONFIG = {
"org.openedx.learning.course.passing.status.updated.v1": {
"learning-badges-lifecycle": {
"event_key_field": "course_passing_status.course.course_key",
"enabled": Derived(_should_send_learning_badge_events),
"enabled": Derived(should_send_learning_badge_events),
},
},
"org.openedx.learning.ccx.course.passing.status.updated.v1": {
"learning-badges-lifecycle": {
"event_key_field": "course_passing_status.course.ccx_course_key",
"enabled": Derived(_should_send_learning_badge_events),
"enabled": Derived(should_send_learning_badge_events),
},
},
}
@@ -2689,8 +1756,6 @@ EVENT_BUS_PRODUCER_CONFIG = {
# This affects the Authoring API swagger docs but not the legacy swagger docs under /api-docs/.
REST_FRAMEWORK['DEFAULT_SCHEMA_CLASS'] = 'drf_spectacular.openapi.AutoSchema'
BEAMER_PRODUCT_ID = ""
################### Studio Search (beta), using Meilisearch ###################
# Enable Studio search features (powered by Meilisearch) (beta, off by default)
@@ -2733,28 +1798,6 @@ LIBRARY_ENABLED_BLOCKS = [
'word_cloud',
]
############## NOTIFICATIONS EXPIRY ##############
NOTIFICATIONS_EXPIRY = 60
EXPIRED_NOTIFICATIONS_DELETE_BATCH_SIZE = 10000
NOTIFICATION_CREATION_BATCH_SIZE = 76
NOTIFICATIONS_DEFAULT_FROM_EMAIL = "no-reply@example.com"
NOTIFICATION_DIGEST_LOGO = DEFAULT_EMAIL_LOGO_URL
SOCIAL_MEDIA_FOOTER_ACE_URLS = {
'reddit': 'http://www.reddit.com/r/edx',
'twitter': 'https://twitter.com/edXOnline',
'linkedin': 'http://www.linkedin.com/company/edx',
'facebook': 'http://www.facebook.com/EdxOnline',
}
SOCIAL_MEDIA_LOGO_URLS = {
'reddit': 'http://email-media.s3.amazonaws.com/edX/2021/social_5_reddit.png',
'twitter': 'http://email-media.s3.amazonaws.com/edX/2021/social_2_twitter.png',
'linkedin': 'http://email-media.s3.amazonaws.com/edX/2021/social_3_linkedin.png',
'facebook': 'http://email-media.s3.amazonaws.com/edX/2021/social_1_fb.png',
}
# .. setting_name: DEFAULT_ORG_LOGO_URL
# .. setting_default: Derived(lambda settings: settings.STATIC_URL + 'images/logo.png')
# .. setting_description: The default logo url for organizations that do not have a logo set.

View File

@@ -50,7 +50,7 @@ FRONTEND_REGISTER_URL = LMS_ROOT_URL + '/register'
################################## Video Pipeline Settings #########################
FEATURES['ENABLE_VIDEO_UPLOAD_PIPELINE'] = True
ENABLE_VIDEO_UPLOAD_PIPELINE = True
########################### PIPELINE #################################
@@ -126,7 +126,7 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing
################################ MILESTONES ################################
FEATURES['MILESTONES_APP'] = True
MILESTONES_APP = True
########################### ORGANIZATIONS #################################
# Although production studio.edx.org disables `ORGANIZATIONS_AUTOCREATE`,
@@ -136,16 +136,16 @@ FEATURES['MILESTONES_APP'] = True
ORGANIZATIONS_AUTOCREATE = True
################################ ENTRANCE EXAMS ################################
FEATURES['ENTRANCE_EXAMS'] = True
ENTRANCE_EXAMS = True
################################ COURSE LICENSES ################################
FEATURES['LICENSING'] = True
LICENSING = True
# Needed to enable licensing on video blocks
XBLOCK_SETTINGS.update({'VideoBlock': {'licensing_enabled': True}})
################################ SEARCH INDEX ################################
FEATURES['ENABLE_COURSEWARE_INDEX'] = True
FEATURES['ENABLE_LIBRARY_INDEX'] = False
ENABLE_COURSEWARE_INDEX = True
ENABLE_LIBRARY_INDEX = False
SEARCH_ENGINE = "search.elastic.ElasticSearchEngine"
ELASTIC_SEARCH_CONFIG = [
@@ -157,22 +157,22 @@ ELASTIC_SEARCH_CONFIG = [
]
################################ COURSE DISCUSSIONS ###########################
FEATURES['ENABLE_DISCUSSION_SERVICE'] = True
ENABLE_DISCUSSION_SERVICE = True
################################ CREDENTIALS ###########################
CREDENTIALS_SERVICE_USERNAME = 'credentials_worker'
########################## Certificates Web/HTML View #######################
FEATURES['CERTIFICATES_HTML_VIEW'] = True
CERTIFICATES_HTML_VIEW = True
########################## AUTHOR PERMISSION #######################
FEATURES['ENABLE_CREATOR_GROUP'] = True
ENABLE_CREATOR_GROUP = True
########################## Library creation organizations restriction #######################
FEATURES['ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES'] = True
ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES = True
################### FRONTEND APPLICATION PUBLISHER URL ###################
FEATURES['FRONTEND_APP_PUBLISHER_URL'] = 'http://localhost:18400'
FRONTEND_APP_PUBLISHER_URL = 'http://localhost:18400'
################### FRONTEND APPLICATION COURSE AUTHORING ###################
COURSE_AUTHORING_MICROFRONTEND_URL = 'http://localhost:2001'
@@ -252,13 +252,13 @@ MODULESTORE = convert_module_store_setting_if_needed(MODULESTORE)
SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'
############# CORS headers for cross-domain requests #################
FEATURES['ENABLE_CORS_HEADERS'] = True
ENABLE_CORS_HEADERS = True
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_ALLOW_ALL = True
################### Special Exams (Proctoring) and Prereqs ###################
FEATURES['ENABLE_SPECIAL_EXAMS'] = True
FEATURES['ENABLE_PREREQUISITE_COURSES'] = True
ENABLE_SPECIAL_EXAMS = True
ENABLE_PREREQUISITE_COURSES = True
# Used in edx-proctoring for ID generation in lieu of SECRET_KEY - dummy value
# (ref MST-637)

View File

@@ -298,10 +298,6 @@ STORAGES:
BACKEND: openedx.core.storage.ProductionStorage
DEFAULT_FROM_EMAIL: no-reply@registration.localhost
DEFAULT_HASHING_ALGORITHM: sha256
DEFAULT_JWT_ISSUER:
AUDIENCE: test_password
ISSUER: https://courses.localhost/oauth2
SECRET_KEY: test_secret_key
DEFAULT_SITE_THEME: localhost
DISABLED_COUNTRIES:
- US
@@ -513,7 +509,6 @@ JWT_AUTH:
"kid": "lms001"}]}'
JWT_SECRET_KEY: test_JWT_SECRET_KEY
JWT_SIGNING_ALGORITHM: RS512
JWT_ISSUER: https://courses.localhost/oauth2
LANGUAGE_COOKIE: language-preference
LEARNER_PORTAL_URL_ROOT: https://masters.localhost
LEARNER_RECORD_MICROFRONTEND_URL: https://records.localhost

View File

@@ -29,6 +29,11 @@ from openedx.core.lib.derived import derive_settings # lint-amnesty, pylint: di
from openedx.core.lib.logsettings import get_logger_config # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed # lint-amnesty, pylint: disable=wrong-import-order
from openedx.core.lib.features_setting_proxy import FeaturesProxy
# A proxy for feature flags stored in the settings namespace
FEATURES = FeaturesProxy(globals())
def get_env_setting(setting):
""" Get the environment setting or return exception """
@@ -286,7 +291,7 @@ EVENT_TRACKING_BACKENDS['segmentio']['OPTIONS']['processors'][0]['OPTIONS']['whi
)
if FEATURES['ENABLE_COURSEWARE_INDEX'] or FEATURES['ENABLE_LIBRARY_INDEX']:
if ENABLE_COURSEWARE_INDEX or ENABLE_LIBRARY_INDEX:
# Use ElasticSearch for the search engine
SEARCH_ENGINE = "search.elastic.ElasticSearchEngine"
@@ -302,7 +307,7 @@ XBLOCK_SETTINGS.setdefault("VideoBlock", {})['YOUTUBE_API_KEY'] = YOUTUBE_API_KE
JWT_AUTH.update(_YAML_TOKENS.get('JWT_AUTH', {}))
######################## CUSTOM COURSES for EDX CONNECTOR ######################
if FEATURES['CUSTOM_COURSES_EDX']:
if CUSTOM_COURSES_EDX:
INSTALLED_APPS.append('openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig')
########################## Extra middleware classes #######################
@@ -347,7 +352,7 @@ add_plugins(__name__, ProjectType.CMS, SettingsType.PRODUCTION)
####
############# CORS headers for cross-domain requests #################
if FEATURES['ENABLE_CORS_HEADERS']:
if ENABLE_CORS_HEADERS:
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_WHITELIST = _YAML_TOKENS.get('CORS_ORIGIN_WHITELIST', ())
CORS_ORIGIN_ALLOW_ALL = _YAML_TOKENS.get('CORS_ORIGIN_ALLOW_ALL', False)

View File

@@ -23,6 +23,8 @@ from openedx.core.lib.derived import derive_settings
from xmodule.modulestore.modulestore_settings import update_module_store_settings # pylint: disable=wrong-import-order
from openedx.core.lib.features_setting_proxy import FeaturesProxy
from .common import *
# import settings from LMS for consistent behavior with CMS
@@ -46,6 +48,8 @@ from lms.envs.test import ( # pylint: disable=wrong-import-order, disable=unuse
XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE,
)
# A proxy for feature flags stored in the settings namespace
FEATURES = FeaturesProxy(globals())
# Include a non-ascii character in STUDIO_NAME and STUDIO_SHORT_NAME to uncover possible
# UnicodeEncodeErrors in tests. Also use lazy text to reveal possible json dumps errors
@@ -66,13 +70,14 @@ TEST_ROOT = path("test_root")
# Want static files in the same dir for running on jenkins.
STATIC_ROOT = TEST_ROOT / "staticfiles"
WEBPACK_LOADER["DEFAULT"]["STATS_FILE"] = STATIC_ROOT / "webpack-stats.json"
WEBPACK_LOADER['DEFAULT']['LOADER_CLASS'] = 'webpack_loader.loader.FakeWebpackLoader'
GITHUB_REPO_ROOT = TEST_ROOT / "data"
DATA_DIR = TEST_ROOT / "data"
COMMON_TEST_DATA_ROOT = COMMON_ROOT / "test" / "data"
# For testing "push to lms"
FEATURES["ENABLE_EXPORT_GIT"] = True
ENABLE_EXPORT_GIT = True
GIT_REPO_EXPORT_DIR = TEST_ROOT / "export_course_repos"
# TODO (cpennington): We need to figure out how envs/test.py can inject things into common.py so that we don't have to repeat this sort of thing # lint-amnesty, pylint: disable=line-too-long
@@ -203,51 +208,50 @@ PASSWORD_HASHERS = [
# No segment key
CMS_SEGMENT_KEY = None
FEATURES["DISABLE_SET_JWT_COOKIES_FOR_TESTS"] = True
DISABLE_SET_JWT_COOKIES_FOR_TESTS = True
FEATURES["ENABLE_SERVICE_STATUS"] = True
ENABLE_SERVICE_STATUS = True
# Toggles embargo on for testing
FEATURES["EMBARGO"] = True
EMBARGO = True
TEST_THEME = COMMON_ROOT / "test" / "test-theme"
# For consistency in user-experience, keep the value of this setting in sync with
# the one in lms/envs/test.py
FEATURES["ENABLE_DISCUSSION_SERVICE"] = False
ENABLE_DISCUSSION_SERVICE = False
# Enable a parental consent age limit for testing
PARENTAL_CONSENT_AGE_LIMIT = 13
# Enable certificates for the tests
FEATURES["CERTIFICATES_HTML_VIEW"] = True
CERTIFICATES_HTML_VIEW = True
# Enable content libraries code for the tests
FEATURES["ENABLE_CONTENT_LIBRARIES"] = True
ENABLE_CONTENT_LIBRARIES = True
FEATURES["ENABLE_EDXNOTES"] = True
ENABLE_EDXNOTES = True
# MILESTONES
FEATURES["MILESTONES_APP"] = True
MILESTONES_APP = True
# ENTRANCE EXAMS
FEATURES["ENTRANCE_EXAMS"] = True
ENTRANCE_EXAM_MIN_SCORE_PCT = 50
ENTRANCE_EXAMS = True
VIDEO_CDN_URL = {"CN": "http://api.xuetangx.com/edx/video?s3_url="}
# Courseware Search Index
FEATURES["ENABLE_COURSEWARE_INDEX"] = True
FEATURES["ENABLE_LIBRARY_INDEX"] = True
ENABLE_COURSEWARE_INDEX = True
ENABLE_LIBRARY_INDEX = True
SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine"
FEATURES["ENABLE_ENROLLMENT_TRACK_USER_PARTITION"] = True
ENABLE_ENROLLMENT_TRACK_USER_PARTITION = True
########################## AUTHOR PERMISSION #######################
FEATURES["ENABLE_CREATOR_GROUP"] = False
ENABLE_CREATOR_GROUP = False
# teams feature
FEATURES["ENABLE_TEAMS"] = True
ENABLE_TEAMS = True
# Dummy secret key for dev/test
SECRET_KEY = "85920908f28904ed733fe576320db18cabd7b6cd"
@@ -257,7 +261,7 @@ INSTALLED_APPS += [
"openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig",
"common.djangoapps.third_party_auth.apps.ThirdPartyAuthConfig",
]
FEATURES["CUSTOM_COURSES_EDX"] = True
CUSTOM_COURSES_EDX = True
########################## VIDEO IMAGE STORAGE ############################
VIDEO_IMAGE_SETTINGS = dict(

View File

@@ -183,7 +183,6 @@ class UpstreamLink:
}
if (
include_child_info
and self.ready_to_sync
and isinstance(self.upstream_key, LibraryContainerLocator)
and self.downstream_key is not None
):

View File

@@ -147,7 +147,7 @@ if not source:
<%
body = capture(caller.body)
%>
${HTML(render_bundle(entry, extension=None, config='DEFAULT', attrs=attrs))}
${HTML(render_bundle(context, entry, extension=None, config='DEFAULT', attrs=attrs))}
% if body:
<script type="text/javascript">
${body | n, decode.utf8}
@@ -166,8 +166,8 @@ if not source:
component as props.
</%doc>
${HTML(render_bundle(component))}
${HTML(render_bundle('ReactRenderer'))}
${HTML(render_bundle(context, component))}
${HTML(render_bundle(context,'ReactRenderer'))}
<div id="${id}"></div>
<script type="text/javascript">

View File

@@ -15,19 +15,3 @@ from cms.conftest import _django_clear_site_cache, pytest_configure # pylint: d
# When using self.assertEquals, diffs are truncated. We don't want that, always
# show the whole diff.
TestCase.maxDiff = None
@pytest.fixture(autouse=True)
def no_webpack_loader(monkeypatch): # lint-amnesty, pylint: disable=missing-function-docstring
monkeypatch.setattr(
"webpack_loader.templatetags.webpack_loader.render_bundle",
lambda entry, extension=None, config='DEFAULT', attrs='': ''
)
monkeypatch.setattr(
"webpack_loader.utils.get_as_tags",
lambda entry, extension=None, config='DEFAULT', attrs='': []
)
monkeypatch.setattr(
"webpack_loader.utils.get_files",
lambda entry, extension=None, config='DEFAULT', attrs='': []
)

View File

@@ -62,7 +62,7 @@ Decouple content grouping concepts from user/learning grouping concepts.
A common use case for course content is to show different bits of content to
different cohorts of users. For instance, a university might have a licensing
agreement that allows it to show a set of vidoes only to its own staff and
agreement that allows it to show a set of videos only to its own staff and
students, and not a wider MOOC audience. Studio needs to be able to annotate
this data somehow, but the list of available cohorts for a given course is
considered Learner information that may change from run to run.

View File

@@ -811,7 +811,9 @@ def get_assignments_grades(user, course_id, cache_timeout):
course_id (CourseLocator): The course key.
cache_timeout (int): Cache timeout in seconds
Returns:
list (ReadSubsectionGrade, ZeroSubsectionGrade): The list with assignments grades.
tuple:
- list[Union[ReadSubsectionGrade, ZeroSubsectionGrade]]: List of subsection grades.
- list[dict]: List of dictionaries with section-level grade breakdown and assignment info.
"""
is_staff = bool(has_access(user, 'staff', course_id))
@@ -842,7 +844,7 @@ def get_assignments_grades(user, course_id, cache_timeout):
log.warning(f'Could not get grades for the course: {course_id}, error: {err}')
return []
return subsection_grades
return subsection_grades, course_grade.grader_result()['section_breakdown']
def get_first_component_of_block(block_key, block_data):

View File

@@ -10,7 +10,7 @@ def plugin_settings(settings):
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-06-15
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/8474
settings.FEATURES['ALLOW_HIDING_DISCUSSION_TAB'] = False
settings.ALLOW_HIDING_DISCUSSION_TAB = False
settings.DISCUSSION_SETTINGS = {
'MAX_COMMENT_DEPTH': 2,
'COURSE_PUBLISH_TASK_DELAY': 30,

View File

@@ -279,7 +279,8 @@ class SectionGradesBreakdownTest(GradeViewTestMixin, APITestCase):
{
'category': 'Homework',
'detail': f'Homework {i} Unreleased - 0% (?/?)',
'label': f'HW {i:02d}', 'percent': .0
'label': f'HW {i:02d}', 'percent': .0,
'sequential_id': None,
}
for i in range(1, 11)
]
@@ -289,14 +290,16 @@ class SectionGradesBreakdownTest(GradeViewTestMixin, APITestCase):
'detail': 'Homework 11 Unreleased - 0% (?/?)',
'label': 'HW 11',
'mark': {'detail': 'The lowest 2 Homework scores are dropped.'},
'percent': 0.0
'percent': 0.0,
'sequential_id': None,
},
{
'category': 'Homework',
'detail': 'Homework 12 Unreleased - 0% (?/?)',
'label': 'HW 12',
'mark': {'detail': 'The lowest 2 Homework scores are dropped.'},
'percent': 0.0
'percent': 0.0,
'sequential_id': None,
}
]
+ [
@@ -311,7 +314,8 @@ class SectionGradesBreakdownTest(GradeViewTestMixin, APITestCase):
{
'category': 'Lab',
'detail': f'Lab {i} Unreleased - 0% (?/?)',
'label': f'Lab {i:02d}', 'percent': .0
'label': f'Lab {i:02d}', 'percent': .0,
'sequential_id': None,
}
for i in range(1, 11)
]
@@ -321,14 +325,16 @@ class SectionGradesBreakdownTest(GradeViewTestMixin, APITestCase):
'detail': 'Lab 11 Unreleased - 0% (?/?)',
'label': 'Lab 11',
'mark': {'detail': 'The lowest 2 Lab scores are dropped.'},
'percent': 0.0
'percent': 0.0,
'sequential_id': None,
},
{
'category': 'Lab',
'detail': 'Lab 12 Unreleased - 0% (?/?)',
'label': 'Lab 12',
'mark': {'detail': 'The lowest 2 Lab scores are dropped.'},
'percent': 0.0
'percent': 0.0,
'sequential_id': None,
},
{
'category': 'Lab',
@@ -342,14 +348,16 @@ class SectionGradesBreakdownTest(GradeViewTestMixin, APITestCase):
'detail': 'Midterm Exam = 0.00%',
'label': 'Midterm',
'percent': 0.0,
'prominent': True
'prominent': True,
'sequential_id': None,
},
{
'category': 'Final Exam',
'detail': 'Final Exam = 0.00%',
'label': 'Final',
'percent': 0.0,
'prominent': True
'prominent': True,
'sequential_id': None,
}
]
)

View File

@@ -162,6 +162,7 @@ class TestCourseGradeFactory(GradeTestBase):
with mock_get_score(1, 2):
self.subsection_grade_factory.update(self.course_structure[self.sequence.location])
course_grade = CourseGradeFactory().update(self.request.user, self.course)
subsection_grades = list(course_grade.subsection_grades.values())
actual_summary = course_grade.summary
@@ -187,13 +188,15 @@ class TestCourseGradeFactory(GradeTestBase):
'category': 'Homework',
'detail': 'Homework 1 - Test Sequential X with an & Ampersand - 50.00% (1/2)',
'label': 'HW 01',
'percent': 0.5
'percent': 0.5,
'sequential_id': str(subsection_grades[0].location),
},
{
'category': 'Homework',
'detail': 'Homework 2 - Test Sequential A - 0.00% (0/1)',
'label': 'HW 02',
'percent': 0.0
'percent': 0.0,
'sequential_id': str(subsection_grades[1].location),
},
{
'category': 'Homework',

View File

@@ -9,103 +9,101 @@ def plugin_settings(settings):
### Analytics Dashboard (Insights) settings
settings.ANALYTICS_DASHBOARD_URL = ""
settings.ANALYTICS_DASHBOARD_NAME = _('Your Platform Insights')
settings.FEATURES.update({
# .. toggle_name: FEATURES['DISPLAY_ANALYTICS_ENROLLMENTS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Enable display of enrollment counts in instructor dashboard and
# analytics section.
# .. toggle_use_cases: opt_out
# .. toggle_creation_date: 2014-11-12
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5838
'DISPLAY_ANALYTICS_ENROLLMENTS': True,
# .. toggle_name: FEATURES['DISPLAY_ANALYTICS_ENROLLMENTS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Enable display of enrollment counts in instructor dashboard and
# analytics section.
# .. toggle_use_cases: opt_out
# .. toggle_creation_date: 2014-11-12
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5838
settings.DISPLAY_ANALYTICS_ENROLLMENTS = True
# .. toggle_name: FEATURES['ENABLE_CCX_ANALYTICS_DASHBOARD_URL']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Display the 'Analytics' tab in the instructor dashboard for CCX courses.
# Note: This has no effect unless ANALYTICS_DASHBOARD_URL is already set, because without that
# setting, the tab does not show up for any courses.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2016-10-07
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/13196
'ENABLE_CCX_ANALYTICS_DASHBOARD_URL': False,
# .. toggle_name: FEATURES['ENABLE_CCX_ANALYTICS_DASHBOARD_URL']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Display the 'Analytics' tab in the instructor dashboard for CCX courses.
# Note: This has no effect unless ANALYTICS_DASHBOARD_URL is already set, because without that
# setting, the tab does not show up for any courses.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2016-10-07
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/13196
settings.ENABLE_CCX_ANALYTICS_DASHBOARD_URL = False
# .. setting_name: FEATURES['MAX_ENROLLMENT_INSTR_BUTTONS']
# .. setting_default: 200
# .. setting_description: Disable instructor dashboard buttons for downloading course data
# when enrollment exceeds this number. The number indicates the maximum allowed enrollments
# for the course to be considered "small". Courses exceeding the upper limit of "small"
# courses will have disabled buttons at the instructor dashboard.
'MAX_ENROLLMENT_INSTR_BUTTONS': 200,
# .. setting_name: FEATURES['MAX_ENROLLMENT_INSTR_BUTTONS']
# .. setting_default: 200
# .. setting_description: Disable instructor dashboard buttons for downloading course data
# when enrollment exceeds this number. The number indicates the maximum allowed enrollments
# for the course to be considered "small". Courses exceeding the upper limit of "small"
# courses will have disabled buttons at the instructor dashboard.
settings.MAX_ENROLLMENT_INSTR_BUTTONS = 200
# .. toggle_name: FEATURES['ENABLE_GRADE_DOWNLOADS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable grade CSV downloads from the instructor dashboard. Grade
# calculation started from the instructor dashboard will write grades CSV files to the
# configured storage backend and give links for downloads.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2016-07-06
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/11286
'ENABLE_GRADE_DOWNLOADS': False,
# .. toggle_name: FEATURES['ENABLE_GRADE_DOWNLOADS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable grade CSV downloads from the instructor dashboard. Grade
# calculation started from the instructor dashboard will write grades CSV files to the
# configured storage backend and give links for downloads.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2016-07-06
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/11286
settings.ENABLE_GRADE_DOWNLOADS = False
# .. toggle_name: FEATURES['ALLOW_COURSE_STAFF_GRADE_DOWNLOADS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to give course staff unrestricted access to grade downloads;
# if set to False, only edX superusers can perform the downloads.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2018-03-26
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1750
'ALLOW_COURSE_STAFF_GRADE_DOWNLOADS': False,
# .. toggle_name: FEATURES['ALLOW_COURSE_STAFF_GRADE_DOWNLOADS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to give course staff unrestricted access to grade downloads;
# if set to False, only edX superusers can perform the downloads.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2018-03-26
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1750
settings.ALLOW_COURSE_STAFF_GRADE_DOWNLOADS = False
# .. toggle_name: FEATURES['ALLOW_AUTOMATED_SIGNUPS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to show a section in the membership tab of the instructor
# dashboard to allow an upload of a CSV file that contains a list of new accounts to create
# and register for course.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2014-10-21
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5670
'ALLOW_AUTOMATED_SIGNUPS': False,
# .. toggle_name: FEATURES['ALLOW_AUTOMATED_SIGNUPS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to show a section in the membership tab of the instructor
# dashboard to allow an upload of a CSV file that contains a list of new accounts to create
# and register for course.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2014-10-21
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5670
settings.ALLOW_AUTOMATED_SIGNUPS = False
# .. toggle_name: FEATURES['ENABLE_AUTOMATED_SIGNUPS_EXTRA_FIELDS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When True, the CSV file that contains a list of
# new accounts to create and register for a course in the membership
# tab of the instructor dashboard will accept the cohort name to
# assign the new user and the enrollment course mode.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-10-26
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/21260
'ENABLE_AUTOMATED_SIGNUPS_EXTRA_FIELDS': False,
# .. toggle_name: FEATURES['ENABLE_AUTOMATED_SIGNUPS_EXTRA_FIELDS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When True, the CSV file that contains a list of
# new accounts to create and register for a course in the membership
# tab of the instructor dashboard will accept the cohort name to
# assign the new user and the enrollment course mode.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-10-26
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/21260
settings.ENABLE_AUTOMATED_SIGNUPS_EXTRA_FIELDS = False
# .. toggle_name: FEATURES['CERTIFICATES_INSTRUCTOR_GENERATION'] # lint-amnesty, pylint: disable=annotation-missing-token
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to allow batch generation of certificates from the instructor dashboard.
# In case of self-paced courses, the certificate generation button is hidden if certificate
# generation is not explicitly enabled globally or for the specific course.
# .. toggle_use_cases: opt_in
'CERTIFICATES_INSTRUCTOR_GENERATION': False,
# .. toggle_name: FEATURES['CERTIFICATES_INSTRUCTOR_GENERATION'] # lint-amnesty, pylint: disable=annotation-missing-token
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to allow batch generation of certificates from the instructor dashboard.
# In case of self-paced courses, the certificate generation button is hidden if certificate
# generation is not explicitly enabled globally or for the specific course.
# .. toggle_use_cases: opt_in
settings.CERTIFICATES_INSTRUCTOR_GENERATION = False
# .. toggle_name: FEATURES['ENABLE_CERTIFICATES_INSTRUCTOR_MANAGE] # lint-amnesty, pylint: disable=annotation-missing-token
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Allow course instructors to manage certificates from the instructor dashboard.
# .. toggle_use_cases: opt_in
'ENABLE_CERTIFICATES_INSTRUCTOR_MANAGE': False,
# .. toggle_name: FEATURES['ENABLE_CERTIFICATES_INSTRUCTOR_MANAGE] # lint-amnesty, pylint: disable=annotation-missing-token
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Allow course instructors to manage certificates from the instructor dashboard.
# .. toggle_use_cases: opt_in
settings.ENABLE_CERTIFICATES_INSTRUCTOR_MANAGE = False
# .. toggle_name: FEATURES['BATCH_ENROLLMENT_NOTIFY_USERS_DEFAULT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Controls if the "Notify users by email" checkbox in the batch
# enrollment form on the instructor dashboard is already checked on page load or not.
# .. toggle_use_cases: opt_out
# .. toggle_creation_date: 2017-07-05
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15392
'BATCH_ENROLLMENT_NOTIFY_USERS_DEFAULT': True,
})
# .. toggle_name: FEATURES['BATCH_ENROLLMENT_NOTIFY_USERS_DEFAULT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Controls if the "Notify users by email" checkbox in the batch
# enrollment form on the instructor dashboard is already checked on page load or not.
# .. toggle_use_cases: opt_out
# .. toggle_creation_date: 2017-07-05
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15392
settings.BATCH_ENROLLMENT_NOTIFY_USERS_DEFAULT = True

View File

@@ -14,9 +14,9 @@ def plugin_settings(settings):
"ANALYTICS_DASHBOARD_NAME", settings.ANALYTICS_DASHBOARD_NAME
)
# Backward compatibility for deprecated feature names
if 'ENABLE_S3_GRADE_DOWNLOADS' in settings.FEATURES:
if hasattr(settings, 'ENABLE_S3_GRADE_DOWNLOADS'):
warnings.warn(
"'ENABLE_S3_GRADE_DOWNLOADS' is deprecated. Please use 'ENABLE_GRADE_DOWNLOADS' instead",
DeprecationWarning,
)
settings.FEATURES['ENABLE_GRADE_DOWNLOADS'] = settings.FEATURES['ENABLE_S3_GRADE_DOWNLOADS']
settings.ENABLE_GRADE_DOWNLOADS = settings.ENABLE_S3_GRADE_DOWNLOADS

View File

@@ -4,5 +4,5 @@
def plugin_settings(settings):
"""Settings for the instructor plugin."""
# Enable this feature for course staff grade downloads, to enable acceptance tests
settings.FEATURES['ENABLE_GRADE_DOWNLOADS'] = True
settings.FEATURES['ALLOW_COURSE_STAFF_GRADE_DOWNLOADS'] = True
settings.ENABLE_GRADE_DOWNLOADS = True
settings.ALLOW_COURSE_STAFF_GRADE_DOWNLOADS = True

View File

@@ -36,7 +36,7 @@ class MFEConfigView(APIView):
django settings. This is a temporary change as a part of the migration of some legacy
pages to MFEs. This is a temporary compatibility layer which will eventually be deprecated.
See [Link to DEPR ticket] for more details. todo: add link
See [DEPR ticket](https://github.com/openedx/edx-platform/issues/37210) for more details.
The compatability means that settings from the legacy locations will continue to work but
the settings listed below in the `_get_legacy_config` function should be added to the MFE

View File

@@ -3,7 +3,7 @@ Views for course info API
"""
import logging
from typing import Dict, Optional, Union
from typing import Dict, List, Optional, Union
import django
from django.contrib.auth import get_user_model
@@ -383,8 +383,8 @@ class BlocksInfoInCourseView(BlocksInCourseView):
response.data.update(course_data)
return response
@staticmethod
def _extend_sequential_info_with_assignment_progress(
self,
requested_user: User,
course_id: CourseKey,
blocks_info_data: Dict[str, Dict],
@@ -392,8 +392,11 @@ class BlocksInfoInCourseView(BlocksInCourseView):
"""
Extends sequential xblock info with assignment's name and progress.
"""
subsection_grades = get_assignments_grades(requested_user, course_id, BLOCK_STRUCTURE_CACHE_TIMEOUT)
subsection_grades, section_breakdown = (
get_assignments_grades(requested_user, course_id, BLOCK_STRUCTURE_CACHE_TIMEOUT)
)
grades_with_locations = {str(grade.location): grade for grade in subsection_grades}
id_to_label = self._id_to_label(section_breakdown)
for block_id, block_info in blocks_info_data.items():
if block_info['type'] == 'sequential':
@@ -403,8 +406,9 @@ class BlocksInfoInCourseView(BlocksInCourseView):
points_earned = graded_total.earned if graded_total else 0
points_possible = graded_total.possible if graded_total else 0
assignment_type = grade.format
label = id_to_label.get(block_id)
else:
points_earned, points_possible, assignment_type = 0, 0, None
points_earned, points_possible, assignment_type, label = 0, 0, None, None
block_info.update(
{
@@ -412,10 +416,22 @@ class BlocksInfoInCourseView(BlocksInCourseView):
'assignment_type': assignment_type,
'num_points_earned': points_earned,
'num_points_possible': points_possible,
'short_label': label,
}
}
)
@staticmethod
def _id_to_label(section_breakdown: List[Dict]) -> Dict[str, str]:
"""
Get `sequential_id` to assignment `label` mapping.
"""
return {
section['sequential_id']: section['label']
for section in section_breakdown
if 'sequential_id' in section and section['sequential_id'] is not None
}
@mobile_view()
class CourseEnrollmentDetailsView(APIView):

View File

@@ -409,12 +409,14 @@ class TestBlocksInfoInCourseView(TestBlocksInCourseView, MilestonesTestCaseMixin
{
'assignment_type': 'Lecture Sequence',
'num_points_earned': 0.0,
'num_points_possible': 0.0
'num_points_possible': 0.0,
'short_label': None,
},
{
'assignment_type': None,
'num_points_earned': 0.0,
'num_points_possible': 0.0
'num_points_possible': 0.0,
'short_label': None,
},
)

View File

@@ -65,1007 +65,651 @@ from enterprise.constants import (
)
from openedx.core.lib.derived import Derived
from openedx.core.release import doc_version
from openedx.envs.common import * # pylint: disable=wildcard-import
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
from openedx.core.lib.features_setting_proxy import FeaturesProxy
# A proxy for feature flags stored in the settings namespace
FEATURES = FeaturesProxy(globals())
################################### FEATURES ###################################
# .. setting_name: PLATFORM_NAME
# .. setting_default: Your Platform Name Here
# .. setting_description: The display name of the platform to be used in
# templates/emails/etc.
PLATFORM_NAME = _('Your Platform Name Here')
PLATFORM_DESCRIPTION = _('Your Platform Description Here')
CC_MERCHANT_NAME = Derived(lambda settings: settings.PLATFORM_NAME)
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
ENABLE_JASMINE = False
# Features
FEATURES = {
# .. toggle_name: FEATURES['DISPLAY_DEBUG_INFO_TO_STAFF']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Add a "Staff Debug" button to course blocks for debugging
# by course staff.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-09-04
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2425
'DISPLAY_DEBUG_INFO_TO_STAFF': True,
# .. toggle_name: FEATURES['DISPLAY_HISTOGRAMS_TO_STAFF']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: This displays histograms in the Staff Debug Info panel to course staff.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-02-13
# .. toggle_warning: Generating histograms requires scanning the courseware_studentmodule table on each view. This
# can make staff access to courseware very slow on large courses.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2425
'DISPLAY_HISTOGRAMS_TO_STAFF': False, # For large courses this slows down courseware access for staff.
'REROUTE_ACTIVATION_EMAIL': False, # nonempty string = address for all activation emails
# .. toggle_name: FEATURES['DISABLE_START_DATES']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When True, all courses will be active, regardless of start
# date.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2012-07-24
# .. toggle_warning: This will cause ALL courses to be immediately visible.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/17913
## DO NOT SET TO True IN THIS FILE
## Doing so will cause all courses to be released on production
'DISABLE_START_DATES': False,
# .. toggle_name: FEATURES['ENABLE_DISCUSSION_SERVICE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When True, it will enable the Discussion tab in courseware for all courses. Setting this
# to False will not contain inline discussion components and discussion tab in any courses.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2012-08-14
# .. toggle_warning: If the discussion panel is present in the course and the value for this flag is False then,
# attempting to expand those components will cause errors. So, this should only be set to False with an LMS that
# is running courses that do not contain discussion components.
# For consistency in user-experience, keep the value in sync with the setting of the same name in the CMS.
'ENABLE_DISCUSSION_SERVICE': True,
# .. toggle_name: FEATURES['ENABLE_TEXTBOOK']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Add PDF and HTML textbook tabs to the courseware.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-03-27
# .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name
# in the CMS.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/3064
'ENABLE_TEXTBOOK': True,
# .. toggle_name: FEATURES['ENABLE_DISCUSSION_HOME_PANEL']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Hides or displays a welcome panel under the Discussion tab, which includes a subscription
# on/off setting for discussion digest emails.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-07-30
# .. toggle_warning: This should remain off in production until digest notifications are online.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/520
'ENABLE_DISCUSSION_HOME_PANEL': False,
# .. toggle_name: FEATURES['ENABLE_DISCUSSION_EMAIL_DIGEST']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set this to True if you want the discussion digest emails
# enabled automatically for new users. This will be set on all new account
# registrations.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-08-19
# .. toggle_target_removal_date: None
# .. toggle_warning: It is not recommended to enable this feature if ENABLE_DISCUSSION_HOME_PANEL is not enabled,
# since subscribers who receive digests in that case will only be able to unsubscribe via links embedded in
# their emails, and they will have no way to resubscribe.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/4891
'ENABLE_DISCUSSION_EMAIL_DIGEST': False,
# .. toggle_name: FEATURES['ENABLE_UNICODE_USERNAME']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set this to True to allow unicode characters in username. Enabling this will also
# automatically enable SOCIAL_AUTH_CLEAN_USERNAMES. When this is enabled, usernames will have to match the
# regular expression defined by USERNAME_REGEX_PARTIAL.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-06-27
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/14729
'ENABLE_UNICODE_USERNAME': False,
# .. toggle_name: FEATURES['ENABLE_DJANGO_ADMIN_SITE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Set to False if you want to disable Django's admin site.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-09-26
# .. toggle_warning: It is not recommended to disable this feature as there are many settings available on
# Django's admin site and will be inaccessible to the superuser.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/829
'ENABLE_DJANGO_ADMIN_SITE': True,
'ENABLE_LMS_MIGRATION': False,
# .. toggle_name: FEATURES['ENABLE_MASQUERADE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: None
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-04-13
'ENABLE_MASQUERADE': True,
# .. toggle_name: FEATURES['DISABLE_LOGIN_BUTTON']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Removes the display of the login button in the navigation bar.
# Change is only at the UI level. Used in systems where login is automatic, eg MIT SSL
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-12-03
'DISABLE_LOGIN_BUTTON': False,
# .. toggle_name: FEATURES['ENABLE_OAUTH2_PROVIDER']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable this feature to allow this Open edX platform to be an OAuth2 authentication
# provider. This is necessary to enable some other features, such as the REST API for the mobile application.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2014-09-09
# .. toggle_target_removal_date: None
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
'ENABLE_OAUTH2_PROVIDER': False,
# .. toggle_name: FEATURES['ENABLE_XBLOCK_VIEW_ENDPOINT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable an API endpoint, named "xblock_view", to serve rendered XBlock views. This might be
# used by external applications. See for instance jquery-xblock (now unmaintained):
# https://github.com/openedx/jquery-xblock
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-03-14
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2968
'ENABLE_XBLOCK_VIEW_ENDPOINT': False,
# Allows to configure the LMS to provide CORS headers to serve requests from other
# domains
'ENABLE_CORS_HEADERS': False,
# Can be turned off if course lists need to be hidden. Effects views and templates.
# .. toggle_name: FEATURES['COURSES_ARE_BROWSABLE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When this is set to True, all the courses will be listed on the /courses page and Explore
# Courses link will be visible. Set to False if courses list and Explore Courses link need to be hidden.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-09-28
# .. toggle_warning: This Effects views and templates.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1073
'COURSES_ARE_BROWSABLE': True,
# Can be turned off to disable the help link in the navbar
# .. toggle_name: FEATURES['ENABLE_HELP_LINK']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When True, a help link is displayed on the main navbar. Set False to hide it.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-03-05
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/26106
'ENABLE_HELP_LINK': True,
# .. toggle_name: FEATURES['HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set, it hides the Courses list on the Learner Dashboard page if the learner has not
# yet activated the account and not enrolled in any courses.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-05-18
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1814
'HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED': False,
# .. toggle_name: FEATURES['ENABLE_STUDENT_HISTORY_VIEW']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: This provides a UI to show a student's submission history in a problem by the Staff Debug
# tool. Set to False if you want to hide Submission History from the courseware page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-02-15
# .. toggle_tickets: https://github.com/openedx/edx-platform/commit/8f17e6ae9ed76fa75b3caf867b65ccb632cb6870
'ENABLE_STUDENT_HISTORY_VIEW': True,
# Turn on a page that lets staff enter Python code to be run in the
# sandbox, for testing whether it's enabled properly.
'ENABLE_DEBUG_RUN_PYTHON': False,
# Enable URL that shows information about the status of various services
'ENABLE_SERVICE_STATUS': False,
# Don't autoplay videos for students
'AUTOPLAY_VIDEOS': False,
# Move the student to next page when a video finishes. Set to True to show
# an auto-advance button in videos. If False, videos never auto-advance.
'ENABLE_AUTOADVANCE_VIDEOS': False,
# Enable instructor dash to submit background tasks
'ENABLE_INSTRUCTOR_BACKGROUND_TASKS': True,
# Enable instructor to assign individual due dates
# Note: In order for this feature to work, you must also add
# 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider' to
# the setting FIELD_OVERRIDE_PROVIDERS, in addition to setting this flag to
# True.
'INDIVIDUAL_DUE_DATES': False,
# .. toggle_name: CUSTOM_COURSES_EDX
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable Custom Courses for edX, a feature that is more commonly known as
# CCX. Documentation for configuring and using this feature is available at
# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/enable_ccx.html
# .. toggle_warning: When set to true, 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider' will
# be added to MODULESTORE_FIELD_OVERRIDE_PROVIDERS
# .. toggle_use_cases: opt_in, circuit_breaker
# .. toggle_creation_date: 2015-04-10
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6636
'CUSTOM_COURSES_EDX': False,
# Toggle to enable certificates of courses on dashboard
'ENABLE_VERIFIED_CERTIFICATES': False,
# Settings for course import olx validation
'ENABLE_COURSE_OLX_VALIDATION': False,
# .. toggle_name: FEATURES['DISABLE_HONOR_CERTIFICATES']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to disable honor certificates. Typically used when your installation only
# allows verified certificates, like courses.edx.org.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2019-05-14
# .. toggle_tickets: https://openedx.atlassian.net/browse/PROD-269
'DISABLE_HONOR_CERTIFICATES': False, # Toggle to disable honor certificates
'DISABLE_AUDIT_CERTIFICATES': False, # Toggle to disable audit certificates
# .. toggle_name: FEATURES['AUTOMATIC_AUTH_FOR_TESTING']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to perform acceptance and load test. Auto auth view is responsible for load
# testing and is controlled by this feature flag. Session verification (of CacheBackedAuthenticationMiddleware)
# is a security feature, but it can be turned off by enabling this feature flag.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-07-25
# .. toggle_warning: If this has been set to True then the account activation email will be skipped.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/417
'AUTOMATIC_AUTH_FOR_TESTING': False,
# .. toggle_name: FEATURES['RESTRICT_AUTOMATIC_AUTH']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Prevent auto auth from creating superusers or modifying existing users. Auto auth is a
# mechanism where superusers can simply modify attributes of other users by accessing the "/auto_auth url" with
# the right
# querystring parameters.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-05-07
# .. toggle_tickets: https://openedx.atlassian.net/browse/TE-2545
'RESTRICT_AUTOMATIC_AUTH': True,
# .. toggle_name: FEATURES['ENABLE_LOGIN_MICROFRONTEND']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable the login micro frontend.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-05-07
# .. toggle_warning: The login MFE domain name should be listed in LOGIN_REDIRECT_WHITELIST.
'ENABLE_LOGIN_MICROFRONTEND': False,
# .. toggle_name: FEATURES['SKIP_EMAIL_VALIDATION']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Turn this on to skip sending emails for user validation.
# Beware, as this leaves the door open to potential spam abuse.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-05-07
# .. toggle_warning: The login MFE domain name should be listed in LOGIN_REDIRECT_WHITELIST.
'SKIP_EMAIL_VALIDATION': False,
# .. toggle_name: FEATURES['ENABLE_COSMETIC_DISPLAY_PRICE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable the display of "cosmetic_display_price", set in a course advanced settings. This
# cosmetic price is used when there is no registration price associated to the course.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-10-10
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6876
# .. toggle_warning: The use case of this feature toggle is uncertain.
'ENABLE_COSMETIC_DISPLAY_PRICE': False,
# Automatically approve student identity verification attempts
# .. toggle_name: FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If set to True, then we want to skip posting anything to Software Secure. Bypass posting
# anything to Software Secure if the auto verify feature for testing is enabled. We actually don't even create
# the message because that would require encryption and message signing that rely on settings.VERIFY_STUDENT
# values that aren't set in dev. So we just pretend like we successfully posted and automatically approve student
# identity verification attempts.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-10-03
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1184
'AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING': False,
# Maximum number of rows to include in the csv file for downloading problem responses.
'MAX_PROBLEM_RESPONSES_COUNT': 5000,
'ENABLED_PAYMENT_REPORTS': [
"refund_report",
"itemized_purchase_report",
"university_revenue_share",
"certificate_status"
],
# Turn off account locking if failed login attempts exceeds a limit
# .. toggle_name: FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: This feature will keep track of the number of failed login attempts on a given user's
# email. If the number of consecutive failed login attempts - without a successful login at some point - reaches
# a configurable threshold (default 6), then the account will be locked for a configurable amount of seconds
# (30 minutes) which will prevent additional login attempts until this time period has passed. If a user
# successfully logs in, all the counter which tracks the number of failed attempts will be reset back to 0. If
# set to False then account locking will be disabled for failed login attempts.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-01-30
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2331
'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': True,
# Hide any Personally Identifiable Information from application logs
'SQUELCH_PII_IN_LOGS': True,
# .. toggle_name: FEATURES['EMBARGO']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Turns on embargo functionality, which blocks users from
# the site or courses based on their location. Embargo can restrict users by states
# and whitelist/blacklist (IP Addresses (ie. 10.0.0.0), Networks (ie. 10.0.0.0/24)), or the user profile country.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-02-27
# .. toggle_target_removal_date: None
# .. toggle_warning: reverse proxy should be configured appropriately for example Client IP address headers
# (e.g HTTP_X_FORWARDED_FOR) should be configured.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2749
'EMBARGO': False,
# Whether the Wiki subsystem should be accessible via the direct /wiki/ paths. Setting this to True means
# that people can submit content and modify the Wiki in any arbitrary manner. We're leaving this as True in the
# defaults, so that we maintain current behavior
'ALLOW_WIKI_ROOT_ACCESS': True,
# .. toggle_name: FEATURES['ENABLE_THIRD_PARTY_AUTH']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Turn on third-party auth. Disabled for now because full implementations are not yet
# available. Remember to run migrations if you enable this; we don't create tables by default. This feature can
# be enabled on a per-site basis. When enabling this feature, remember to define the allowed authentication
# backends with the AUTHENTICATION_BACKENDS setting.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-09-15
'ENABLE_THIRD_PARTY_AUTH': False,
# .. toggle_name: FEATURES['ENABLE_MKTG_SITE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Toggle to enable alternate urls for marketing links.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-03-24
# .. toggle_warning: When this is enabled, the MKTG_URLS setting should be defined. The use case of this feature
# toggle is uncertain.
'ENABLE_MKTG_SITE': False,
# Prevent concurrent logins per user
'PREVENT_CONCURRENT_LOGINS': True,
# .. toggle_name: FEATURES['ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When a logged in user goes to the homepage ('/') the user will be redirected to the
# dashboard page when this flag is set to True - this is default Open edX behavior. Set to False to not redirect
# the user.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-09-16
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5220
'ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER': True,
# .. toggle_name: FEATURES['ENABLE_COURSE_SORTING_BY_START_DATE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When a user goes to the homepage ('/') the user sees the courses listed in the
# announcement dates order - this is default Open edX behavior. Set to True to change the course sorting behavior
# by their start dates, latest first.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-03-27
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7548
'ENABLE_COURSE_SORTING_BY_START_DATE': True,
# .. toggle_name: FEATURES['ENABLE_COURSE_HOME_REDIRECT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When enabled, along with the ENABLE_MKTG_SITE feature toggle, users who attempt to access a
# course "about" page will be redirected to the course home url.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2019-01-15
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/19604
'ENABLE_COURSE_HOME_REDIRECT': True,
# Expose Mobile REST API. Note that if you use this, you must also set
# ENABLE_OAUTH2_PROVIDER to True
'ENABLE_MOBILE_REST_API': False,
# .. toggle_name: FEATURES['ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Display the standard footer in the login page. This feature can be overridden by a site-
# specific configuration.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2016-06-24
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1320
'ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER': False,
# Enable organizational email opt-in
'ENABLE_MKTG_EMAIL_OPT_IN': False,
# .. toggle_name: FEATURES['ENABLE_FOOTER_MOBILE_APP_LINKS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True if you want show the mobile app links (Apple App Store & Google Play Store) in
# the footer.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-01-13
# .. toggle_warning: If you set this to True then you should also set your mobile application's app store and play
# store URLs in the MOBILE_STORE_URLS settings dictionary. These links are not part of the default theme. If you
# want these links on your footer then you should use the edx.org theme.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6588
'ENABLE_FOOTER_MOBILE_APP_LINKS': False,
# Let students save and manage their annotations
# .. toggle_name: FEATURES['ENABLE_EDXNOTES']
# .. toggle_implementation: SettingToggle
# .. toggle_default: False
# .. toggle_description: This toggle enables the students to save and manage their annotations in the
# course using the notes service. The bulk of the actual work in storing the notes is done by
# a separate service (see the edx-notes-api repo).
# .. toggle_warning: Requires the edx-notes-api service properly running and to have configured the django settings
# EDXNOTES_INTERNAL_API and EDXNOTES_PUBLIC_API. If you update this setting, also update it in Studio.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-01-04
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6321
'ENABLE_EDXNOTES': False,
# Toggle to enable coordination with the Publisher tool (keep in sync with cms/envs/common.py)
'ENABLE_PUBLISHER': False,
# Milestones application flag
'MILESTONES_APP': False,
# Prerequisite courses feature flag
'ENABLE_PREREQUISITE_COURSES': False,
# For easily adding modes to courses during acceptance testing
'MODE_CREATION_FOR_TESTING': False,
# For caching programs in contexts where the LMS can only
# be reached over HTTP.
'EXPOSE_CACHE_PROGRAMS_ENDPOINT': False,
# Courseware search feature
# .. toggle_name: FEATURES['ENABLE_COURSEWARE_SEARCH']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this adds a Search the course widget on the course outline and courseware
# pages for searching courseware data.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-01-29
# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. You will
# see the search widget on the courseware page only if the DISABLE_COURSE_OUTLINE_PAGE_FLAG is set.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6506
'ENABLE_COURSEWARE_SEARCH': False,
# .. toggle_name: FEATURES['ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this adds a Search the course widget on the course outline and courseware
# pages for searching courseware data but for course staff users only.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2019-12-06
# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. If
# ENABLE_COURSEWARE_SEARCH is enabled then the search widget will be visible to all learners and this flag's
# value does not matter in that case. This flag is enabled in devstack by default.
# .. toggle_tickets: https://openedx.atlassian.net/browse/TNL-6931
'ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF': False,
# Dashboard search feature
# .. toggle_name: FEATURES['ENABLE_DASHBOARD_SEARCH']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this adds a Search Your Courses widget on the dashboard page for searching
# courseware data.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-01-29
# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6506
'ENABLE_DASHBOARD_SEARCH': False,
# log all information from cybersource callbacks
'LOG_POSTPAY_CALLBACKS': True,
# .. toggle_name: FEATURES['LICENSING']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Toggle platform-wide course licensing. The course.license attribute is then used to append
# license information to the courseware.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-05-14
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7315
'LICENSING': False,
# .. toggle_name: FEATURES['CERTIFICATES_HTML_VIEW']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable course certificates on your instance of Open edX.
# .. toggle_warning: You must enable this feature flag in both Studio and the LMS and complete the configuration tasks
# described here:
# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/enable_certificates.html pylint: disable=line-too-long,useless-suppression
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-03-13
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7113
'CERTIFICATES_HTML_VIEW': False,
# .. toggle_name: FEATURES['CUSTOM_CERTIFICATE_TEMPLATES_ENABLED']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable custom certificate templates which are configured via Django admin.
# .. toggle_warning: None
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-08-13
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/SOL-1044
'CUSTOM_CERTIFICATE_TEMPLATES_ENABLED': False,
# .. toggle_name: FEATURES['ENABLE_COURSE_DISCOVERY']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Add a course search widget to the LMS for searching courses. When this is enabled, the
# latest courses are no longer displayed on the LMS landing page. Also, an "Explore Courses" item is added to the
# navbar.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-04-23
# .. toggle_target_removal_date: None
# .. toggle_warning: The COURSE_DISCOVERY_MEANINGS setting should be properly defined.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7845
'ENABLE_COURSE_DISCOVERY': False,
# .. toggle_name: FEATURES['ENABLE_COURSE_FILENAME_CCX_SUFFIX']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If set to True, CCX ID will be included in the generated filename for CCX courses.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-03-16
# .. toggle_target_removal_date: None
# .. toggle_tickets: None
# .. toggle_warning: Turning this feature ON will affect all generated filenames which are related to CCX courses.
'ENABLE_COURSE_FILENAME_CCX_SUFFIX': False,
# Setting for overriding default filtering facets for Course discovery
# COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"]
# Software secure fake page feature flag
'ENABLE_SOFTWARE_SECURE_FAKE': False,
# Teams feature
'ENABLE_TEAMS': True,
# Show video bumper in LMS
'ENABLE_VIDEO_BUMPER': False,
# How many seconds to show the bumper again, default is 7 days:
'SHOW_BUMPER_PERIODICITY': 7 * 24 * 3600,
# .. toggle_name: FEATURES['ENABLE_SPECIAL_EXAMS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to use special exams, aka timed and proctored exams.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-09-04
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/9744
'ENABLE_SPECIAL_EXAMS': False,
# .. toggle_name: FEATURES['ENABLE_LTI_PROVIDER']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True, Open edX site can be used as an LTI Provider to other systems
# and applications.
# .. toggle_warning: After enabling this feature flag there are multiple steps involved to configure edX
# as LTI provider. Full guide is available here:
# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/lti/index.html
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-04-24
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7689
'ENABLE_LTI_PROVIDER': False,
# .. toggle_name: FEATURES['SHOW_HEADER_LANGUAGE_SELECTOR']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True, language selector will be visible in the header.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-05-25
# .. toggle_warning: You should set the languages in the DarkLangConfig table to get this working. If you have
# not set any languages in the DarkLangConfig table then the language selector will not be visible in the header.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15133
'SHOW_HEADER_LANGUAGE_SELECTOR': False,
# At edX it's safe to assume that English transcripts are always available
# This is not the case for all installations.
# The default value in {lms,cms}/envs/common.py and xmodule/tests/test_video.py should be consistent.
'FALLBACK_TO_ENGLISH_TRANSCRIPTS': True,
# .. toggle_name: FEATURES['SHOW_FOOTER_LANGUAGE_SELECTOR']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True, language selector will be visible in the footer.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-05-25
# .. toggle_warning: LANGUAGE_COOKIE_NAME is required to use footer-language-selector, set it if it has not been set.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15133
'SHOW_FOOTER_LANGUAGE_SELECTOR': False,
# .. toggle_name: FEATURES['ENABLE_CSMH_EXTENDED']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Write Courseware Student Module History (CSMH) to the extended table: this logs all
# student activities to MySQL, in a separate database.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-11-05
# .. toggle_warning: Even though most Open edX instances run with a separate CSMH database, it may not always be
# the case. When disabling this feature flag, remember to remove "lms.djangoapps.coursewarehistoryextended"
# from the INSTALLED_APPS and the "StudentModuleHistoryExtendedRouter" from the DATABASE_ROUTERS.
'ENABLE_CSMH_EXTENDED': True,
# Read from both the CSMH and CSMHE history tables.
# This is the default, but can be disabled if all history
# lives in the Extended table, saving the frontend from
# making multiple queries.
'ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES': True,
# Set this to False to facilitate cleaning up invalid xml from your modulestore.
'ENABLE_XBLOCK_XML_VALIDATION': True,
# .. toggle_name: FEATURES['ALLOW_PUBLIC_ACCOUNT_CREATION']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Allow public account creation. If this is disabled, users will no longer have access to
# the signup page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-04-12
# .. toggle_tickets: https://openedx.atlassian.net/browse/YONK-513
'ALLOW_PUBLIC_ACCOUNT_CREATION': True,
# .. toggle_name: FEATURES['SHOW_REGISTRATION_LINKS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Allow registration links. If this is disabled, users will no longer see buttons to the
# the signup page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-03-27
'SHOW_REGISTRATION_LINKS': True,
# .. toggle_name: FEATURES['ENABLE_COOKIE_CONSENT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable header banner for cookie consent using this service:
# https://cookieconsent.insites.com/
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-03-03
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1560
'ENABLE_COOKIE_CONSENT': False,
# Whether or not the dynamic EnrollmentTrackUserPartition should be registered.
'ENABLE_ENROLLMENT_TRACK_USER_PARTITION': True,
# Enable one click program purchase
# See LEARNER-493
'ENABLE_ONE_CLICK_PROGRAM_PURCHASE': False,
# .. toggle_name: FEATURES['ALLOW_EMAIL_ADDRESS_CHANGE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Allow users to change their email address on the Account Settings page. If this is
# disabled, users will not be able to change their email address.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-06-26
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1735
'ALLOW_EMAIL_ADDRESS_CHANGE': True,
# .. toggle_name: FEATURES['ENABLE_BULK_ENROLLMENT_VIEW']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True the bulk enrollment view is enabled and one can use it to enroll multiple
# users in a course using bulk enrollment API endpoint (/api/bulk_enroll/v1/bulk_enroll).
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-07-15
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15006
'ENABLE_BULK_ENROLLMENT_VIEW': False,
# Set to enable Enterprise integration
'ENABLE_ENTERPRISE_INTEGRATION': False,
# .. toggle_name: FEATURES['ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether HTML Block returns HTML content with the Course Blocks API when the API
# is called with student_view_data=html query parameter.
# .. toggle_warning: Because the Course Blocks API caches its data, the cache must be cleared (e.g. by
# re-publishing the course) for changes to this flag to take effect.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-08-28
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1880
'ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA': False,
# .. toggle_name: FEATURES['ENABLE_PASSWORD_RESET_FAILURE_EMAIL']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether to send an email for failed password reset attempts or not. This happens when a
# user asks for a password reset but they don't have an account associated to their email. This is useful for
# notifying users that they don't have an account associated with email addresses they believe they've registered
# with. This setting can be overridden by a site-specific configuration.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-07-20
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1832
'ENABLE_PASSWORD_RESET_FAILURE_EMAIL': False,
# Sets the default browser support. For more information go to http://browser-update.org/customize.html
'UNSUPPORTED_BROWSER_ALERT_VERSIONS': "{i:10,f:-3,o:-3,s:-3,c:-3}",
# .. toggle_name: FEATURES['ENABLE_ACCOUNT_DELETION']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Whether to display the account deletion section on Account Settings page. Set to False to
# hide this section.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-06-01
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/18298
'ENABLE_ACCOUNT_DELETION': True,
# Enable feature to remove enrollments and users. Used to reset state of master's integration environments
'ENABLE_ENROLLMENT_RESET': False,
'DISABLE_MOBILE_COURSE_AVAILABLE': False,
# .. toggle_name: FEATURES['ENABLE_CHANGE_USER_PASSWORD_ADMIN']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable changing a user password through django admin. This is disabled by
# default because enabling allows a method to bypass password policy.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-02-21
# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/21616'
'ENABLE_CHANGE_USER_PASSWORD_ADMIN': False,
# .. toggle_name: FEATURES['ENABLE_AUTHN_MICROFRONTEND']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the logistration.
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2020-09-08
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/24908'
# .. toggle_warning: Also set settings.AUTHN_MICROFRONTEND_URL for rollout. This temporary feature
# toggle does not have a target removal date.
'ENABLE_AUTHN_MICROFRONTEND': os.environ.get("EDXAPP_ENABLE_AUTHN_MFE", False),
# .. toggle_name: FEATURES['ENABLE_CATALOG_MICROFRONTEND']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the catalog.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2025-05-15
# .. toggle_target_removal_date: 2025-11-01
'ENABLE_CATALOG_MICROFRONTEND': False,
### ORA Feature Flags ###
# .. toggle_name: FEATURES['ENABLE_ORA_ALL_FILE_URLS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not
# discoverable. If enabled, will iterate through all possible file key suffixes up to the max for displaying
# file metadata in staff assessments.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
'ENABLE_ORA_ALL_FILE_URLS': False,
# .. toggle_name: FEATURES['ENABLE_ORA_USER_STATE_UPLOAD_DATA']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not
# discoverable. If enabled, will pull file metadata from StudentModule.state for display in staff assessments.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
'ENABLE_ORA_USER_STATE_UPLOAD_DATA': False,
# .. toggle_name: FEATURES['ENABLE_ORA_USERNAMES_ON_DATA_EXPORT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to add deanonymized usernames to ORA data
# report.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-06-11
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/TNL-7273
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
'ENABLE_ORA_USERNAMES_ON_DATA_EXPORT': False,
# .. toggle_name: FEATURES['ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to start sending signals for assessment level grade updates. Notably, the only
# handler of this signal at the time of this writing sends assessment updates to enterprise integrated channels.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-12-09
# .. toggle_target_removal_date: 2021-02-01
# .. toggle_tickets: https://openedx.atlassian.net/browse/ENT-3818
'ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL': False,
# .. toggle_name: FEATURES['ALLOW_ADMIN_ENTERPRISE_COURSE_ENROLLMENT_DELETION']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If true, allows for the deletion of EnterpriseCourseEnrollment records via Django Admin.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2021-01-27
# .. toggle_tickets: https://openedx.atlassian.net/browse/ENT-4022
'ALLOW_ADMIN_ENTERPRISE_COURSE_ENROLLMENT_DELETION': False,
# .. toggle_name: FEATURES['ENABLE_BULK_USER_RETIREMENT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable bulk user retirement through REST API. This is disabled by
# default.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-03-11
# .. toggle_target_removal_date: None
# .. toggle_warning: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/OSPR-5290'
'ENABLE_BULK_USER_RETIREMENT': False,
# .. toggle_name: FEATURES['ENABLE_INTEGRITY_SIGNATURE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether to display honor code agreement for learners before their first grade assignment
# (https://github.com/edx/edx-name-affirmation)
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-02-15
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1348'
'ENABLE_INTEGRITY_SIGNATURE': False,
# .. toggle_name: FEATURES['ENABLE_LTI_PII_ACKNOWLEDGEMENT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables the lti pii acknowledgement feature for a course
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-10
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://2u-internal.atlassian.net/browse/MST-2055'
'ENABLE_LTI_PII_ACKNOWLEDGEMENT': False,
# .. toggle_name: FEATURES['ENABLE_NEW_BULK_EMAIL_EXPERIENCE']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When true, replaces the bulk email tool found on the
# instructor dashboard with a link to the new communications MFE version instead.
# Setting the tool to false will leave the old bulk email tool experience in place.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2022-03-21
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MICROBA-1758'
'ENABLE_NEW_BULK_EMAIL_EXPERIENCE': False,
# .. toggle_name: MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If enabled, the Library Content Block is marked as complete when users view it.
# Otherwise (by default), all children of this block must be completed.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-03-22
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/28268
# .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name
# in the LMS and CMS.
'MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW': False,
# .. toggle_name: FEATURES['DISABLE_UNENROLLMENT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to disable self-unenrollments via REST API.
# This also hides the "Unenroll" button on the Learner Dashboard.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-10-11
# .. toggle_warning: For consistency in user experience, keep the value in sync with the setting of the same name
# in the LMS and CMS.
# .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429'
'DISABLE_UNENROLLMENT': False,
# .. toggle_name: FEATURES['ENABLE_CERTIFICATES_IDV_REQUIREMENT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether to enforce ID Verification requirements for course certificates generation
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-04-26
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1458'
'ENABLE_CERTIFICATES_IDV_REQUIREMENT': False,
# .. toggle_name: FEATURES['DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to disable enrollment for user invited to a course
# .. if user is registering before enrollment start date or after enrollment end date
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-06-06
# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/29538'
'DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED': False,
# .. toggle_name: FEATURES['SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS']
# .. toggle_implementation: SettingToggle
# .. toggle_default: False
# .. toggle_description: When True, the system will publish certificate lifecycle signals to the event bus.
# This toggle is used to create the EVENT_BUS_PRODUCER_CONFIG setting.
# .. toggle_warning: The default may be changed in a later release. See
# https://github.com/openedx/openedx-events/issues/265
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2023-10-10
# .. toggle_tickets: https://github.com/openedx/openedx-events/issues/210
'SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS': False,
# .. toggle_name: FEATURES['ENABLE_GRADING_METHOD_IN_PROBLEMS']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables the grading method feature in capa problems.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-03-22
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33911
'ENABLE_GRADING_METHOD_IN_PROBLEMS': False,
# .. toggle_name: FEATURES['ENABLE_COURSEWARE_SEARCH_VERIFIED_REQUIRED']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, the courseware search feature will only be enabled
# for users in a verified enrollment track.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-04-24
'ENABLE_COURSEWARE_SEARCH_VERIFIED_ENROLLMENT_REQUIRED': False,
# .. toggle_name: FEATURES['BADGES_ENABLED']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable badges functionality.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-04-02
# .. toggle_target_removal_date: None
'BADGES_ENABLED': False,
}
# .. toggle_name: settings.DISPLAY_DEBUG_INFO_TO_STAFF
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Add a "Staff Debug" button to course blocks for debugging
# by course staff.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-09-04
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2425
DISPLAY_DEBUG_INFO_TO_STAFF = True
# .. toggle_name: settings.DISPLAY_HISTOGRAMS_TO_STAFF
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: This displays histograms in the Staff Debug Info panel to course staff.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-02-13
# .. toggle_warning: Generating histograms requires scanning the courseware_studentmodule table on each view. This
# can make staff access to courseware very slow on large courses.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2425
DISPLAY_HISTOGRAMS_TO_STAFF = False # For large courses this slows down courseware access for staff.
REROUTE_ACTIVATION_EMAIL = False # nonempty string = address for all activation emails
# .. toggle_name: settings.ENABLE_DISCUSSION_HOME_PANEL
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Hides or displays a welcome panel under the Discussion tab, which includes a subscription
# on/off setting for discussion digest emails.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-07-30
# .. toggle_warning: This should remain off in production until digest notifications are online.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/520
ENABLE_DISCUSSION_HOME_PANEL = False
# .. toggle_name: settings.ENABLE_DISCUSSION_EMAIL_DIGEST
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set this to True if you want the discussion digest emails
# enabled automatically for new users. This will be set on all new account
# registrations.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-08-19
# .. toggle_target_removal_date: None
# .. toggle_warning: It is not recommended to enable this feature if ENABLE_DISCUSSION_HOME_PANEL is not enabled,
# since subscribers who receive digests in that case will only be able to unsubscribe via links embedded in
# their emails, and they will have no way to resubscribe.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/4891
ENABLE_DISCUSSION_EMAIL_DIGEST = False
# .. toggle_name: settings.ENABLE_UNICODE_USERNAME
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set this to True to allow unicode characters in username. Enabling this will also
# automatically enable SOCIAL_AUTH_CLEAN_USERNAMES. When this is enabled, usernames will have to match the
# regular expression defined by USERNAME_REGEX_PARTIAL.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-06-27
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/14729
ENABLE_UNICODE_USERNAME = False
# .. toggle_name: settings.ENABLE_DJANGO_ADMIN_SITE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Set to False if you want to disable Django's admin site.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-09-26
# .. toggle_warning: It is not recommended to disable this feature as there are many settings available on
# Django's admin site and will be inaccessible to the superuser.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/829
ENABLE_DJANGO_ADMIN_SITE = True
ENABLE_LMS_MIGRATION = False
# .. toggle_name: settings.ENABLE_MASQUERADE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: None
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-04-13
ENABLE_MASQUERADE = True
# .. toggle_name: settings.DISABLE_LOGIN_BUTTON
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Removes the display of the login button in the navigation bar.
# Change is only at the UI level. Used in systems where login is automatic, eg MIT SSL
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-12-03
DISABLE_LOGIN_BUTTON = False
# .. toggle_name: settings.ENABLE_XBLOCK_VIEW_ENDPOINT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable an API endpoint, named "xblock_view", to serve rendered XBlock views. This might be
# used by external applications. See for instance jquery-xblock (now unmaintained):
# https://github.com/openedx/jquery-xblock
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-03-14
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2968
ENABLE_XBLOCK_VIEW_ENDPOINT = False
# Can be turned off if course lists need to be hidden. Effects views and templates.
# .. toggle_name: settings.COURSES_ARE_BROWSABLE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When this is set to True, all the courses will be listed on the /courses page and Explore
# Courses link will be visible. Set to False if courses list and Explore Courses link need to be hidden.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-09-28
# .. toggle_warning: This Effects views and templates.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1073
COURSES_ARE_BROWSABLE = True
# .. toggle_name: settings.HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set, it hides the Courses list on the Learner Dashboard page if the learner has not
# yet activated the account and not enrolled in any courses.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-05-18
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1814
HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED = False
# .. toggle_name: settings.ENABLE_STUDENT_HISTORY_VIEW
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: This provides a UI to show a student's submission history in a problem by the Staff Debug
# tool. Set to False if you want to hide Submission History from the courseware page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-02-15
# .. toggle_tickets: https://github.com/openedx/edx-platform/commit/8f17e6ae9ed76fa75b3caf867b65ccb632cb6870
ENABLE_STUDENT_HISTORY_VIEW = True
# Turn on a page that lets staff enter Python code to be run in the
# sandbox, for testing whether it's enabled properly.
ENABLE_DEBUG_RUN_PYTHON = False
# Enable instructor dash to submit background tasks
ENABLE_INSTRUCTOR_BACKGROUND_TASKS = True
# Enable instructor to assign individual due dates
# Note: In order for this feature to work, you must also add
# 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider' to
# the setting FIELD_OVERRIDE_PROVIDERS, in addition to setting this flag to
# True.
INDIVIDUAL_DUE_DATES = False
# Toggle to enable certificates of courses on dashboard
ENABLE_VERIFIED_CERTIFICATES = False
# .. toggle_name: settings.DISABLE_HONOR_CERTIFICATES
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to disable honor certificates. Typically used when your installation only
# allows verified certificates, like courses.edx.org.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2019-05-14
# .. toggle_tickets: https://openedx.atlassian.net/browse/PROD-269
DISABLE_HONOR_CERTIFICATES = False # Toggle to disable honor certificates
DISABLE_AUDIT_CERTIFICATES = False # Toggle to disable audit certificates
# .. toggle_name: settings.ENABLE_LOGIN_MICROFRONTEND
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable the login micro frontend.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-05-07
# .. toggle_warning: The login MFE domain name should be listed in LOGIN_REDIRECT_WHITELIST.
ENABLE_LOGIN_MICROFRONTEND = False
# .. toggle_name: settings.SKIP_EMAIL_VALIDATION
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Turn this on to skip sending emails for user validation.
# Beware, as this leaves the door open to potential spam abuse.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-05-07
# .. toggle_warning: The login MFE domain name should be listed in LOGIN_REDIRECT_WHITELIST.
SKIP_EMAIL_VALIDATION = False
# .. toggle_name: settings.ENABLE_COSMETIC_DISPLAY_PRICE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable the display of "cosmetic_display_price", set in a course advanced settings. This
# cosmetic price is used when there is no registration price associated to the course.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-10-10
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6876
# .. toggle_warning: The use case of this feature toggle is uncertain.
ENABLE_COSMETIC_DISPLAY_PRICE = False
# Automatically approve student identity verification attempts
# .. toggle_name: settings.AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If set to True, then we want to skip posting anything to Software Secure. Bypass posting
# anything to Software Secure if the auto verify feature for testing is enabled. We actually don't even create
# the message because that would require encryption and message signing that rely on settings.VERIFY_STUDENT
# values that aren't set in dev. So we just pretend like we successfully posted and automatically approve student
# identity verification attempts.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-10-03
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1184
AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING = False
# Maximum number of rows to include in the csv file for downloading problem responses.
MAX_PROBLEM_RESPONSES_COUNT = 5000
ENABLED_PAYMENT_REPORTS = [
"refund_report",
"itemized_purchase_report",
"university_revenue_share",
"certificate_status"
]
# Turn off account locking if failed login attempts exceeds a limit
# .. toggle_name: settings.ENABLE_MAX_FAILED_LOGIN_ATTEMPTS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: This feature will keep track of the number of failed login attempts on a given user's
# email. If the number of consecutive failed login attempts - without a successful login at some point - reaches
# a configurable threshold (default 6), then the account will be locked for a configurable amount of seconds
# (30 minutes) which will prevent additional login attempts until this time period has passed. If a user
# successfully logs in, all the counter which tracks the number of failed attempts will be reset back to 0. If
# set to False then account locking will be disabled for failed login attempts.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-01-30
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2331
ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = True
# Hide any Personally Identifiable Information from application logs
SQUELCH_PII_IN_LOGS = True
# Whether the Wiki subsystem should be accessible via the direct /wiki/ paths. Setting this to True means
# that people can submit content and modify the Wiki in any arbitrary manner. We're leaving this as True in the
# defaults, so that we maintain current behavior
ALLOW_WIKI_ROOT_ACCESS = True
# .. toggle_name: settings.ENABLE_THIRD_PARTY_AUTH
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Turn on third-party auth. Disabled for now because full implementations are not yet
# available. Remember to run migrations if you enable this; we don't create tables by default. This feature can
# be enabled on a per-site basis. When enabling this feature, remember to define the allowed authentication
# backends with the AUTHENTICATION_BACKENDS setting.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-09-15
ENABLE_THIRD_PARTY_AUTH = False
# Prevent concurrent logins per user
PREVENT_CONCURRENT_LOGINS = True
# .. toggle_name: settings.ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When a logged in user goes to the homepage ('/') the user will be redirected to the
# dashboard page when this flag is set to True - this is default Open edX behavior. Set to False to not redirect
# the user.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-09-16
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5220
ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER = True
# .. toggle_name: settings.ENABLE_COURSE_SORTING_BY_START_DATE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When a user goes to the homepage ('/') the user sees the courses listed in the
# announcement dates order - this is default Open edX behavior. Set to True to change the course sorting behavior
# by their start dates, latest first.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-03-27
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7548
ENABLE_COURSE_SORTING_BY_START_DATE = True
# .. toggle_name: settings.ENABLE_COURSE_HOME_REDIRECT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When enabled, along with the ENABLE_MKTG_SITE feature toggle, users who attempt to access a
# course "about" page will be redirected to the course home url.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2019-01-15
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/19604
ENABLE_COURSE_HOME_REDIRECT = True
# .. toggle_name: settings.ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Display the standard footer in the login page. This feature can be overridden by a site-
# specific configuration.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2016-06-24
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1320
ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER = False
# Enable organizational email opt-in
ENABLE_MKTG_EMAIL_OPT_IN = False
# .. toggle_name: settings.ENABLE_FOOTER_MOBILE_APP_LINKS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True if you want show the mobile app links (Apple App Store & Google Play Store) in
# the footer.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-01-13
# .. toggle_warning: If you set this to True then you should also set your mobile application's app store and play
# store URLs in the MOBILE_STORE_URLS settings dictionary. These links are not part of the default theme. If you
# want these links on your footer then you should use the edx.org theme.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6588
ENABLE_FOOTER_MOBILE_APP_LINKS = False
# For easily adding modes to courses during acceptance testing
MODE_CREATION_FOR_TESTING = False
# For caching programs in contexts where the LMS can only
# be reached over HTTP.
EXPOSE_CACHE_PROGRAMS_ENDPOINT = False
# Courseware search feature
# .. toggle_name: settings.ENABLE_COURSEWARE_SEARCH
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this adds a Search the course widget on the course outline and courseware
# pages for searching courseware data.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-01-29
# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. You will
# see the search widget on the courseware page only if the DISABLE_COURSE_OUTLINE_PAGE_FLAG is set.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6506
ENABLE_COURSEWARE_SEARCH = False
# .. toggle_name: settings.ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this adds a Search the course widget on the course outline and courseware
# pages for searching courseware data but for course staff users only.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2019-12-06
# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. If
# ENABLE_COURSEWARE_SEARCH is enabled then the search widget will be visible to all learners and this flag's
# value does not matter in that case. This flag is enabled in devstack by default.
# .. toggle_tickets: https://openedx.atlassian.net/browse/TNL-6931
ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF = False
# Dashboard search feature
# .. toggle_name: settings.ENABLE_DASHBOARD_SEARCH
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this adds a Search Your Courses widget on the dashboard page for searching
# courseware data.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-01-29
# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6506
ENABLE_DASHBOARD_SEARCH = False
# log all information from cybersource callbacks
LOG_POSTPAY_CALLBACKS = True
# .. toggle_name: settings.CUSTOM_CERTIFICATE_TEMPLATES_ENABLED
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable custom certificate templates which are configured via Django admin.
# .. toggle_warning: None
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-08-13
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/SOL-1044
CUSTOM_CERTIFICATE_TEMPLATES_ENABLED = False
# .. toggle_name: settings.ENABLE_COURSE_DISCOVERY
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Add a course search widget to the LMS for searching courses. When this is enabled, the
# latest courses are no longer displayed on the LMS landing page. Also, an "Explore Courses" item is added to the
# navbar.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-04-23
# .. toggle_target_removal_date: None
# .. toggle_warning: The COURSE_DISCOVERY_MEANINGS setting should be properly defined.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7845
ENABLE_COURSE_DISCOVERY = False
# .. toggle_name: settings.ENABLE_COURSE_FILENAME_CCX_SUFFIX
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If set to True, CCX ID will be included in the generated filename for CCX courses.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-03-16
# .. toggle_target_removal_date: None
# .. toggle_tickets: None
# .. toggle_warning: Turning this feature ON will affect all generated filenames which are related to CCX courses.
ENABLE_COURSE_FILENAME_CCX_SUFFIX = False
# Setting for overriding default filtering facets for Course discovery
# COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"]
# Software secure fake page feature flag
ENABLE_SOFTWARE_SECURE_FAKE = False
# Teams feature
ENABLE_TEAMS = True
# Show video bumper in LMS
ENABLE_VIDEO_BUMPER = False
# How many seconds to show the bumper again, default is 7 days:
SHOW_BUMPER_PERIODICITY = 7 * 24 * 3600
# .. toggle_name: settings.ENABLE_SPECIAL_EXAMS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to use special exams, aka timed and proctored exams.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-09-04
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/9744
ENABLE_SPECIAL_EXAMS = False
# .. toggle_name: settings.ENABLE_LTI_PROVIDER
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True, Open edX site can be used as an LTI Provider to other systems
# and applications.
# .. toggle_warning: After enabling this feature flag there are multiple steps involved to configure edX
# as LTI provider. Full guide is available here:
# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/lti/index.html
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-04-24
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7689
ENABLE_LTI_PROVIDER = False
# .. toggle_name: settings.ENABLE_COOKIE_CONSENT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable header banner for cookie consent using this service:
# https://cookieconsent.insites.com/
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-03-03
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1560
ENABLE_COOKIE_CONSENT = False
# Enable one click program purchase
# See LEARNER-493
ENABLE_ONE_CLICK_PROGRAM_PURCHASE = False
# .. toggle_name: settings.ALLOW_EMAIL_ADDRESS_CHANGE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Allow users to change their email address on the Account Settings page. If this is
# disabled, users will not be able to change their email address.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-06-26
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1735
ALLOW_EMAIL_ADDRESS_CHANGE = True
# .. toggle_name: settings.ENABLE_BULK_ENROLLMENT_VIEW
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True the bulk enrollment view is enabled and one can use it to enroll multiple
# users in a course using bulk enrollment API endpoint (/api/bulk_enroll/v1/bulk_enroll).
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-07-15
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15006
ENABLE_BULK_ENROLLMENT_VIEW = False
# Set to enable Enterprise integration
ENABLE_ENTERPRISE_INTEGRATION = False
# .. toggle_name: settings.ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether HTML Block returns HTML content with the Course Blocks API when the API
# is called with student_view_data=html query parameter.
# .. toggle_warning: Because the Course Blocks API caches its data, the cache must be cleared (e.g. by
# re-publishing the course) for changes to this flag to take effect.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-08-28
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1880
ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA = False
# Sets the default browser support. For more information go to http://browser-update.org/customize.html
UNSUPPORTED_BROWSER_ALERT_VERSIONS = "{i:10,f:-3,o:-3,s:-3,c:-3}"
# .. toggle_name: settings.ENABLE_ACCOUNT_DELETION
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Whether to display the account deletion section on Account Settings page. Set to False to
# hide this section.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-06-01
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/18298
ENABLE_ACCOUNT_DELETION = True
# .. toggle_name: settings.ENABLE_AUTHN_MICROFRONTEND
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the logistration.
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2020-09-08
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/24908'
# .. toggle_warning: Also set settings.AUTHN_MICROFRONTEND_URL for rollout. This temporary feature
# toggle does not have a target removal date.
ENABLE_AUTHN_MICROFRONTEND = os.environ.get("EDXAPP_ENABLE_AUTHN_MFE", False)
# .. toggle_name: settings.ENABLE_CATALOG_MICROFRONTEND
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the catalog.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2025-05-15
# .. toggle_target_removal_date: 2025-11-01
ENABLE_CATALOG_MICROFRONTEND = False
### ORA Feature Flags ###
# .. toggle_name: settings.ENABLE_ORA_USERNAMES_ON_DATA_EXPORT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to add deanonymized usernames to ORA data
# report.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-06-11
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/TNL-7273
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
ENABLE_ORA_USERNAMES_ON_DATA_EXPORT = False
# .. toggle_name: settings.ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to start sending signals for assessment level grade updates. Notably, the only
# handler of this signal at the time of this writing sends assessment updates to enterprise integrated channels.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-12-09
# .. toggle_target_removal_date: 2021-02-01
# .. toggle_tickets: https://openedx.atlassian.net/browse/ENT-3818
ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL = False
# .. toggle_name: settings.ALLOW_ADMIN_ENTERPRISE_COURSE_ENROLLMENT_DELETION
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If true, allows for the deletion of EnterpriseCourseEnrollment records via Django Admin.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2021-01-27
# .. toggle_tickets: https://openedx.atlassian.net/browse/ENT-4022
ALLOW_ADMIN_ENTERPRISE_COURSE_ENROLLMENT_DELETION = False
# .. toggle_name: settings.ENABLE_BULK_USER_RETIREMENT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable bulk user retirement through REST API. This is disabled by
# default.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-03-11
# .. toggle_target_removal_date: None
# .. toggle_warning: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/OSPR-5290'
ENABLE_BULK_USER_RETIREMENT = False
# .. toggle_name: settings.ENABLE_NEW_BULK_EMAIL_EXPERIENCE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When true, replaces the bulk email tool found on the
# instructor dashboard with a link to the new communications MFE version instead.
# Setting the tool to false will leave the old bulk email tool experience in place.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2022-03-21
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MICROBA-1758'
ENABLE_NEW_BULK_EMAIL_EXPERIENCE = False
# .. toggle_name: settings.ENABLE_CERTIFICATES_IDV_REQUIREMENT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether to enforce ID Verification requirements for course certificates generation
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-04-26
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1458'
ENABLE_CERTIFICATES_IDV_REQUIREMENT = False
# .. toggle_name: settings.DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to disable enrollment for user invited to a course
# .. if user is registering before enrollment start date or after enrollment end date
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-06-06
# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/29538'
DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED = False
# .. toggle_name: settings.SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS
# .. toggle_implementation: SettingToggle
# .. toggle_default: False
# .. toggle_description: When True, the system will publish certificate lifecycle signals to the event bus.
# This toggle is used to create the EVENT_BUS_PRODUCER_CONFIG setting.
# .. toggle_warning: The default may be changed in a later release. See
# https://github.com/openedx/openedx-events/issues/265
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2023-10-10
# .. toggle_tickets: https://github.com/openedx/openedx-events/issues/210
SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS = False
# .. toggle_name: settings.ENABLE_COURSEWARE_SEARCH_VERIFIED_REQUIRED
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, the courseware search feature will only be enabled
# for users in a verified enrollment track.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-04-24
ENABLE_COURSEWARE_SEARCH_VERIFIED_ENROLLMENT_REQUIRED = False
# .. toggle_name: settings.BADGES_ENABLED
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable badges functionality.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-04-02
# .. toggle_target_removal_date: None
BADGES_ENABLED = False
################ Enable credit eligibility feature ####################
# .. toggle_name: settings.ENABLE_CREDIT_ELIGIBILITY
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When enabled, it is possible to define a credit eligibility criteria in the CMS. A "Credit
# Eligibility" section then appears for those courses in the LMS.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-06-17
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/8550
ENABLE_CREDIT_ELIGIBILITY = True
ENABLE_CROSS_DOMAIN_CSRF_COOKIE = False
# .. toggle_name: ENABLE_REQUIRE_THIRD_PARTY_AUTH
# .. toggle_implementation: DjangoSetting
@@ -1090,41 +734,8 @@ DEFAULT_GROUPS = []
# .. setting_description: Sets the number of days after which the gradebook will freeze following the course's end.
GRADEBOOK_FREEZE_DAYS = 30
# Used with XQueue
XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
XQUEUE_INTERFACE = {
'url': 'http://localhost:18040',
'basic_auth': ['edx', 'edx'],
'django_auth': {
'username': 'lms',
'password': 'password'
}
}
# Used with Email sending
RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS = 5
RETRY_ACTIVATION_EMAIL_TIMEOUT = 0.5
# Software Secure request retry settings
# Time in seconds before a retry of the task should be 60 mints.
SOFTWARE_SECURE_REQUEST_RETRY_DELAY = 60 * 60
# Maximum of 6 retries before giving up.
SOFTWARE_SECURE_RETRY_MAX_ATTEMPTS = 6
RETRY_CALENDAR_SYNC_EMAIL_MAX_ATTEMPTS = 5
MARKETING_EMAILS_OPT_IN = False
# .. toggle_name: ENABLE_COPPA_COMPLIANCE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When True, enforces COPPA compliance and removes YOB field from registration form and account
# .. settings page. Also hide YOB banner from profile page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-10-27
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/VAN-622'
ENABLE_COPPA_COMPLIANCE = False
############################# SET PATH INFORMATION #############################
PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/lms
REPO_ROOT = PROJECT_ROOT.dirname()
@@ -1149,103 +760,6 @@ DATABASE_ROUTERS = [
'edx_django_utils.db.read_replica.ReadReplicaRouter',
]
############################ Cache Configuration ###############################
CACHES = {
'course_structure_cache': {
'KEY_PREFIX': 'course_structure',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': '604800', # 1 week
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'celery': {
'KEY_PREFIX': 'celery',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': '7200',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'mongo_metadata_inheritance': {
'KEY_PREFIX': 'mongo_metadata_inheritance',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': 300,
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'staticfiles': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'staticfiles_general',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'default': {
'VERSION': '1',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'default',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'configuration': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'configuration',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'general': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'general',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
}
############################ OAUTH2 Provider ###################################
OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS = 365
OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS = 30
################################## DJANGO OAUTH TOOLKIT #######################################
# Scope description strings are presented to the user
@@ -1402,53 +916,26 @@ AUTHENTICATION_BACKENDS = [
STUDENT_FILEUPLOAD_MAX_SIZE = 4 * 1000 * 1000 # 4 MB
MAX_FILEUPLOADS_PER_INPUT = 20
# Set request limits for maximum size of a request body and maximum number of GET/POST parameters. (>=Django 1.10)
# Limits are currently disabled - but can be used for finer-grained denial-of-service protection.
DATA_UPLOAD_MAX_MEMORY_SIZE = None
DATA_UPLOAD_MAX_NUMBER_FIELDS = None
# Configuration option for when we want to grab server error pages
STATIC_GRAB = False
DEV_CONTENT = True
# License for serving content in China
ICP_LICENSE = None
ICP_LICENSE_INFO = {}
ELASTIC_SEARCH_CONFIG = [
{
'use_ssl': False,
'host': 'localhost',
'port': 9200
}
]
SEARCH_COURSEWARE_CONTENT_LOG_PARAMS = False
# .. setting_name: ELASTIC_SEARCH_INDEX_PREFIX
# .. setting_default: ''
# .. setting_description: Specifies the prefix used when naming elasticsearch indexes related to edx-search.
ELASTICSEARCH_INDEX_PREFIX = ""
LOGGING_ENV = 'sandbox'
EDX_ROOT_URL = ''
EDX_API_KEY = None
LOGIN_REDIRECT_URL = EDX_ROOT_URL + '/login'
LOGIN_URL = EDX_ROOT_URL + '/login'
PARTNER_SUPPORT_EMAIL = ''
CERT_QUEUE = 'test-pull'
ALTERNATE_WORKER_QUEUES = 'cms'
LOCAL_LOGLEVEL = "INFO"
LOG_DIR = '/edx/var/log/edx'
DATA_DIR = '/edx/var/edxapp/data'
# .. setting_name: MAINTENANCE_BANNER_TEXT
@@ -1458,12 +945,6 @@ DATA_DIR = '/edx/var/edxapp/data'
# The banner is only rendered when the switch is activated.
MAINTENANCE_BANNER_TEXT = None
DJFS = {
'type': 'osfs',
'directory_root': '/edx/var/edxapp/django-pyfs/static/django-pyfs',
'url_root': '/static/django-pyfs',
}
# Set certificate issued date format. It supports all formats supported by
# `common.djangoapps.util.date_utils.strftime_localized`.
CERTIFICATE_DATE_FORMAT = "%B %-d, %Y"
@@ -1569,10 +1050,6 @@ GOOGLE_ANALYTICS_4_ID = None
######################## BRANCH.IO ###########################
BRANCH_IO_KEY = None
######################## OPTIMIZELY ###########################
OPTIMIZELY_PROJECT_ID = None
OPTIMIZELY_FULLSTACK_SDK_KEY = None
######################## HOTJAR ###########################
HOTJAR_SITE_ID = 00000
@@ -1601,34 +1078,6 @@ XBLOCK_MIXINS = (
EditInfoMixin,
)
# .. setting_name: XBLOCK_EXTRA_MIXINS
# .. setting_default: ()
# .. setting_description: Custom mixins that will be dynamically added to every XBlock and XBlockAside instance.
# These can be classes or dotted-path references to classes.
# For example: `XBLOCK_EXTRA_MIXINS = ('my_custom_package.my_module.MyCustomMixin',)`
XBLOCK_EXTRA_MIXINS = ()
# .. setting_name: XBLOCK_FIELD_DATA_WRAPPERS
# .. setting_default: ()
# .. setting_description: Paths to wrapper methods which should be applied to every XBlock's FieldData.
XBLOCK_FIELD_DATA_WRAPPERS = ()
XBLOCK_FS_STORAGE_BUCKET = None
XBLOCK_FS_STORAGE_PREFIX = None
# .. setting_name: XBLOCK_SETTINGS
# .. setting_default: {}
# .. setting_description: Dictionary containing server-wide configuration of XBlocks on a per-type basis.
# By default, keys should match the XBlock `block_settings_key` attribute/property. If the attribute/property
# is not defined, use the XBlock class name. Check `xmodule.services.SettingsService`
# for more reference.
XBLOCK_SETTINGS = {}
# .. setting_name: XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE
# .. setting_default: default
# .. setting_description: The django cache key of the cache to use for storing anonymous user state for XBlocks.
XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE = 'default'
############# ModuleStore Configuration ##########
MODULESTORE_BRANCH = 'published-only'
@@ -1700,48 +1149,6 @@ MODULESTORE = {
}
}
DATABASES = {
# edxapp's edxapp-migrate scripts and the edxapp_migrate play
# will ensure that any DB not named read_replica will be migrated
# for both the lms and cms.
'default': {
'ATOMIC_REQUESTS': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
},
'read_replica': {
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
},
'student_module_history': {
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp_csmh',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
}
}
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
DEFAULT_HASHING_ALGORITHM = 'sha256'
HOSTNAME_MODULESTORE_DEFAULT_MAPPINGS = {}
MONGODB_LOG = {}
@@ -1772,38 +1179,6 @@ CODE_JAIL = {
"limit_overrides": {},
}
# Some courses are allowed to run unsafe code. This is a list of regexes, one
# of them must match the course id for that course to run unsafe code.
#
# For example:
#
# COURSES_WITH_UNSAFE_CODE = [
# r"Harvard/XY123.1/.*"
# ]
COURSES_WITH_UNSAFE_CODE = []
# Code jail REST service
ENABLE_CODEJAIL_REST_SERVICE = False
# .. setting_name: CODE_JAIL_REST_SERVICE_REMOTE_EXEC
# .. setting_default: 'xmodule.capa.safe_exec.remote_exec.send_safe_exec_request_v0'
# .. setting_description: Set the python package.module.function that is reponsible of
# calling the remote service in charge of jailed code execution
CODE_JAIL_REST_SERVICE_REMOTE_EXEC = 'xmodule.capa.safe_exec.remote_exec.send_safe_exec_request_v0'
# .. setting_name: CODE_JAIL_REST_SERVICE_HOST
# .. setting_default: 'http://127.0.0.1:8550'
# .. setting_description: Set the codejail remote service host
CODE_JAIL_REST_SERVICE_HOST = 'http://127.0.0.1:8550'
# .. setting_name: CODE_JAIL_REST_SERVICE_CONNECT_TIMEOUT
# .. setting_default: 0.5
# .. setting_description: Set the number of seconds LMS will wait to establish an internal
# connection to the codejail remote service.
CODE_JAIL_REST_SERVICE_CONNECT_TIMEOUT = 0.5 # time in seconds
# .. setting_name: CODE_JAIL_REST_SERVICE_READ_TIMEOUT
# .. setting_default: 3.5
# .. setting_description: Set the number of seconds LMS will wait for a response from the
# codejail remote service endpoint.
CODE_JAIL_REST_SERVICE_READ_TIMEOUT = 3.5 # time in seconds
# .. setting_name: PYTHON_LIB_FILENAME
# .. setting_default: python_lib.zip
# .. setting_description: Name of the course file to make available to code in
@@ -1812,11 +1187,6 @@ CODE_JAIL_REST_SERVICE_READ_TIMEOUT = 3.5 # time in seconds
PYTHON_LIB_FILENAME = 'python_lib.zip'
############################### DJANGO BUILT-INS ###############################
# Change DEBUG in your environment settings files, not here
SESSION_COOKIE_SECURE = False
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'openedx.core.lib.session_serializers.PickleSerializer'
SESSION_COOKIE_NAME = 'sessionid'
# django-session-cookie middleware
DCS_SESSION_COOKIE_SAMESITE = 'None'
@@ -1833,8 +1203,6 @@ STUDIO_NAME = 'Studio'
STUDIO_SHORT_NAME = 'Studio'
# Site info
SITE_NAME = "localhost"
HTTPS = 'on'
ROOT_URLCONF = 'lms.urls'
# NOTE: Please set ALLOWED_HOSTS to some sane value, as we do not allow the default '*'
# Platform Email
@@ -1855,9 +1223,6 @@ CONTACT_MAILING_ADDRESS = 'SET-ME-PLEASE'
# Account activation email sender address
ACTIVATION_EMAIL_FROM_ADDRESS = ''
ADMINS = ()
MANAGERS = ADMINS
# Static content
STATIC_URL = '/static/'
STATIC_ROOT = os.environ.get('STATIC_ROOT_LMS', ENV_ROOT / "staticfiles")
@@ -1872,36 +1237,14 @@ STATICFILES_DIRS = [
XMODULE_ROOT / "static",
]
FAVICON_PATH = 'images/favicon.ico'
# Locale/Internationalization
CELERY_TIMEZONE = 'UTC'
TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
# Languages supported for custom course certificate templates
CERTIFICATE_TEMPLATE_LANGUAGES = {
'en': 'English',
'es': 'Español',
}
USE_I18N = True
USE_L10N = True
STATICI18N_FILENAME_FUNCTION = 'statici18n.utils.legacy_filename'
STATICI18N_ROOT = PROJECT_ROOT / "static"
# Messages
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
# Guidelines for translators
TRANSLATORS_GUIDE = 'https://docs.openedx.org/en/latest/translators/index.html'
#################################### AWS #######################################
# The number of seconds that a generated URL is valid for.
AWS_QUERYSTRING_EXPIRE = 10 * 365 * 24 * 60 * 60 # 10 years
AWS_ACCESS_KEY_ID = None
AWS_SECRET_ACCESS_KEY = None
################################# SIMPLEWIKI ###################################
SIMPLE_WIKI_REQUIRE_LOGIN_EDIT = True
@@ -1956,21 +1299,8 @@ WIKI_LINK_LIVE_LOOKUPS = False
WIKI_LINK_DEFAULT_LEVEL = 2
##### Zendesk #####
ZENDESK_URL = ''
ZENDESK_USER = None
ZENDESK_API_KEY = None
ZENDESK_CUSTOM_FIELDS = {}
ZENDESK_OAUTH_ACCESS_TOKEN = ''
# A mapping of string names to Zendesk Group IDs
# To get the IDs of your groups you can go to
# {zendesk_url}/api/v2/groups.json
ZENDESK_GROUP_ID_MAPPING = {}
##### EMBARGO #####
EMBARGO_SITE_REDIRECT_URL = None
##### shoppingcart Payment #####
PAYMENT_SUPPORT_EMAIL = 'billing@example.com'
# Setting for PAID_COURSE_REGISTRATION, DOES NOT AFFECT VERIFIED STUDENTS
PAID_COURSE_REGISTRATION_CURRENCY = ['usd', '$']
@@ -1983,7 +1313,7 @@ PAID_COURSE_REGISTRATION_CURRENCY = ['usd', '$']
# .. setting_description: Set the public API endpoint LMS will use in the frontend to
# interact with the edx_notes_api service.
# .. setting_warning: This setting must be a publicly accessible endpoint. It is only used
# when the setting FEATURES['ENABLE_EDXNOTES'] is activated.
# when the setting settings.ENABLE_EDXNOTES is activated.
EDXNOTES_PUBLIC_API = 'http://localhost:18120/api/v1'
# .. setting_name: EDXNOTES_INTERNAL_API
# .. setting_default: http://localhost:18120/api/v1
@@ -1991,7 +1321,7 @@ EDXNOTES_PUBLIC_API = 'http://localhost:18120/api/v1'
# interact with the edx_notes_api service.
# .. setting_warning: Normally set to the same value of EDXNOTES_PUBLIC_API. It is not
# mandatory for this setting to be a publicly accessible endpoint, but to be accessible
# by the LMS service. It is only used when the setting FEATURES['ENABLE_EDXNOTES'] is
# by the LMS service. It is only used when the setting settings.ENABLE_EDXNOTES is
# activated.
EDXNOTES_INTERNAL_API = 'http://localhost:18120/api/v1'
# .. setting_name: EDXNOTES_CLIENT_NAME
@@ -2164,12 +1494,6 @@ MIDDLEWARE = [
'openedx.core.djangoapps.site_configuration.middleware.SessionCookieDomainOverrideMiddleware',
]
# Clickjacking protection can be disbaled by setting this to 'ALLOW'
X_FRAME_OPTIONS = 'DENY'
# Platform for Privacy Preferences header
P3P_HEADER = 'CP="Open EdX does not have a P3P policy."'
############################### PIPELINE #######################################
PIPELINE = {
@@ -2574,9 +1898,6 @@ STATICFILES_IGNORE_PATTERNS = (
################################# DJANGO-REQUIRE ###############################
# The baseUrl to pass to the r.js optimizer, relative to STATIC_ROOT.
REQUIRE_BASE_URL = "./"
# The name of a build profile to use for your project, relative to REQUIRE_BASE_URL.
# A sensible value would be 'app.build.js'. Leave blank to use the built-in default build profile.
# Set to False to disable running the default profile (e.g. if only using it to build Standalone
@@ -2586,9 +1907,6 @@ REQUIRE_BUILD_PROFILE = "lms/js/build.js"
# The name of the require.js script used by your project, relative to REQUIRE_BASE_URL.
REQUIRE_JS = "common/js/vendor/require.js"
# Whether to run django-require in debug mode.
REQUIRE_DEBUG = False
# In production, the Django pipeline appends a file hash to JavaScript file names.
# This makes it difficult for RequireJS to load its requirements, since module names
# specified in JavaScript code do not include the hash.
@@ -2645,31 +1963,6 @@ CELERY_IMPORTS = [
# These packages are added in addition to those added by CELERY_IMPORTS.
CELERY_EXTRA_IMPORTS = []
# Message configuration
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_MESSAGE_COMPRESSION = 'gzip'
# Results configuration
CELERY_IGNORE_RESULT = False
CELERY_STORE_ERRORS_EVEN_IF_IGNORED = True
# Events configuration
CELERY_TRACK_STARTED = True
CELERY_SEND_EVENTS = True
CELERY_SEND_TASK_SENT_EVENT = True
# Exchange configuration
CELERY_DEFAULT_EXCHANGE = 'edx.core'
CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
# SERVICE_VARIANT specifies name of the variant used, which decides what JSON
# configuration files are read during startup.
SERVICE_VARIANT = os.environ.get('SERVICE_VARIANT', "lms")
@@ -2702,10 +1995,6 @@ CELERY_QUEUES = {
CELERY_ROUTES = "openedx.core.lib.celery.routers.route_task"
CELERYBEAT_SCHEDULE = {} # For scheduling tasks, entries can be added to this dict
CELERY_QUEUE_HA_POLICY = 'all'
CELERY_CREATE_MISSING_QUEUES = True
# let logging work as configured:
CELERYD_HIJACK_ROOT_LOGGER = False
@@ -2715,49 +2004,8 @@ BROKER_USE_SSL = False
HEARTBEAT_CELERY_ROUTING_KEY = HIGH_PRIORITY_QUEUE
################################ Block Structures ###################################
# .. setting_name: BLOCK_STRUCTURES_SETTINGS
# .. setting_default: dict of settings
# .. setting_description: Stores all the settings used by block structures and block structure
# related tasks. See BLOCK_STRUCTURES_SETTINGS[XXX] documentation for details of each setting.
# For more information, check https://github.com/openedx/edx-platform/pull/13388.
BLOCK_STRUCTURES_SETTINGS = dict(
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['COURSE_PUBLISH_TASK_DELAY']
# .. setting_default: 30
# .. setting_description: Delay, in seconds, after a new edit of a course is published before
# updating the block structures cache. This is needed for a better chance at getting
# the latest changes when there are secondary reads in sharded mongoDB clusters.
# For more information, check https://github.com/openedx/edx-platform/pull/13388 and
# https://github.com/openedx/edx-platform/pull/14571.
COURSE_PUBLISH_TASK_DELAY=30,
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['TASK_DEFAULT_RETRY_DELAY']
# .. setting_default: 30
# .. setting_description: Delay, in seconds, between retry attempts if a block structure task
# fails. For more information, check https://github.com/openedx/edx-platform/pull/13388 and
# https://github.com/openedx/edx-platform/pull/14571.
TASK_DEFAULT_RETRY_DELAY=30,
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['TASK_MAX_RETRIES']
# .. setting_default: 5
# .. setting_description: Maximum number of retries per block structure task.
# If the maximum number of retries is exceeded, then you can attempt to either manually run
# the celery task, or wait for it to be triggered again.
# For more information, check https://github.com/openedx/edx-platform/pull/13388 and
# https://github.com/openedx/edx-platform/pull/14571.
TASK_MAX_RETRIES=5,
)
################################ Bulk Email ###################################
# Suffix used to construct 'from' email address for bulk emails.
# A course-specific identifier is prepended.
BULK_EMAIL_DEFAULT_FROM_EMAIL = 'no-reply@example.com'
# Parameters for breaking down course enrollment into subtasks.
BULK_EMAIL_EMAILS_PER_TASK = 500
# Initial delay used for retrying tasks. Additional retries use
# longer delays. Value is in seconds.
BULK_EMAIL_DEFAULT_RETRY_DELAY = 30
@@ -2783,10 +2031,6 @@ BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = Derived(lambda settings: settings.DEFAULT_PR
# sent to self and staff
BULK_EMAIL_JOB_SIZE_THRESHOLD = 100
# Flag to indicate if individual email addresses should be logged as they are sent
# a bulk email message.
BULK_EMAIL_LOG_SENT_EMAILS = False
# Delay in seconds to sleep between individual mail messages being sent,
# when a bulk email task is retried for rate-related reasons. Choose this
# value depending on the number of workers that might be sending email in
@@ -2798,28 +2042,6 @@ BULK_EMAIL_RETRY_DELAY_BETWEEN_SENDS = 0.02
# Minimum age for organization-wide email opt in
EMAIL_OPTIN_MINIMUM_AGE = PARENTAL_CONSENT_AGE_LIMIT
############################## Video ##########################################
YOUTUBE = {
# YouTube JavaScript API
'API': 'https://www.youtube.com/iframe_api',
'TEST_TIMEOUT': 1500,
# URL to get YouTube metadata
'METADATA_URL': 'https://www.googleapis.com/youtube/v3/videos/',
# Web page mechanism for scraping transcript information from youtube video pages
'TRANSCRIPTS': {
'CAPTION_TRACKS_REGEX': r"captionTracks\"\:\[(?P<caption_tracks>[^\]]+)",
'YOUTUBE_URL_BASE': 'https://www.youtube.com/watch?v=',
'ALLOWED_LANGUAGE_CODES': ["en", "en-US", "en-GB"],
},
'IMAGE_API': 'http://img.youtube.com/vi/{youtube_id}/0.jpg', # /maxresdefault.jpg for 1920*1080
}
YOUTUBE_API_KEY = 'PUT_YOUR_API_KEY_HERE'
################################### APPS ######################################
# The order of INSTALLED_APPS is important, when adding new apps here remember to check that you are not creating new
@@ -3166,73 +2388,15 @@ INSTALLED_APPS = [
"openedx_learning.apps.authoring.sections",
]
######################### CSRF #########################################
# Forwards-compatibility with Django 1.7
CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52
# It is highly recommended that you override this in any environment accessed by
# end users
CSRF_COOKIE_SECURE = False
# If setting a cross-domain cookie, it's really important to choose
# a name for the cookie that is DIFFERENT than the cookies used
# by each subdomain. For example, suppose the applications
# at these subdomains are configured to use the following cookie names:
#
# 1) foo.example.com --> "csrftoken"
# 2) baz.example.com --> "csrftoken"
# 3) bar.example.com --> "csrftoken"
#
# For the cross-domain version of the CSRF cookie, you need to choose
# a name DIFFERENT than "csrftoken"; otherwise, the new token configured
# for ".example.com" could conflict with the other cookies,
# non-deterministically causing 403 responses.
CROSS_DOMAIN_CSRF_COOKIE_NAME = ''
# When setting the domain for the "cross-domain" version of the CSRF
# cookie, you should choose something like: ".example.com"
# (note the leading dot), where both the referer and the host
# are subdomains of "example.com".
#
# Browser security rules require that
# the cookie domain matches the domain of the server; otherwise
# the cookie won't get set. And once the cookie gets set, the client
# needs to be on a domain that matches the cookie domain, otherwise
# the client won't be able to read the cookie.
CROSS_DOMAIN_CSRF_COOKIE_DOMAIN = ''
######################### Django Rest Framework ########################
# .. setting_name: REGISTRATION_VALIDATION_RATELIMIT
# .. setting_default: 30/7d
# .. setting_description: Whenever a user tries to register on edx, the data entered during registration
# is validated via RegistrationValidationView.
# It's POST endpoint is rate-limited up to 30 requests per IP Address in a week by default.
# It was introduced because an attacker can guess or brute force a series of names to enumerate valid users.
# .. setting_tickets: https://github.com/openedx/edx-platform/pull/24664
REGISTRATION_VALIDATION_RATELIMIT = '30/7d'
# .. setting_name: REGISTRATION_RATELIMIT
# .. setting_default: 60/7d
# .. setting_description: New users are registered on edx via RegistrationView.
# It's POST end-point is rate-limited up to 60 requests per IP Address in a week by default.
# Purpose of this setting is to restrict an attacker from registering numerous fake accounts.
# .. setting_tickets: https://github.com/openedx/edx-platform/pull/27060
REGISTRATION_RATELIMIT = '60/7d'
SWAGGER_SETTINGS = {
'DEFAULT_INFO': 'openedx.core.apidocs.api_info',
'DEEP_LINKING': True,
}
######################### MARKETING SITE ###############################
EDXMKTG_LOGGED_IN_COOKIE_NAME = 'edxloggedin'
EDXMKTG_USER_INFO_COOKIE_NAME = 'edx-user-info'
EDXMKTG_USER_INFO_COOKIE_VERSION = 1
MKTG_URLS = {}
MKTG_URL_OVERRIDES = {}
MKTG_URL_LINK_MAP = {
'ABOUT': 'about',
'CONTACT': 'contact',
@@ -3254,7 +2418,6 @@ MKTG_URL_LINK_MAP = {
STATIC_TEMPLATE_VIEW_DEFAULT_FILE_EXTENSION = 'html'
SUPPORT_SITE_LINK = ''
SEND_ACTIVATION_EMAIL_URL = ''
ACTIVATION_EMAIL_SUPPORT_LINK = Derived(lambda settings: settings.SUPPORT_SITE_LINK)
ID_VERIFICATION_SUPPORT_LINK = Derived(lambda settings: settings.SUPPORT_SITE_LINK)
@@ -3299,15 +2462,6 @@ SOCIAL_MEDIA_FOOTER_NAMES = [
"reddit",
]
# The footer URLs dictionary maps social footer names
# to URLs defined in configuration.
SOCIAL_MEDIA_FOOTER_ACE_URLS = {
'reddit': 'http://www.reddit.com/r/edx',
'twitter': 'https://twitter.com/edXOnline',
'linkedin': 'http://www.linkedin.com/company/edx',
'facebook': 'http://www.facebook.com/EdxOnline',
}
# The mobile store URLs dictionary maps mobile store names
# to URLs defined in configuration.
MOBILE_STORE_ACE_URLS = {
@@ -3315,15 +2469,6 @@ MOBILE_STORE_ACE_URLS = {
'apple': 'https://itunes.apple.com/us/app/edx/id945480667?mt=8',
}
# The social media logo urls dictionary maps social media names
# to the respective icons
SOCIAL_MEDIA_LOGO_URLS = {
'reddit': 'http://email-media.s3.amazonaws.com/edX/2021/social_5_reddit.png',
'twitter': 'http://email-media.s3.amazonaws.com/edX/2021/social_2_twitter.png',
'linkedin': 'http://email-media.s3.amazonaws.com/edX/2021/social_3_linkedin.png',
'facebook': 'http://email-media.s3.amazonaws.com/edX/2021/social_1_fb.png',
}
# The mobile store logo urls dictionary maps mobile store names
# to the respective icons
MOBILE_STORE_LOGO_URLS = {
@@ -3406,13 +2551,6 @@ SOCIAL_MEDIA_FOOTER_DISPLAY = {
#################SOCAIL AUTH OAUTH######################
SOCIAL_AUTH_OAUTH_SECRETS = {}
################# Student Verification #################
VERIFY_STUDENT = {
"DAYS_GOOD_FOR": 365, # How many days is a verficiation good for?
# The variable represents the window within which a verification is considered to be "expiring soon."
"EXPIRING_SOON_WINDOW": 28,
}
################# Student Verification Expiry Email #################
VERIFICATION_EXPIRY_EMAIL = {
"RESEND_DAYS": 15,
@@ -3420,27 +2558,8 @@ VERIFICATION_EXPIRY_EMAIL = {
"DEFAULT_EMAILS": 2,
}
################ Enable credit eligibility feature ####################
ENABLE_CREDIT_ELIGIBILITY = True
# .. toggle_name: FEATURES['ENABLE_CREDIT_ELIGIBILITY']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When enabled, it is possible to define a credit eligibility criteria in the CMS. A "Credit
# Eligibility" section then appears for those courses in the LMS.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-06-17
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/8550
FEATURES['ENABLE_CREDIT_ELIGIBILITY'] = ENABLE_CREDIT_ELIGIBILITY
############# Cross-domain requests #################
if FEATURES.get('ENABLE_CORS_HEADERS'):
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_WHITELIST = ()
CORS_ORIGIN_ALLOW_ALL = False
CORS_ALLOW_INSECURE = False
# Set CORS_ALLOW_HEADERS regardless of whether we've enabled ENABLE_CORS_HEADERS
# because that decision might happen in a later config file. (The headers to
# allow is an application logic, and not site policy.)
@@ -3456,12 +2575,6 @@ CORS_ALLOW_HEADERS = corsheaders_default_headers + (
# to simulate cross-domain requests.
XDOMAIN_PROXY_CACHE_TIMEOUT = 60 * 15
# .. setting_name: LOGIN_REDIRECT_WHITELIST
# .. setting_default: empty list ([])
# .. setting_description: While logout, if logout request has a redirect-url as query strings,
# then the redirect-url is validated through LOGIN_REDIRECT_WHITELIST.
LOGIN_REDIRECT_WHITELIST = []
###################### Registration ##################################
# .. setting_name: REGISTRATION_EXTRA_FIELDS
@@ -3512,9 +2625,6 @@ REGISTRATION_FIELD_ORDER = [
"terms_of_service",
]
# String length for the configurable part of the auto-generated username
AUTO_GENERATED_USERNAME_RANDOM_STRING_LENGTH = 4
REGISTRATION_CODE_LENGTH = 8
########################## CERTIFICATE NAME ########################
@@ -3528,31 +2638,6 @@ GRADES_DOWNLOAD_ROUTING_KEY = Derived(lambda settings: settings.HIGH_MEM_QUEUE)
RECALCULATE_GRADES_ROUTING_KEY = 'edx.lms.core.default'
GRADES_DOWNLOAD = {
'STORAGE_CLASS': 'django.core.files.storage.FileSystemStorage',
'STORAGE_KWARGS': {
'location': '/tmp/edx-s3/grades',
},
'STORAGE_TYPE': None,
'BUCKET': None,
'ROOT_PATH': None,
}
FINANCIAL_REPORTS = {
'STORAGE_TYPE': 'localfs',
'BUCKET': None,
'ROOT_PATH': 'sandbox',
}
#### Grading policy change-related settings #####
# Rate limit for regrading tasks that a grading policy change can kick off
POLICY_CHANGE_TASK_RATE_LIMIT = '900/h'
#### PASSWORD POLICY SETTINGS #####
PASSWORD_POLICY_COMPLIANCE_ROLLOUT_CONFIG = {
'ENFORCE_COMPLIANCE_ON_LOGIN': False
}
############################ ORA 2 ############################################
ORA_WORKFLOW_UPDATE_ROUTING_KEY = "edx.lms.core.ora_workflow_update"
@@ -3569,66 +2654,11 @@ ORA_PEER_LEASE_EXPIRATION_HOURS = 8
# .. setting_description: Amount of time before a lease on a staff submission expires
ORA_STAFF_LEASE_EXPIRATION_HOURS = 8
# Default File Upload Storage bucket and prefix. Used by the FileUpload Service.
FILE_UPLOAD_STORAGE_BUCKET_NAME = 'SET-ME-PLEASE (ex. bucket-name)'
FILE_UPLOAD_STORAGE_PREFIX = 'submissions_attachments'
##### ACCOUNT LOCKOUT DEFAULT PARAMETERS #####
# .. setting_name: MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED
# .. setting_default: 6
# .. setting_description: Specifies the maximum failed login attempts allowed to users. Once the user reaches this
# failure threshold then the account will be locked for a configurable amount of seconds (30 minutes) which will
# prevent additional login attempts until this time period has passed. This setting is related with
# MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS and only used when ENABLE_MAX_FAILED_LOGIN_ATTEMPTS is enabled.
MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 6
# .. setting_name: MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS
# .. setting_default: 30 * 60
# .. setting_description: Specifies the lockout period in seconds for consecutive failed login attempts. Once the user
# reaches the threshold of the login failure, then the account will be locked for the given amount of seconds
# (30 minutes) which will prevent additional login attempts until this time period has passed. This setting is
# related with MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED and only used when ENABLE_MAX_FAILED_LOGIN_ATTEMPTS is enabled.
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 30 * 60
##### LMS DEADLINE DISPLAY TIME_ZONE #######
TIME_ZONE_DISPLAYED_FOR_DEADLINES = 'UTC'
########################## VIDEO IMAGE STORAGE ############################
VIDEO_IMAGE_SETTINGS = dict(
VIDEO_IMAGE_MAX_BYTES=2 * 1024 * 1024, # 2 MB
VIDEO_IMAGE_MIN_BYTES=2 * 1024, # 2 KB
# Backend storage
# STORAGE_CLASS='storages.backends.s3boto3.S3Boto3Storage',
# STORAGE_KWARGS=dict(bucket='video-image-bucket'),
STORAGE_KWARGS=dict(
location=MEDIA_ROOT,
),
DIRECTORY_PREFIX='video-images/',
BASE_URL=MEDIA_URL,
)
VIDEO_IMAGE_MAX_AGE = 31536000
########################## VIDEO TRANSCRIPTS STORAGE ############################
VIDEO_TRANSCRIPTS_SETTINGS = dict(
VIDEO_TRANSCRIPTS_MAX_BYTES=3 * 1024 * 1024, # 3 MB
# Backend storage
# STORAGE_CLASS='storages.backends.s3boto3.S3Boto3Storage',
# STORAGE_KWARGS=dict(bucket='video-transcripts-bucket'),
STORAGE_KWARGS=dict(
location=MEDIA_ROOT,
),
DIRECTORY_PREFIX='video-transcripts/',
BASE_URL=MEDIA_URL,
)
VIDEO_TRANSCRIPTS_MAX_AGE = 31536000
### Apps only installed in some instances
# The order of INSTALLED_APPS matters, so this tuple is the app name and the item in INSTALLED_APPS
# that this app should be inserted *before*. A None here means it should be appended to the list.
@@ -3690,14 +2720,9 @@ for app_name, insert_before in OPTIONAL_APPS:
except (IndexError, ValueError):
INSTALLED_APPS.append(app_name)
### External auth usage -- prefixes for ENROLLMENT_DOMAIN
SHIBBOLETH_DOMAIN_PREFIX = 'shib:'
### Analytics API
ANALYTICS_API_KEY = ""
ANALYTICS_API_URL = "http://localhost:18100"
ANALYTICS_DASHBOARD_URL = 'http://localhost:18110/courses'
ANALYTICS_DASHBOARD_NAME = 'Your Platform Name Here Insights'
# REGISTRATION CODES DISPLAY INFORMATION SUBTITUTIONS IN THE INVOICE ATTACHMENT
INVOICE_CORP_ADDRESS = "Please place your corporate address\nin this configuration"
@@ -3711,27 +2736,6 @@ COUNTRIES_OVERRIDE = {
'XK': _('Kosovo'),
}
# which access.py permission name to check in order to determine if a course is visible in
# the course catalog. We default this to the legacy permission 'see_exists'.
COURSE_CATALOG_VISIBILITY_PERMISSION = 'see_exists'
# which access.py permission name to check in order to determine if a course about page is
# visible. We default this to the legacy permission 'see_exists'.
COURSE_ABOUT_VISIBILITY_PERMISSION = 'see_exists'
DEFAULT_COURSE_VISIBILITY_IN_CATALOG = "both"
# .. toggle_name: DEFAULT_MOBILE_AVAILABLE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: This specifies if the courses are available for mobile by default. To make any individual
# course available for mobile one can set the value of Mobile Course Available to true in Advanced Settings from the
# studio when this is False.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-01-26
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1985
DEFAULT_MOBILE_AVAILABLE = False
# Enrollment API Cache Timeout
ENROLLMENT_COURSE_DETAILS_CACHE_TIMEOUT = 60
@@ -3752,8 +2756,6 @@ PDF_RECEIPT_COBRAND_LOGO_PATH = PROJECT_ROOT + '/static/images/logo.png'
# Height of the Co-brand Logo in mm
PDF_RECEIPT_COBRAND_LOGO_HEIGHT_MM = 12
# Use None for the default search engine
SEARCH_ENGINE = None
# Use LMS specific search initializer
SEARCH_INITIALIZER = "lms.lib.courseware_search.lms_search_initializer.LmsSearchInitializer"
# Use the LMS specific result processor
@@ -3875,15 +2877,9 @@ FIRST_PURCHASE_DISCOUNT_OVERRIDE_CODE = ''
FIRST_PURCHASE_DISCOUNT_OVERRIDE_PERCENTAGE = 15
# E-Commerce API Configuration
ECOMMERCE_PUBLIC_URL_ROOT = 'http://localhost:8002'
ECOMMERCE_API_URL = 'http://localhost:8002/api/v2'
ECOMMERCE_API_TIMEOUT = 5
ECOMMERCE_ORDERS_API_CACHE_TIMEOUT = 3600
ECOMMERCE_SERVICE_WORKER_USERNAME = 'ecommerce_worker'
ECOMMERCE_API_SIGNING_KEY = 'SET-ME-PLEASE'
# Exam Service
EXAMS_SERVICE_URL = 'http://localhost:18740/api/v1'
############## Settings for JWT token handling ##############
TOKEN_SIGNING = {
@@ -3900,14 +2896,6 @@ TOKEN_SIGNING = {
# This will output asymmetric JWTs to use here. Read more on this on:
# https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0008-use-asymmetric-jwts.rst
COURSE_CATALOG_URL_ROOT = 'http://localhost:8008'
COURSE_CATALOG_API_URL = f'{COURSE_CATALOG_URL_ROOT}/api/v1'
CREDENTIALS_INTERNAL_SERVICE_URL = 'http://localhost:8005'
CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:8005'
# time between scheduled runs, in seconds
NOTIFY_CREDENTIALS_FREQUENCY = 14400
COMMENTS_SERVICE_URL = ''
COMMENTS_SERVICE_KEY = ''
@@ -3915,7 +2903,7 @@ COMMENTS_SERVICE_KEY = ''
CHECKPOINT_PATTERN = r'(?P<checkpoint_name>[^/]+)'
# For the fields override feature
# If using FEATURES['INDIVIDUAL_DUE_DATES'], you should add
# If using settings.INDIVIDUAL_DUE_DATES, you should add
# 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider' to
# this setting.
FIELD_OVERRIDE_PROVIDERS = ()
@@ -3941,26 +2929,6 @@ HOMEPAGE_COURSE_MAX = None
COURSE_MEMBER_API_ENROLLMENT_LIMIT = 1000
################################ Settings for Credit Courses ################################
# 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
# Secret keys shared with credit providers.
# Used to digitally sign credit requests (us --> provider)
# and validate responses (provider --> us).
# Each key in the dictionary is a credit provider ID, and
# the value is the 32-character key.
CREDIT_PROVIDER_SECRET_KEYS = {}
# 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
# The Help link to the FAQ page about the credit
CREDIT_HELP_LINK_URL = ""
@@ -4000,15 +2968,6 @@ NOTIFICATION_EMAIL_EDX_LOGO = "templates/credit_notifications/edx-logo-header.pn
################################ Settings for JWTs ################################
JWT_ISSUER = 'http://127.0.0.1:8000/oauth2'
DEFAULT_JWT_ISSUER = {
'ISSUER': 'http://127.0.0.1:8000/oauth2',
'AUDIENCE': 'change-me',
'SECRET_KEY': 'SET-ME-PLEASE'
}
JWT_EXPIRATION = 30
JWT_PRIVATE_SIGNING_KEY = None
EDX_DRF_EXTENSIONS = {
# Set this value to an empty dict in order to prevent automatically updating
# user data from values in (possibly stale) JWTs.
@@ -4067,65 +3026,15 @@ STUDENTMODULEHISTORYEXTENDED_OFFSET = 10000
################################ Settings for Credentials Service ################################
CREDENTIALS_SERVICE_USERNAME = 'credentials_service_user'
CREDENTIALS_GENERATION_ROUTING_KEY = Derived(lambda settings: settings.DEFAULT_PRIORITY_QUEUE)
CREDENTIALS_COURSE_COMPLETION_STATE = 'awarded'
# Queue to use for award program certificates
PROGRAM_CERTIFICATES_ROUTING_KEY = Derived(lambda settings: settings.DEFAULT_PRIORITY_QUEUE)
# .. setting_name: COMPREHENSIVE_THEME_DIRS
# .. setting_default: []
# .. setting_description: A list of paths to directories, each of which will
# be searched for comprehensive themes. Do not override this Django setting directly.
# Instead, set the COMPREHENSIVE_THEME_DIRS environment variable, using colons (:) to
# separate paths.
COMPREHENSIVE_THEME_DIRS = os.environ.get("COMPREHENSIVE_THEME_DIRS", "").split(":")
# .. setting_name: DEFAULT_SITE_THEME
# .. setting_default: None
# .. setting_description: Theme to use when no site or site theme is defined, for example
# "dark-theme". Set to None if you want to use openedx default theme.
# .. setting_warning: The theme folder needs to be in 'edx-platform/themes' or define the path
# to the theme folder in COMPREHENSIVE_THEME_DIRS. To be effective, ENABLE_COMPREHENSIVE_THEMING
# has to be enabled.
DEFAULT_SITE_THEME = None
# .. toggle_name: ENABLE_COMPREHENSIVE_THEMING
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this toggle activates the use of the custom theme
# defined by DEFAULT_SITE_THEME.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2016-06-30
ENABLE_COMPREHENSIVE_THEMING = False
# .. setting_name: CUSTOM_RESOURCE_TEMPLATES_DIRECTORY
# .. setting_default: None
# .. setting_description: Path to an existing directory of YAML files containing
# html content to be used with the subclasses of xmodule.x_module.ResourceTemplates.
# Default example templates can be found in xmodule/templates/html.
# Note that the extension used is ".yaml" and not ".yml".
# See xmodule.x_module.ResourceTemplates for usage.
# "CUSTOM_RESOURCE_TEMPLATES_DIRECTORY" : null
CUSTOM_RESOURCE_TEMPLATES_DIRECTORY = None
# API access management
API_ACCESS_FROM_EMAIL = 'api-requests@example.com'
API_ACCESS_MANAGER_EMAIL = 'api-access@example.com'
# Affiliate cookie tracking
AFFILIATE_COOKIE_NAME = 'dev_affiliate_id'
############## Settings for LMS Context Sensitive Help ##############
HELP_TOKENS_INI_FILE = REPO_ROOT / "lms" / "envs" / "help_tokens.ini"
HELP_TOKENS_LANGUAGE_CODE = Derived(lambda settings: settings.LANGUAGE_CODE)
HELP_TOKENS_VERSION = Derived(lambda settings: doc_version())
HELP_TOKENS_BOOKS = {
'learner': 'https://edx.readthedocs.io/projects/open-edx-learner-guide',
'course_author': 'https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course',
}
############## OPEN EDX ENTERPRISE SERVICE CONFIGURATION ######################
# The Open edX Enterprise service is currently hosted via the LMS container/process.
@@ -4133,23 +3042,16 @@ HELP_TOKENS_BOOKS = {
# These configuration settings are specific to the Enterprise service and you should
# not find references to them within the edx-platform project.
#
# Only used if FEATURES['ENABLE_ENTERPRISE_INTEGRATION'] == True.
# Only used if settings.ENABLE_ENTERPRISE_INTEGRATION == True.
ENTERPRISE_PUBLIC_ENROLLMENT_API_URL = Derived(
lambda settings: (settings.LMS_ROOT_URL or '') + settings.LMS_ENROLLMENT_API_PATH
)
ENTERPRISE_COURSE_ENROLLMENT_AUDIT_MODES = ['audit', 'honor']
ENTERPRISE_SUPPORT_URL = ''
ENTERPRISE_CUSTOMER_CATALOG_DEFAULT_CONTENT_FILTER = {}
ENTERPRISE_CUSTOMER_SUCCESS_EMAIL = "customersuccess@edx.org"
ENTERPRISE_INTEGRATIONS_EMAIL = "enterprise-integrations@edx.org"
# The setting key maps to the channel code (e.g. 'SAP' for success factors), Channel code is defined as
# part of django model of each integrated channel in edx-enterprise.
# The absence of a key/value pair translates to NO LIMIT on the number of "chunks" transmitted per cycle.
INTEGRATED_CHANNELS_API_CHUNK_TRANSMISSION_LIMIT = {}
############## ENTERPRISE SERVICE API CLIENT CONFIGURATION ######################
# The LMS communicates with the Enterprise service via the requests.Session() client
# These default settings are utilized by the LMS when interacting with the service,
@@ -4169,8 +3071,6 @@ DEFAULT_ENTERPRISE_CONSENT_API_URL = Derived(
)
)
ENTERPRISE_CONSENT_API_URL = DEFAULT_ENTERPRISE_CONSENT_API_URL
ENTERPRISE_SERVICE_WORKER_USERNAME = 'enterprise_worker'
ENTERPRISE_API_CACHE_TIMEOUT = 3600 # Value is in seconds
ENTERPRISE_CUSTOMER_LOGO_IMAGE_SIZE = 512 # Enterprise logo image size limit in KB's
# Defines the usernames of service users who should be throttled
# at a higher rate than normal users when making requests of enterprise endpoints.
@@ -4218,7 +3118,7 @@ ENTERPRISE_READONLY_ACCOUNT_FIELDS = [
'country',
]
ENTERPRISE_CUSTOMER_COOKIE_NAME = 'enterprise_customer_uuid'
BASE_COOKIE_DOMAIN = 'localhost'
SYSTEM_TO_FEATURE_ROLE_MAPPING = {
ENTERPRISE_LEARNER_ROLE: [
DEFAULT_ENTERPRISE_ENROLLMENT_INTENTIONS_ROLE,
@@ -4247,8 +3147,6 @@ SYSTEM_TO_FEATURE_ROLE_MAPPING = {
DATA_CONSENT_SHARE_CACHE_TIMEOUT = 8 * 60 * 60 # 8 hours
ENTERPRISE_MARKETING_FOOTER_QUERY_PARAMS = {}
ENTERPRISE_TAGLINE = ''
TRANSCRIPT_LANG_CACHE_TIMEOUT = 60 * 60 * 24 # 24 hours
@@ -4256,15 +3154,8 @@ TRANSCRIPT_LANG_CACHE_TIMEOUT = 60 * 60 * 24 # 24 hours
COURSES_API_CACHE_TIMEOUT = 3600 # Value is in seconds
# Initialize to 'unknown', but read from JSON in production.py
EDX_PLATFORM_REVISION = 'release'
############## Settings for Completion API #########################
# Once a user has watched this percentage of a video, mark it as complete:
# (0.0 = 0%, 1.0 = 100%)
COMPLETION_VIDEO_COMPLETE_PERCENTAGE = 0.95
COMPLETION_BY_VIEWING_DELAY_MS = 5000
############### Settings for Django Rate limit #####################
@@ -4290,121 +3181,9 @@ RATELIMIT_ENABLE = True
# .. setting_tickets: https://github.com/openedx/edx-platform/pull/16951
RATELIMIT_RATE = '120/m'
##### LOGISTRATION RATE LIMIT SETTINGS #####
LOGISTRATION_RATELIMIT_RATE = '100/5m'
LOGISTRATION_PER_EMAIL_RATELIMIT_RATE = '30/5m'
LOGISTRATION_API_RATELIMIT = '20/m'
LOGIN_AND_REGISTER_FORM_RATELIMIT = '100/5m'
RESET_PASSWORD_TOKEN_VALIDATE_API_RATELIMIT = '30/7d'
RESET_PASSWORD_API_RATELIMIT = '30/7d'
OPTIONAL_FIELD_API_RATELIMIT = '10/h'
##### PASSWORD RESET RATE LIMIT SETTINGS #####
PASSWORD_RESET_IP_RATE = '1/m'
PASSWORD_RESET_EMAIL_RATE = '2/h'
# Keeping this for back compatibility with learner dashboard api
GENERAL_RECOMMENDATION = {}
############### Settings for Retirement #####################
# .. setting_name: RETIRED_USERNAME_PREFIX
# .. setting_default: retired__user_
# .. setting_description: Set the prefix part of hashed usernames for retired users. Used by the derived
# setting RETIRED_USERNAME_FMT.
RETIRED_USERNAME_PREFIX = 'retired__user_'
# .. setting_name: RETIRED_EMAIL_PREFIX
# .. setting_default: retired__user_
# .. setting_description: Set the prefix part of hashed emails for retired users. Used by the derived
# setting RETIRED_EMAIL_FMT.
RETIRED_EMAIL_PREFIX = 'retired__user_'
# .. setting_name: RETIRED_EMAIL_DOMAIN
# .. setting_default: retired.invalid
# .. setting_description: Set the domain part of hashed emails for retired users. Used by the derived
# setting RETIRED_EMAIL_FMT.
RETIRED_EMAIL_DOMAIN = 'retired.invalid'
# .. setting_name: RETIRED_USERNAME_FMT
# .. setting_default: retired__user_{}
# .. setting_description: Set the format a retired user username field gets transformed into, where {}
# is replaced with the hash of the original username. This is a derived setting that depends on
# RETIRED_USERNAME_PREFIX value.
RETIRED_USERNAME_FMT = Derived(lambda settings: settings.RETIRED_USERNAME_PREFIX + '{}')
# .. setting_name: RETIRED_EMAIL_FMT
# .. setting_default: retired__user_{}@retired.invalid
# .. setting_description: Set the format a retired user email field gets transformed into, where {} is
# replaced with the hash of the original email. This is a derived setting that depends on
# RETIRED_EMAIL_PREFIX and RETIRED_EMAIL_DOMAIN values.
RETIRED_EMAIL_FMT = Derived(lambda settings: settings.RETIRED_EMAIL_PREFIX + '{}@' + settings.RETIRED_EMAIL_DOMAIN)
# .. setting_name: RETIRED_USER_SALTS
# .. setting_default: ['abc', '123']
# .. setting_description: Set a list of salts used for hashing usernames and emails on users retirement.
# .. setting_warning: Only the last item in this list is used as a salt for all new retirements, but
# historical salts are preserved in order to guarantee that all hashed usernames and emails can still
# be checked.
RETIRED_USER_SALTS = ['abc', '123']
# .. setting_name: RETIREMENT_SERVICE_WORKER_USERNAME
# .. setting_default: RETIREMENT_SERVICE_USER
# .. setting_description: Set the username of the retirement service worker user. Retirement scripts
# authenticate with LMS as this user with oauth client credentials.
RETIREMENT_SERVICE_WORKER_USERNAME = 'RETIREMENT_SERVICE_USER'
# These states are the default, but are designed to be overridden in configuration.
# .. setting_name: RETIREMENT_STATES
# .. setting_default:
# [
# 'PENDING',
# 'LOCKING_ACCOUNT',
# 'LOCKING_COMPLETE',
# 'RETIRING_FORUMS',
# 'FORUMS_COMPLETE',
# 'RETIRING_EMAIL_LISTS',
# 'EMAIL_LISTS_COMPLETE',
# 'RETIRING_ENROLLMENTS',
# 'ENROLLMENTS_COMPLETE',
# 'RETIRING_NOTES',
# 'NOTES_COMPLETE',
# 'RETIRING_LMS',
# 'LMS_COMPLETE',
# 'ERRORED',
# 'ABORTED',
# 'COMPLETE',
# ]
# .. setting_description: Set a list that defines the name and order of states for the retirement
# workflow.
# .. setting_warning: These states are stored in the database and it is the responsibility of the
# administrator to populate the state list since the states can vary across different installations.
# There must be, at minimum, a PENDING state at the beginning, and COMPLETED, ERRORED, and ABORTED
# states at the end of the list.
RETIREMENT_STATES = [
'PENDING',
'LOCKING_ACCOUNT',
'LOCKING_COMPLETE',
# Use these states only when ENABLE_DISCUSSION_SERVICE is True.
'RETIRING_FORUMS',
'FORUMS_COMPLETE',
# TODO - Change these states to be the LMS-only email opt-out - PLAT-2189
'RETIRING_EMAIL_LISTS',
'EMAIL_LISTS_COMPLETE',
'RETIRING_ENROLLMENTS',
'ENROLLMENTS_COMPLETE',
# Use these states only when ENABLE_STUDENT_NOTES is True.
'RETIRING_NOTES',
'NOTES_COMPLETE',
'RETIRING_LMS',
'LMS_COMPLETE',
'ERRORED',
'ABORTED',
'COMPLETE',
]
USERNAME_REPLACEMENT_WORKER = "REPLACE WITH VALID USERNAME"
############## Settings for Microfrontends #########################
# If running a Gradebook container locally,
# modify lms/envs/private.py to give it a non-null value
@@ -4416,19 +3195,10 @@ WRITABLE_GRADEBOOK_URL = None
# learner_profile.redirect_to_microfrontend waffle flag
PROFILE_MICROFRONTEND_URL = None
ORDER_HISTORY_MICROFRONTEND_URL = None
# .. setting_name: ACCOUNT_MICROFRONTEND_URL
# .. setting_default: None
# .. setting_description: Base URL of the micro-frontend-based account settings page.
# .. setting_warning: Also set site's ENABLE_ACCOUNT_MICROFRONTEND and
# account.redirect_to_microfrontend waffle flag
ACCOUNT_MICROFRONTEND_URL = None
AUTHN_MICROFRONTEND_URL = None
AUTHN_MICROFRONTEND_DOMAIN = None
PROGRAM_CONSOLE_MICROFRONTEND_URL = None
# .. setting_name: LEARNING_MICROFRONTEND_URL
# .. setting_default: None
# .. setting_description: Base URL of the micro-frontend-based courseware page.
LEARNING_MICROFRONTEND_URL = None
# .. setting_name: ORA_GRADING_MICROFRONTEND_URL
# .. setting_default: None
# .. setting_description: Base URL of the micro-frontend-based openassessment grading page.
@@ -4443,15 +3213,6 @@ ORA_GRADING_MICROFRONTEND_URL = None
# .. setting_warning: Also set site's openresponseassessment.mfe_views
# waffle flag.
ORA_MICROFRONTEND_URL = None
# .. setting_name: DISCUSSIONS_MICROFRONTEND_URL
# .. setting_default: None
# .. setting_description: Base URL of the micro-frontend-based discussions page.
# .. setting_warning: Also set site's courseware.discussions_mfe waffle flag.
DISCUSSIONS_MICROFRONTEND_URL = None
# .. setting_name: DISCUSSIONS_MFE_FEEDBACK_URL
# .. setting_default: None
# .. setting_description: Base URL of the discussions micro-frontend google form based feedback.
DISCUSSIONS_MFE_FEEDBACK_URL = None
# .. setting_name: EXAMS_DASHBOARD_MICROFRONTEND_URL
# .. setting_default: None
# .. setting_description: Base URL of the exams dashboard micro-frontend for instructors.
@@ -4531,17 +3292,6 @@ ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY = False
# See ENABLE_AUTHN_LOGIN_BLOCK_HIBP_POLICY for more details.
HIBP_LOGIN_BLOCK_PASSWORD_FREQUENCY_THRESHOLD = 5.0
# .. toggle_name: ENABLE_DYNAMIC_REGISTRATION_FIELDS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this toggle adds fields configured in
# REGISTRATION_EXTRA_FIELDS to Authn MFE
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2022-04-21
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-838
ENABLE_DYNAMIC_REGISTRATION_FIELDS = False
############## Settings for EmailChangeMiddleware ###############
# .. toggle_name: ENFORCE_SESSION_EMAIL_MATCH
@@ -4563,34 +3313,17 @@ from openedx.core.djangoapps.ace_common.settings import common as ace_common_set
ACE_ROUTING_KEY = ace_common_settings.ACE_ROUTING_KEY
############### Settings swift #####################################
SWIFT_USERNAME = None
SWIFT_KEY = None
SWIFT_TENANT_ID = None
SWIFT_TENANT_NAME = None
SWIFT_AUTH_URL = None
SWIFT_AUTH_VERSION = None
SWIFT_REGION_NAME = None
SWIFT_USE_TEMP_URLS = None
SWIFT_TEMP_URL_KEY = None
SWIFT_TEMP_URL_DURATION = 1800 # seconds
############### Settings for facebook ##############################
FACEBOOK_APP_ID = None
FACEBOOK_APP_SECRET = None
FACEBOOK_API_VERSION = None
############### Settings for django-fernet-fields ##################
FERNET_KEYS = [
'DUMMY KEY CHANGE BEFORE GOING TO PRODUCTION',
]
############### Settings for user-state-client ##################
# Maximum number of rows to fetch in XBlockUserStateClient calls. Adjust for performance
USER_STATE_BATCH_SIZE = 5000
############### Settings for edx-rbac ###############
SYSTEM_WIDE_ROLE_CLASSES = []
############## Plugin Django Apps #########################
from edx_django_utils.plugins import get_plugin_apps, add_plugins # pylint: disable=wrong-import-position,wrong-import-order
@@ -4598,8 +3331,6 @@ from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType
INSTALLED_APPS.extend(get_plugin_apps(ProjectType.LMS))
add_plugins(__name__, ProjectType.LMS, SettingsType.COMMON)
DEPRECATED_ADVANCED_COMPONENT_TYPES = []
############### Settings for video pipeline ##################
VIDEO_UPLOAD_PIPELINE = {
'VEM_S3_BUCKET': '',
@@ -4607,16 +3338,6 @@ VIDEO_UPLOAD_PIPELINE = {
'ROOT_PATH': '',
}
############### Settings for django file storage ##################
STORAGES = {
'default': {
'BACKEND': 'django.core.files.storage.FileSystemStorage'
},
'staticfiles': {
'BACKEND': 'openedx.core.storage.ProductionStorage'
}
}
### Proctoring configuration (redirct URLs and keys shared between systems) ####
PROCTORING_BACKENDS = {
'DEFAULT': 'null',
@@ -4627,12 +3348,6 @@ PROCTORING_BACKENDS = {
PROCTORED_EXAM_VIEWABLE_PAST_DUE = False
############### The SAML private/public key values ################
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY = ""
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT = ""
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY_DICT = {}
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT_DICT = {}
######################### rate limit for yt_video_metadata api ##############
RATE_LIMIT_FOR_VIDEO_METADATA_API = '10/minute'
@@ -4640,8 +3355,6 @@ RATE_LIMIT_FOR_VIDEO_METADATA_API = '10/minute'
########################## MAILCHIMP SETTINGS #################################
MAILCHIMP_NEW_USER_LIST_ID = ""
SYSLOG_SERVER = ''
FEEDBACK_SUBMISSION_EMAIL = ''
GITHUB_REPO_ROOT = '/edx/var/edxapp/data'
##################### SUPPORT URL ############################
@@ -4658,42 +3371,9 @@ MAX_BLOCKS_PER_CONTENT_LIBRARY = 1000
# https://github.com/SmileyChris/django-countries#show-certain-countries-first
COUNTRIES_FIRST = []
################# Settings for brand logos. #################
LOGO_IMAGE_EXTRA_TEXT = ''
LOGO_URL = None
LOGO_URL_PNG = None
LOGO_TRADEMARK_URL = None
FAVICON_URL = None
DEFAULT_EMAIL_LOGO_URL = 'https://edx-cdn.org/v3/default/logo.png'
################# Settings for olx validation. #################
COURSE_OLX_VALIDATION_STAGE = 1
COURSE_OLX_VALIDATION_IGNORE_LIST = None
################# show account activate cta after register ########################
SHOW_ACTIVATE_CTA_POPUP_COOKIE_NAME = 'show-account-activation-popup'
# .. toggle_name: SOME_FEATURE_NAME
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Flag would be used to show account activation popup after the registration
# .. toggle_use_cases: open_edx
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/27661
# .. toggle_creation_date: 2021-06-10
SHOW_ACCOUNT_ACTIVATION_CTA = False
################# Documentation links for course apps #################
# pylint: disable=line-too-long
CALCULATOR_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/add_calculator.html"
DISCUSSIONS_HELP_URL = "https://docs.openedx.org/en/latest/educators/concepts/communication/about_course_discussions.html"
EDXNOTES_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/enable_notes.html"
PROGRESS_HELP_URL = "https://docs.openedx.org/en/latest/educators/references/data/progress_page.html"
TEAMS_HELP_URL = "https://docs.openedx.org/en/latest/educators/navigation/advanced_features.html#use-teams-in-your-course"
TEXTBOOKS_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/manage_textbooks.html"
WIKI_HELP_URL = "https://docs.openedx.org/en/latest/educators/concepts/communication/about_course_wiki.html"
CUSTOM_PAGES_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/manage_custom_page.html"
COURSE_BULK_EMAIL_HELP_URL = "https://docs.openedx.org/en/latest/educators/references/communication/bulk_email.html"
ORA_SETTINGS_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/Manage_ORA_Assignment.html"
################# Bulk Course Email Settings #################
# If set, recipients of bulk course email messages will be filtered based on the last_login date of their User account.
@@ -4730,9 +3410,6 @@ IS_ELIGIBLE_FOR_FINANCIAL_ASSISTANCE_URL = '/core/api/course_eligibility/'
FINANCIAL_ASSISTANCE_APPLICATION_STATUS_URL = "/core/api/financial_assistance_application/status/"
CREATE_FINANCIAL_ASSISTANCE_APPLICATION_URL = '/core/api/financial_assistance_applications'
# keys for big blue button live provider
COURSE_LIVE_GLOBAL_CREDENTIALS = {}
# .. toggle_name: ENABLE_MFE_CONFIG_API
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
@@ -4809,13 +3486,8 @@ ENTERPRISE_MANUAL_REPORTING_CUSTOMER_UUIDS = []
AVAILABLE_DISCUSSION_TOURS = []
############## NOTIFICATIONS ##############
NOTIFICATIONS_EXPIRY = 60
EXPIRED_NOTIFICATIONS_DELETE_BATCH_SIZE = 10000
NOTIFICATION_CREATION_BATCH_SIZE = 76
NOTIFICATIONS_DEFAULT_FROM_EMAIL = "no-reply@example.com"
NOTIFICATION_TYPE_ICONS = {}
DEFAULT_NOTIFICATION_ICON_URL = ""
NOTIFICATION_DIGEST_LOGO = DEFAULT_EMAIL_LOGO_URL
############## SELF PACED EMAIL ##############
SELF_PACED_BANNER_URL = ""
@@ -4833,23 +3505,13 @@ GOAL_REMINDER_PROFILE_URL = ""
# .. eg ['BTDx', 'MYTx']
DISABLED_ORGS_FOR_PROGRAM_NUDGE = []
############################ AI_TRANSLATIONS ##################################
AI_TRANSLATIONS_API_URL = 'http://localhost:18760/api/v1'
#### django-simple-history##
# disable indexing on date field its coming from django-simple-history.
SIMPLE_HISTORY_DATE_INDEX = False
def _should_send_certificate_events(settings):
return settings.FEATURES['SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS']
return settings.SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS
#### Event bus producing ####
def _should_send_learning_badge_events(settings):
return settings.FEATURES['BADGES_ENABLED']
# .. setting_name: EVENT_BUS_PRODUCER_CONFIG
# .. setting_default: all events disabled
# .. setting_description: Dictionary of event_types mapped to dictionaries of topic to topic-related configuration.
@@ -4929,19 +3591,17 @@ EVENT_BUS_PRODUCER_CONFIG = {
"org.openedx.learning.course.passing.status.updated.v1": {
"learning-badges-lifecycle": {
"event_key_field": "course_passing_status.course.course_key",
"enabled": Derived(_should_send_learning_badge_events),
"enabled": Derived(should_send_learning_badge_events),
},
},
"org.openedx.learning.ccx.course.passing.status.updated.v1": {
"learning-badges-lifecycle": {
"event_key_field": "course_passing_status.course.ccx_course_key",
"enabled": Derived(_should_send_learning_badge_events),
"enabled": Derived(should_send_learning_badge_events),
},
},
}
BEAMER_PRODUCT_ID = ""
#### Survey Report ####
# .. toggle_name: SURVEY_REPORT_ENABLE
# .. toggle_implementation: DjangoSetting

View File

@@ -142,31 +142,31 @@ PIPELINE['SASS_ARGUMENTS'] = '--debug-info'
########################### VERIFIED CERTIFICATES #################################
FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True
AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING = True
########################### External REST APIs #################################
FEATURES['ENABLE_OAUTH2_PROVIDER'] = True
FEATURES['ENABLE_MOBILE_REST_API'] = True
FEATURES['ENABLE_VIDEO_ABSTRACTION_LAYER_API'] = True
ENABLE_OAUTH2_PROVIDER = True
ENABLE_MOBILE_REST_API = True
ENABLE_VIDEO_ABSTRACTION_LAYER_API = True
########################## SECURITY #######################
FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS'] = False
FEATURES['SQUELCH_PII_IN_LOGS'] = False
FEATURES['PREVENT_CONCURRENT_LOGINS'] = False
ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = False
SQUELCH_PII_IN_LOGS = False
PREVENT_CONCURRENT_LOGINS = False
########################### Milestones #################################
FEATURES['MILESTONES_APP'] = True
MILESTONES_APP = True
########################### Entrance Exams #################################
FEATURES['ENTRANCE_EXAMS'] = True
ENTRANCE_EXAMS = True
################################ COURSE LICENSES ################################
FEATURES['LICENSING'] = True
LICENSING = True
########################## Courseware Search #######################
FEATURES['ENABLE_COURSEWARE_SEARCH'] = True
FEATURES['ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF'] = True
ENABLE_COURSEWARE_SEARCH = True
ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF = True
SEARCH_ENGINE = 'search.elastic.ElasticSearchEngine'
SEARCH_COURSEWARE_CONTENT_LOG_PARAMS = True
@@ -179,11 +179,11 @@ ELASTIC_SEARCH_CONFIG = [
]
########################## Dashboard Search #######################
FEATURES['ENABLE_DASHBOARD_SEARCH'] = False
ENABLE_DASHBOARD_SEARCH = False
########################## Certificates Web/HTML View #######################
FEATURES['CERTIFICATES_HTML_VIEW'] = True
CERTIFICATES_HTML_VIEW = True
########################## Course Discovery #######################
@@ -205,14 +205,14 @@ COURSE_DISCOVERY_MEANINGS = {
'language': LANGUAGE_MAP,
}
FEATURES['ENABLE_COURSE_DISCOVERY'] = False
ENABLE_COURSE_DISCOVERY = False
# Setting for overriding default filtering facets for Course discovery
# COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"]
FEATURES['COURSES_ARE_BROWSEABLE'] = True
COURSES_ARE_BROWSEABLE = True
HOMEPAGE_COURSE_MAX = 9
# Software secure fake page feature flag
FEATURES['ENABLE_SOFTWARE_SECURE_FAKE'] = True
ENABLE_SOFTWARE_SECURE_FAKE = True
# Setting for the testing of Software Secure Result Callback
VERIFY_STUDENT["SOFTWARE_SECURE"] = {
@@ -226,14 +226,14 @@ SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True
########################## Shopping cart ##########################
FEATURES['ENABLE_COSMETIC_DISPLAY_PRICE'] = True
ENABLE_COSMETIC_DISPLAY_PRICE = True
######################### Program Enrollments #####################
FEATURES['ENABLE_ENROLLMENT_RESET'] = True
ENABLE_ENROLLMENT_RESET = True
########################## Third Party Auth #######################
if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and (
if ENABLE_THIRD_PARTY_AUTH and (
'common.djangoapps.third_party_auth.dummy.DummyBackend' not in AUTHENTICATION_BACKENDS
):
AUTHENTICATION_BACKENDS = ['common.djangoapps.third_party_auth.dummy.DummyBackend'] + list(AUTHENTICATION_BACKENDS)
@@ -293,7 +293,7 @@ LEARNING_MICROFRONTEND_URL = os.environ.get("LEARNING_MICROFRONTEND_URL", "http:
LEARNING_MICROFRONTEND_NETLOC = os.environ.get("LEARNING_MICROFRONTEND_NETLOC", urlparse(LEARNING_MICROFRONTEND_URL).netloc)
###################### Cross-domain requests ######################
FEATURES['ENABLE_CORS_HEADERS'] = True
ENABLE_CORS_HEADERS = True
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_WHITELIST = ()
CORS_ORIGIN_ALLOW_ALL = True
@@ -407,17 +407,15 @@ DISCUSSION_SPAM_URLS = []
############## Docker based devstack settings #######################
FEATURES.update({
'AUTOMATIC_AUTH_FOR_TESTING': True,
'ENABLE_DISCUSSION_SERVICE': True,
'SHOW_HEADER_LANGUAGE_SELECTOR': True,
AUTOMATIC_AUTH_FOR_TESTING = True
ENABLE_DISCUSSION_SERVICE = True
SHOW_HEADER_LANGUAGE_SELECTOR = True
# Enable enterprise integration by default.
# See https://github.com/openedx/edx-enterprise/blob/master/docs/development.rst for
# more background on edx-enterprise.
# Toggle this off if you don't want anything to do with enterprise in devstack.
'ENABLE_ENTERPRISE_INTEGRATION': True,
})
# Enable enterprise integration by default.
# See https://github.com/openedx/edx-enterprise/blob/master/docs/development.rst for
# more background on edx-enterprise.
# Toggle this off if you don't want anything to do with enterprise in devstack.
ENABLE_ENTERPRISE_INTEGRATION = True
ENABLE_MKTG_SITE = os.environ.get('ENABLE_MARKETING_SITE', False)
MARKETING_SITE_ROOT = os.environ.get('MARKETING_SITE_ROOT', 'http://localhost:8080')
@@ -463,7 +461,7 @@ SYSTEM_WIDE_ROLE_CLASSES.append(
'system_wide_roles.SystemWideRoleAssignment',
)
if FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION'):
if ENABLE_ENTERPRISE_INTEGRATION:
SYSTEM_WIDE_ROLE_CLASSES.append(
'enterprise.SystemWideEnterpriseUserRoleAssignment',
)
@@ -498,8 +496,8 @@ DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL = True
# LOGGING['loggers']['django.db.backends'] = {'handlers': ['console'], 'level': 'DEBUG', 'propagate': False}
################### Special Exams (Proctoring) and Prereqs ###################
FEATURES['ENABLE_SPECIAL_EXAMS'] = True
FEATURES['ENABLE_PREREQUISITE_COURSES'] = True
ENABLE_SPECIAL_EXAMS = True
ENABLE_PREREQUISITE_COURSES = True
# Used in edx-proctoring for ID generation in lieu of SECRET_KEY - dummy value
# (ref MST-637)

View File

@@ -383,10 +383,6 @@ STORAGES:
BACKEND: openedx.core.storage.ProductionStorage
DEFAULT_FROM_EMAIL: sandbox-notifications@example.com
DEFAULT_HASHING_ALGORITHM: sha256
DEFAULT_JWT_ISSUER:
AUDIENCE: SET-ME-PLEASE
ISSUER: https://deploy_host/oauth2
SECRET_KEY: SET-ME-PLEASE
DEFAULT_MOBILE_AVAILABLE: true
DEFAULT_NOTIFICATION_ICON_URL: https://notifications-static.localhost/icons/post_outline.png
DEFAULT_SITE_THEME: localhost
@@ -725,9 +721,6 @@ JWT_AUTH:
JWT_SECRET_KEY: SET-ME-PLEASE
JWT_SIGNING_ALGORITHM: null
JWT_AUTH_ADD_KID_HEADER: true
JWT_EXPIRATION: 30
JWT_ISSUER: https://deploy_host/oauth2
JWT_PRIVATE_SIGNING_KEY: null
LANGUAGE_CODE: en
LANGUAGE_COOKIE: openedx-language-preference
LEARNER_DASHBOARD_AMPLITUDE_MODEL_ID: hello

View File

@@ -32,6 +32,11 @@ from xmodule.modulestore.modulestore_settings import convert_module_store_settin
from .common import *
from openedx.core.lib.features_setting_proxy import FeaturesProxy
# A proxy for feature flags stored in the settings namespace
FEATURES = FeaturesProxy(globals())
def get_env_setting(setting):
""" Get the environment setting or return exception """
@@ -198,7 +203,7 @@ LOGGING = get_logger_config(
service_variant=SERVICE_VARIANT,
)
if FEATURES['ENABLE_CORS_HEADERS'] or FEATURES.get('ENABLE_CROSS_DOMAIN_CSRF_COOKIE'):
if ENABLE_CORS_HEADERS or ENABLE_CROSS_DOMAIN_CSRF_COOKIE:
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_WHITELIST = _YAML_TOKENS.get('CORS_ORIGIN_WHITELIST', ())
CORS_ORIGIN_ALLOW_ALL = _YAML_TOKENS.get('CORS_ORIGIN_ALLOW_ALL', False)
@@ -281,7 +286,7 @@ EVENT_TRACKING_BACKENDS['segmentio']['OPTIONS']['processors'][0]['OPTIONS']['whi
EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST
)
if FEATURES.get('ENABLE_THIRD_PARTY_AUTH'):
if ENABLE_THIRD_PARTY_AUTH:
AUTHENTICATION_BACKENDS = _YAML_TOKENS.get('THIRD_PARTY_AUTH_BACKENDS', [
'social_core.backends.google.GoogleOAuth2',
'social_core.backends.linkedin.LinkedinOAuth2',
@@ -318,7 +323,7 @@ if FEATURES.get('ENABLE_THIRD_PARTY_AUTH'):
THIRD_PARTY_AUTH_CUSTOM_AUTH_FORMS = _YAML_TOKENS.get('THIRD_PARTY_AUTH_CUSTOM_AUTH_FORMS', {})
##### OAUTH2 Provider ##############
if FEATURES['ENABLE_OAUTH2_PROVIDER']:
if ENABLE_OAUTH2_PROVIDER:
OAUTH_ENFORCE_SECURE = True
OAUTH_ENFORCE_CLIENT_SECURE = True
# Defaults for the following are defined in lms.envs.common
@@ -326,10 +331,10 @@ if FEATURES['ENABLE_OAUTH2_PROVIDER']:
OAUTH_EXPIRE_DELTA_PUBLIC = datetime.timedelta(days=OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS)
if (
FEATURES['ENABLE_COURSEWARE_SEARCH'] or
FEATURES['ENABLE_DASHBOARD_SEARCH'] or
FEATURES['ENABLE_COURSE_DISCOVERY'] or
FEATURES['ENABLE_TEAMS']
ENABLE_COURSEWARE_SEARCH or
ENABLE_DASHBOARD_SEARCH or
ENABLE_COURSE_DISCOVERY or
ENABLE_TEAMS
):
# Use ElasticSearch as the search engine herein
SEARCH_ENGINE = "search.elastic.ElasticSearchEngine"
@@ -341,7 +346,7 @@ XBLOCK_SETTINGS.setdefault("VideoBlock", {})["licensing_enabled"] = FEATURES["LI
XBLOCK_SETTINGS.setdefault("VideoBlock", {})['YOUTUBE_API_KEY'] = YOUTUBE_API_KEY
##### Custom Courses for EdX #####
if FEATURES['CUSTOM_COURSES_EDX']:
if CUSTOM_COURSES_EDX:
INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig']
MODULESTORE_FIELD_OVERRIDE_PROVIDERS += (
'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider',
@@ -350,7 +355,7 @@ if FEATURES['CUSTOM_COURSES_EDX']:
FIELD_OVERRIDE_PROVIDERS = tuple(FIELD_OVERRIDE_PROVIDERS)
##### Individual Due Date Extensions #####
if FEATURES['INDIVIDUAL_DUE_DATES']:
if INDIVIDUAL_DUE_DATES:
FIELD_OVERRIDE_PROVIDERS += (
'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider',
)
@@ -375,7 +380,7 @@ PROFILE_IMAGE_DEFAULT_FILENAME = 'images/profiles/default'
##### Credit Provider Integration #####
##################### LTI Provider #####################
if FEATURES['ENABLE_LTI_PROVIDER']:
if ENABLE_LTI_PROVIDER:
INSTALLED_APPS.append('lms.djangoapps.lti_provider.apps.LtiProviderConfig')
AUTHENTICATION_BACKENDS.append('lms.djangoapps.lti_provider.users.LtiBackend')

View File

@@ -27,10 +27,15 @@ from openedx.core.lib.derived import derive_settings
from openedx.core.lib.tempdir import mkdtemp_clean
from xmodule.modulestore.modulestore_settings import update_module_store_settings # lint-amnesty, pylint: disable=wrong-import-order
from openedx.core.lib.features_setting_proxy import FeaturesProxy
from .common import *
from common.djangoapps.util.testing import patch_sessions, patch_testcase # pylint: disable=wrong-import-order
# A proxy for feature flags stored in the settings namespace
FEATURES = FeaturesProxy(globals())
# This patch disables the commit_on_success decorator during tests
# in TestCase subclasses.
patch_testcase()
@@ -55,33 +60,33 @@ MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost')
THIS_UUID = uuid4().hex[:5]
FEATURES['DISABLE_SET_JWT_COOKIES_FOR_TESTS'] = True
DISABLE_SET_JWT_COOKIES_FOR_TESTS = True
# can't test start dates with this True, but on the other hand,
# can test everything else :)
FEATURES['DISABLE_START_DATES'] = True
DISABLE_START_DATES = True
# Most tests don't use the discussion service, so we turn it off to speed them up.
# Tests that do can enable this flag, but must use the UrlResetMixin class to force urls.py
# to reload. For consistency in user-experience, keep the value of this setting in sync with
# the one in cms/envs/test.py
FEATURES['ENABLE_DISCUSSION_SERVICE'] = False
ENABLE_DISCUSSION_SERVICE = False
FEATURES['ENABLE_SERVICE_STATUS'] = True
ENABLE_SERVICE_STATUS = True
FEATURES['ENABLE_VERIFIED_CERTIFICATES'] = True
ENABLE_VERIFIED_CERTIFICATES = True
# Toggles embargo on for testing
FEATURES['EMBARGO'] = True
EMBARGO = True
# Enable the milestones app in tests to be consistent with it being enabled in production
FEATURES['MILESTONES_APP'] = True
MILESTONES_APP = True
FEATURES['ENABLE_ENROLLMENT_TRACK_USER_PARTITION'] = True
ENABLE_ENROLLMENT_TRACK_USER_PARTITION = True
FEATURES['ENABLE_BULK_ENROLLMENT_VIEW'] = True
ENABLE_BULK_ENROLLMENT_VIEW = True
FEATURES['ENABLE_BULK_USER_RETIREMENT'] = True
ENABLE_BULK_USER_RETIREMENT = True
DEFAULT_MOBILE_AVAILABLE = True
@@ -96,6 +101,7 @@ TEST_ROOT = path("test_root")
# Want static files in the same dir for running on jenkins.
STATIC_ROOT = TEST_ROOT / "staticfiles"
WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = STATIC_ROOT / "webpack-stats.json"
WEBPACK_LOADER['DEFAULT']['LOADER_CLASS'] = 'webpack_loader.loader.FakeWebpackLoader'
STATUS_MESSAGE_PATH = TEST_ROOT / "status_message.json"
@@ -221,13 +227,13 @@ CACHES = {
############################# SECURITY SETTINGS ################################
# Default to advanced security in common.py, so tests can reset here to use
# a simpler security model
FEATURES['ENFORCE_PASSWORD_POLICY'] = False
FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS'] = False
FEATURES['SQUELCH_PII_IN_LOGS'] = False
FEATURES['PREVENT_CONCURRENT_LOGINS'] = False
ENFORCE_PASSWORD_POLICY = False
ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = False
SQUELCH_PII_IN_LOGS = False
PREVENT_CONCURRENT_LOGINS = False
######### Third-party auth ##########
FEATURES['ENABLE_THIRD_PARTY_AUTH'] = True
ENABLE_THIRD_PARTY_AUTH = True
AUTHENTICATION_BACKENDS = [
'social_core.backends.google.GoogleOAuth2',
@@ -250,12 +256,12 @@ THIRD_PARTY_AUTH_CUSTOM_AUTH_FORMS = {
}
############################## OAUTH2 Provider ################################
FEATURES['ENABLE_OAUTH2_PROVIDER'] = True
ENABLE_OAUTH2_PROVIDER = True
OAUTH_ENFORCE_SECURE = False
########################### External REST APIs #################################
FEATURES['ENABLE_MOBILE_REST_API'] = True
FEATURES['ENABLE_VIDEO_ABSTRACTION_LAYER_API'] = True
ENABLE_MOBILE_REST_API = True
ENABLE_VIDEO_ABSTRACTION_LAYER_API = True
################################# CELERY ######################################
@@ -343,7 +349,7 @@ PASSWORD_HASHERS = [
]
### This enables the Metrics tab for the Instructor dashboard ###########
FEATURES['CLASS_DASHBOARD'] = True
CLASS_DASHBOARD = True
################### Make tests quieter
@@ -393,13 +399,13 @@ MONGODB_LOG = {
NOTES_DISABLED_TABS = []
# Enable EdxNotes for tests.
FEATURES['ENABLE_EDXNOTES'] = True
ENABLE_EDXNOTES = True
# Enable courseware search for tests
FEATURES['ENABLE_COURSEWARE_SEARCH'] = True
ENABLE_COURSEWARE_SEARCH = True
# Enable dashboard search for tests
FEATURES['ENABLE_DASHBOARD_SEARCH'] = True
ENABLE_DASHBOARD_SEARCH = True
# Use MockSearchEngine as the search engine for test scenario
SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine"
@@ -410,7 +416,7 @@ FACEBOOK_API_VERSION = "v2.8"
######### custom courses #########
INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig']
FEATURES['CUSTOM_COURSES_EDX'] = True
CUSTOM_COURSES_EDX = True
# Set dummy values for profile image settings.
PROFILE_IMAGE_BACKEND = {
@@ -427,12 +433,12 @@ PROFILE_IMAGE_MAX_BYTES = 1024 * 1024
PROFILE_IMAGE_MIN_BYTES = 100
# Enable the LTI provider feature for testing
FEATURES['ENABLE_LTI_PROVIDER'] = True
ENABLE_LTI_PROVIDER = True
INSTALLED_APPS.append('lms.djangoapps.lti_provider.apps.LtiProviderConfig')
AUTHENTICATION_BACKENDS.append('lms.djangoapps.lti_provider.users.LtiBackend')
# Financial assistance page
FEATURES['ENABLE_FINANCIAL_ASSISTANCE_FORM'] = True
ENABLE_FINANCIAL_ASSISTANCE_FORM = True
COURSE_BLOCKS_API_EXTRA_FIELDS = [
('course', 'course_visibility'),

View File

@@ -24,7 +24,7 @@ def plugin_settings(settings): # lint-amnesty, pylint: disable=missing-function
settings.ACE_ROUTING_KEY = ACE_ROUTING_KEY
settings.FEATURES['test_django_plugin'] = True
settings.test_django_plugin = True
settings.FCM_APP_NAME = 'fcm-edx-platform'
settings.ACE_CHANNEL_DEFAULT_PUSH = 'push_notification'

View File

@@ -71,9 +71,8 @@ class CourseDetails:
self.pre_requisite_courses = [] # pre-requisite courses
self.entrance_exam_enabled = "" # is entrance exam enabled
self.entrance_exam_id = "" # the content location for the entrance exam
self.entrance_exam_minimum_score_pct = settings.FEATURES.get(
'ENTRANCE_EXAM_MIN_SCORE_PCT',
'50'
self.entrance_exam_minimum_score_pct = str(
settings.ENTRANCE_EXAM_MIN_SCORE_PCT
) # minimum passing score for entrance exam content module/tree,
self.self_paced = None
self.learning_info = []

View File

@@ -0,0 +1,106 @@
"""
Features Proxy Implementation
"""
import warnings
from collections.abc import MutableMapping, Mapping
class FeaturesProxy(MutableMapping):
"""
A proxy for feature flags stored in the settings namespace.
Features:
- Flattens features from configuration (e.g., YAML or env) into the local settings namespace.
- Automatically updates `django.conf.settings` when a feature is modified.
- Acts like a dict (get, set, update, etc.).
Example usage:
fp = FeaturesProxy(LocalNamespace)
fp["NEW_FEATURE"] = True
val = fp.get("EXISTING_FLAG", False)
"""
def __init__(self, namespace=None):
"""Store the namespace (as a dict)"""
self.ns = namespace or {}
def __getitem__(self, key):
"""Retrieve a feature flag by key"""
return self.ns[key]
def __setitem__(self, key, value):
"""Sets a key-value pair while emitting a deprecation warning about using FEATURES as a dict."""
warnings.warn(
f"Accessing FEATURES as a dict is deprecated. "
f"Add '{key} = {value!r}' to your Django settings module instead of modifying FEATURES.",
DeprecationWarning,
stacklevel=2
)
self.ns[key] = value
def __delitem__(self, key):
"""Remove a feature flag from the namespace."""
del self.ns[key]
def __iter__(self):
return iter(self.ns)
def __len__(self):
return len(self.ns)
def __contains__(self, key):
return key in self.ns
def clear(self):
"""Remove all feature flags from the namespace."""
self.ns.clear()
def get(self, key, default=None):
"""Standard dict-style get with default"""
return self.ns.get(key, default)
def update(self, other=(), /, **kwds):
"""
Update multiple features at once, ensuring each goes through __setitem__
to emit deprecation warnings.
Mirrors dict.update() behavior:
- If `other` is a mapping, uses its keys.
- If `other` is iterable of pairs, updates from those.
- Then applies any keyword arguments.
Examples:
proxy.update({'FEATURE_A': True})
-> other = {'FEATURE_A': True}
proxy.update([('FEATURE_A', True)])
-> other = [('FEATURE_A', True)]
proxy.update(FEATURE_B=False)
-> kwds = {'FEATURE_B': False}
proxy.update({'FEATURE_A': True}, FEATURE_B=False)
-> other={'FEATURE_A': True}; kwds = {'FEATURE_B': False}
"""
if isinstance(other, Mapping):
# Handles objects that formally conform to the Mapping interface
# Mapping-like types: defaultdict, OrderedDict, Counter
for key in other:
self[key] = other[key]
elif hasattr(other, "keys"):
# Fallback for objects that implement a .keys() method but
# may not formally subclass Mapping
for key in other.keys():
self[key] = other[key]
else:
for key, value in other:
self[key] = value
for key, value in kwds.items():
self[key] = value
def copy(self):
"""
Return a shallow copy of the underlying namespace wrapped in a new FeaturesProxy.
"""
return FeaturesProxy(self.ns.copy())

View File

@@ -6,6 +6,14 @@ environments. It centralizes common settings in one place and reduces duplicatio
Service-specific settings should import from this module and override as needed.
WARNING: Mutable values defined in this file may be unintentionally modified
downstream, if settings are shared across services. Some settings modules
(cms/envs/common.py, cms/envs/test.py) import settings across services
(the CMS imports settings from the LMS). In such cases, if an LMS settings
module modifies a mutable value defined here, the final value of the corresponding
CMS setting may also be affected. To avoid this risk, create a deep copy of the
value in the module that modifies it.
Note: More settings will be added to this file as the effort to simplify
settings moves forward. See docs/decisions/0022-settings-simplification.rst for
more details on the effort to simplify settings across Open edX services.
@@ -23,7 +31,7 @@ from path import Path as path
from django.utils.translation import gettext_lazy as _
from openedx.core.lib.derived import Derived
from openedx.core.release import doc_version
from openedx.core.djangoapps.theming.helpers_dirs import (
get_themes_unchecked,
get_theme_base_dirs_from_settings
@@ -101,9 +109,61 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'openedx.core.lib.session_serializers.PickleSerializer'
STATICI18N_OUTPUT_DIR = "js/i18n"
ADMINS = []
MANAGERS = ADMINS
DEFAULT_FROM_EMAIL = 'registration@example.com'
SERVER_EMAIL = 'devops@example.com'
# See https://github.com/openedx/edx-django-sites-extensions for more info.
# Default site to use if site matching request headers does not exist.
SITE_ID = 1
# Clickjacking protection can be disbaled by setting this to 'ALLOW'
X_FRAME_OPTIONS = 'DENY'
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "common.djangoapps.util.password_policy_validators.MinimumLengthValidator",
"OPTIONS": {
"min_length": 8
}
},
{
"NAME": "common.djangoapps.util.password_policy_validators.MaximumLengthValidator",
"OPTIONS": {
"max_length": 75
}
},
]
STORAGES = {
'default': {
'BACKEND': 'django.core.files.storage.FileSystemStorage'
},
'staticfiles': {
'BACKEND': 'openedx.core.storage.ProductionStorage'
}
}
# Messages
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
# these languages display right to left
LANGUAGES_BIDI = ("he", "ar", "fa", "ur", "fa-ir", "rtl")
LANGUAGE_COOKIE_NAME = "openedx-language-preference"
LOCALE_PATHS = Derived(_make_locale_paths)
# Sourced from http://www.localeplanet.com/icu/ and wikipedia
LANGUAGES = [
@@ -189,34 +249,18 @@ LANGUAGES = [
('zh-tw', '中文 (台灣)'), # Chinese (Taiwan)
]
# these languages display right to left
LANGUAGES_BIDI = ("he", "ar", "fa", "ur", "fa-ir", "rtl")
############################## Site Settings ###############################
LANGUAGE_COOKIE_NAME = "openedx-language-preference"
HTTPS = 'on'
SITE_NAME = "localhost"
FAVICON_PATH = 'images/favicon.ico'
LOCALE_PATHS = Derived(_make_locale_paths)
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "common.djangoapps.util.password_policy_validators.MinimumLengthValidator",
"OPTIONS": {
"min_length": 8
}
},
{
"NAME": "common.djangoapps.util.password_policy_validators.MaximumLengthValidator",
"OPTIONS": {
"max_length": 75
}
},
]
# See https://github.com/openedx/edx-django-sites-extensions for more info.
# Default site to use if site matching request headers does not exist.
SITE_ID = 1
BUGS_EMAIL = 'bugs@example.com'
CONTACT_EMAIL = 'info@example.com'
DEFAULT_FEEDBACK_EMAIL = 'feedback@example.com'
PRESS_EMAIL = 'press@example.com'
TECH_SUPPORT_EMAIL = 'technical@example.com'
UNIVERSITY_EMAIL = 'university@example.com'
################################# Language #################################
@@ -444,6 +488,23 @@ REST_FRAMEWORK = {
},
}
# .. setting_name: REGISTRATION_VALIDATION_RATELIMIT
# .. setting_default: 30/7d
# .. setting_description: Whenever a user tries to register on edx, the data entered during registration
# is validated via RegistrationValidationView.
# It's POST endpoint is rate-limited up to 30 requests per IP Address in a week by default.
# It was introduced because an attacker can guess or brute force a series of names to enumerate valid users.
# .. setting_tickets: https://github.com/openedx/edx-platform/pull/24664
REGISTRATION_VALIDATION_RATELIMIT = '30/7d'
# .. setting_name: REGISTRATION_RATELIMIT
# .. setting_default: 60/7d
# .. setting_description: New users are registered on edx via RegistrationView.
# It's POST end-point is rate-limited up to 60 requests per IP Address in a week by default.
# Purpose of this setting is to restrict an attacker from registering numerous fake accounts.
# .. setting_tickets: https://github.com/openedx/edx-platform/pull/27060
REGISTRATION_RATELIMIT = '60/7d'
################################## Celery ##################################
BROKER_HEARTBEAT = 60.0
@@ -458,6 +519,30 @@ CELERY_BROKER_VHOST = ''
CELERY_RESULT_BACKEND = 'django-cache'
CELERY_EVENT_QUEUE_TTL = None
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
# Message configuration
CELERY_MESSAGE_COMPRESSION = 'gzip'
# Results configuration
CELERY_IGNORE_RESULT = False
CELERY_STORE_ERRORS_EVEN_IF_IGNORED = True
# Events configuration
CELERY_TRACK_STARTED = True
CELERY_SEND_EVENTS = True
CELERY_SEND_TASK_SENT_EVENT = True
# Exchange configuration
CELERY_DEFAULT_EXCHANGE = 'edx.core'
CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
# Queues configuration
CELERY_QUEUE_HA_POLICY = 'all'
CELERY_CREATE_MISSING_QUEUES = True
# Checks run in normal mode by the heartbeat djangoapp
HEARTBEAT_CHECKS = [
'openedx.core.djangoapps.heartbeat.default_checks.check_modulestore',
@@ -527,6 +612,723 @@ JWT_AUTH = {
'JWT_AUTH_HEADER_PREFIX': 'JWT',
}
################################# Features #################################
# .. setting_name: PLATFORM_NAME
# .. setting_default: Your Platform Name Here
# .. setting_description: The display name of the platform to be used in
# templates/emails/etc.
PLATFORM_NAME = _('Your Platform Name Here')
PLATFORM_DESCRIPTION = _('Your Platform Description Here')
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
ENABLE_JASMINE = False
# .. toggle_name: DISABLE_START_DATES
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When True, all courses will be active, regardless of start
# date.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2012-07-24
# .. toggle_warning: This will cause ALL courses to be immediately visible.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/17913
## DO NOT SET TO True IN THIS FILE
## Doing so will cause all courses to be released on production
DISABLE_START_DATES = False
# .. toggle_name: ENABLE_DISCUSSION_SERVICE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When True, it will enable the Discussion tab in courseware for all courses. Setting this
# to False will not contain inline discussion components and discussion tab in any courses.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2012-08-14
# .. toggle_warning: If the discussion panel is present in the course and the value for this flag is False then,
# attempting to expand those components will cause errors. So, this should only be set to False with an LMS that
# is running courses that do not contain discussion components.
# For consistency in user-experience, keep the value in sync with the setting of the same name in the CMS.
ENABLE_DISCUSSION_SERVICE = True
# .. toggle_name: ENABLE_TEXTBOOK
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Add PDF and HTML textbook tabs to the courseware.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-03-27
# .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name
# in the CMS.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/3064
ENABLE_TEXTBOOK = True
# .. toggle_name: ENABLE_OAUTH2_PROVIDER
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable this feature to allow this Open edX platform to be an OAuth2 authentication
# provider. This is necessary to enable some other features, such as the REST API for the mobile application.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2014-09-09
# .. toggle_target_removal_date: None
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
ENABLE_OAUTH2_PROVIDER = False
# Allows to configure the LMS to provide CORS headers to serve requests from other
# domains
ENABLE_CORS_HEADERS = False
# Can be turned off to disable the help link in the navbar
# .. toggle_name: ENABLE_HELP_LINK
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When True, a help link is displayed on the main navbar. Set False to hide it.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-03-05
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/26106
ENABLE_HELP_LINK = True
# Enable URL that shows information about the status of various services
ENABLE_SERVICE_STATUS = False
# Don't autoplay videos for students/course authors
AUTOPLAY_VIDEOS = False
# Move the student/course author to next page when a video finishes. Set to
# True to show an auto-advance button in videos. If False, videos never
# auto-advance.
ENABLE_AUTOADVANCE_VIDEOS = False
# .. toggle_name: CUSTOM_COURSES_EDX
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable Custom Courses for edX, a feature that is more commonly known as
# CCX. Documentation for configuring and using this feature is available at
# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/enable_ccx.html
# .. toggle_warning: When set to true, 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider' will
# be added to MODULESTORE_FIELD_OVERRIDE_PROVIDERS
# .. toggle_use_cases: opt_in, circuit_breaker
# .. toggle_creation_date: 2015-04-10
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6636
CUSTOM_COURSES_EDX = False
# Settings for course import olx validation
ENABLE_COURSE_OLX_VALIDATION = False
# .. toggle_name: AUTOMATIC_AUTH_FOR_TESTING
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to perform acceptance and load test. Auto auth view is responsible for load
# testing and is controlled by this feature flag. Session verification (of CacheBackedAuthenticationMiddleware)
# is a security feature, but it can be turned off by enabling this feature flag.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-07-25
# .. toggle_warning: If this has been set to True then the account activation email will be skipped.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/417
AUTOMATIC_AUTH_FOR_TESTING = False
# .. toggle_name: RESTRICT_AUTOMATIC_AUTH
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Prevent auto auth from creating superusers or modifying existing users. Auto auth is a
# mechanism where superusers can simply modify attributes of other users by accessing the "/auto_auth url" with
# the right
# querystring parameters.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-05-07
# .. toggle_tickets: https://openedx.atlassian.net/browse/TE-2545
RESTRICT_AUTOMATIC_AUTH = True
# .. toggle_name: EMBARGO
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Turns on embargo functionality, which blocks users from
# the site or courses based on their location. Embargo can restrict users by states
# and whitelist/blacklist (IP Addresses (ie. 10.0.0.0), Networks (ie. 10.0.0.0/24)), or the user profile country.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-02-27
# .. toggle_target_removal_date: None
# .. toggle_warning: reverse proxy should be configured appropriately for example Client IP address headers
# (e.g HTTP_X_FORWARDED_FOR) should be configured.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2749
EMBARGO = False
# .. toggle_name: ENABLE_MKTG_SITE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Toggle to enable alternate urls for marketing links.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-03-24
# .. toggle_warning: When this is enabled, the MKTG_URLS setting should be defined. The use case of this feature
# toggle is uncertain.
ENABLE_MKTG_SITE = False
# Expose Mobile REST API. Note that if you use this, you must also set
# ENABLE_OAUTH2_PROVIDER to True
ENABLE_MOBILE_REST_API = False
# Let students save and manage their annotations
# .. toggle_name: settings.ENABLE_EDXNOTES
# .. toggle_implementation: SettingToggle
# .. toggle_default: False
# .. toggle_description: This toggle enables the students to save and manage their annotations in the
# course using the notes service. The bulk of the actual work in storing the notes is done by
# a separate service (see the edx-notes-api repo).
# .. toggle_warning: Requires the edx-notes-api service properly running and to have configured the django settings
# EDXNOTES_INTERNAL_API and EDXNOTES_PUBLIC_API. If you update this setting, also update it in Studio.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-01-04
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6321
ENABLE_EDXNOTES = False
# Toggle to enable coordination with the Publisher tool (keep in sync between the LMS and CMS)
ENABLE_PUBLISHER = False
# Milestones application flag
MILESTONES_APP = False
# Prerequisite courses feature flag
ENABLE_PREREQUISITE_COURSES = False
# .. toggle_name: LICENSING
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Toggle platform-wide course licensing. The course.license attribute is then used to append
# license information to the courseware.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-05-14
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7315
LICENSING = False
# .. toggle_name: CERTIFICATES_HTML_VIEW
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable course certificates on your instance of Open edX.
# .. toggle_warning: You must enable this feature flag in both Studio and the LMS and complete the configuration tasks
# described here:
# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/enable_certificates.html pylint: disable=line-too-long,useless-suppression
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-03-13
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7113
CERTIFICATES_HTML_VIEW = False
# Teams feature
ENABLE_TEAMS = True
# Show video bumper
ENABLE_VIDEO_BUMPER = False
# How many seconds to show the bumper again, default is 7 days:
SHOW_BUMPER_PERIODICITY = 7 * 24 * 3600
# .. toggle_name: ENABLE_SPECIAL_EXAMS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable to use special exams, aka timed and proctored exams.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-09-04
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/9744
ENABLE_SPECIAL_EXAMS = False
# .. toggle_name: SHOW_HEADER_LANGUAGE_SELECTOR
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True, language selector will be visible in the header.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-05-25
# .. toggle_warning: You should set the languages in the DarkLangConfig table to get this working. If you have
# not set any languages in the DarkLangConfig table then the language selector will not be visible in the header.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15133
SHOW_HEADER_LANGUAGE_SELECTOR = False
# At edX it's safe to assume that English transcripts are always available
# This is not the case for all installations.
# The default value here and in xmodule/tests/test_video.py should be consistent.
FALLBACK_TO_ENGLISH_TRANSCRIPTS = True
# .. toggle_name: SHOW_FOOTER_LANGUAGE_SELECTOR
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When set to True, language selector will be visible in the footer.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-05-25
# .. toggle_warning: LANGUAGE_COOKIE_NAME is required to use footer-language-selector, set it if it has not been set.
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15133
SHOW_FOOTER_LANGUAGE_SELECTOR = False
# .. toggle_name: ENABLE_CSMH_EXTENDED
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Write Courseware Student Module History (CSMH) to the extended table: this logs all
# student activities to MySQL, in a separate database.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-11-05
# .. toggle_warning: Even though most Open edX instances run with a separate CSMH database, it may not always be
# the case. When disabling this feature flag, remember to remove "lms.djangoapps.coursewarehistoryextended"
# from the INSTALLED_APPS and the "StudentModuleHistoryExtendedRouter" from the DATABASE_ROUTERS. This is needed
# in the LMS and CMS for migration consistency.
ENABLE_CSMH_EXTENDED = True
# Read from both the CSMH and CSMHE history tables.
# This is the default, but can be disabled if all history
# lives in the Extended table, saving the frontend from
# making multiple queries.
ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES = True
# Set this to False to facilitate cleaning up invalid xml from your modulestore.
ENABLE_XBLOCK_XML_VALIDATION = True
# .. toggle_name: ALLOW_PUBLIC_ACCOUNT_CREATION
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Allow public account creation. If this is disabled, users will no longer have access to
# the signup page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-04-12
# .. toggle_tickets: https://openedx.atlassian.net/browse/YONK-513
ALLOW_PUBLIC_ACCOUNT_CREATION = True
# .. toggle_name: SHOW_REGISTRATION_LINKS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Allow registration links. If this is disabled, users will no longer see buttons to the
# the signup page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-03-27
SHOW_REGISTRATION_LINKS = True
# Whether or not the dynamic EnrollmentTrackUserPartition should be registered.
ENABLE_ENROLLMENT_TRACK_USER_PARTITION = True
# .. toggle_name: ENABLE_PASSWORD_RESET_FAILURE_EMAIL
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether to send an email for failed password reset attempts or not. This happens when a
# user asks for a password reset but they don't have an account associated to their email. This is useful for
# notifying users that they don't have an account associated with email addresses they believe they've registered
# with. This setting can be overridden by a site-specific configuration.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-07-20
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1832
ENABLE_PASSWORD_RESET_FAILURE_EMAIL = False
# Enable feature to remove enrollments and users. Used to reset state of master's integration environments
ENABLE_ENROLLMENT_RESET = False
# .. toggle_name: settings.DISABLE_MOBILE_COURSE_AVAILABLE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to remove Mobile Course Available UI Flag from Studio's Advanced Settings
# page else Mobile Course Available UI Flag will be available on Studio side.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-02-14
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/23073
DISABLE_MOBILE_COURSE_AVAILABLE = False
# .. toggle_name: ENABLE_CHANGE_USER_PASSWORD_ADMIN
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable changing a user password through django admin. This is disabled by
# default because enabling allows a method to bypass password policy.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-02-21
# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/21616'
ENABLE_CHANGE_USER_PASSWORD_ADMIN = False
### ORA Feature Flags ###
# .. toggle_name: ENABLE_ORA_ALL_FILE_URLS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not
# discoverable. If enabled, will iterate through all possible file key suffixes up to the max for displaying
# file metadata in staff assessments.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
ENABLE_ORA_ALL_FILE_URLS = False
# .. toggle_name: ENABLE_ORA_USER_STATE_UPLOAD_DATA
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not
# discoverable. If enabled, will pull file metadata from StudentModule.state for display in staff assessments.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
ENABLE_ORA_USER_STATE_UPLOAD_DATA = False
# .. toggle_name: ENABLE_INTEGRITY_SIGNATURE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Whether to display honor code agreement for learners before their first grade assignment.
# The honor code agreement replaces the ID verification requirement (https://github.com/edx/edx-name-affirmation).
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-02-15
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1348'
ENABLE_INTEGRITY_SIGNATURE = False
# .. toggle_name: ENABLE_LTI_PII_ACKNOWLEDGEMENT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables the lti pii acknowledgement feature for a course
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-10
# .. toggle_target_removal_date: None
# .. toggle_tickets: 'https://2u-internal.atlassian.net/browse/MST-2055'
ENABLE_LTI_PII_ACKNOWLEDGEMENT = False
# .. toggle_name: MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If enabled, the Library Content Block is marked as complete when users view it.
# Otherwise (by default), all children of this block must be completed.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2022-03-22
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/28268
# .. toggle_warning: For consistency in user-experience, keep the value in sync between the LMS and CMS
MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW = False
# .. toggle_name: DISABLE_UNENROLLMENT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to disable self-unenrollments via REST API.
# This also hides the "Unenroll" button on the Learner Dashboard.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-10-11
# .. toggle_warning: For consistency in user experience, keep the value in sync with the setting of the same name
# in the LMS and CMS.
# .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429'
DISABLE_UNENROLLMENT = False
# .. toggle_name: ENABLE_GRADING_METHOD_IN_PROBLEMS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enables the grading method feature in capa problems.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-03-22
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33911
ENABLE_GRADING_METHOD_IN_PROBLEMS = False
# .. toggle_name: BADGES_ENABLED
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Set to True to enable badges functionality.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-04-02
# .. toggle_target_removal_date: None
BADGES_ENABLED = False
# .. toggle_name: ENABLE_CREDIT_ELIGIBILITY
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: When enabled, it is possible to define a credit eligibility criteria in the CMS. A "Credit
# Eligibility" section then appears for those courses in the LMS.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-06-17
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/8550
ENABLE_CREDIT_ELIGIBILITY = True
# .. toggle_name: ENABLE_COPPA_COMPLIANCE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When True, enforces COPPA compliance and removes YOB field from registration form and account
# .. settings page. Also hide YOB banner from profile page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-10-27
# .. toggle_tickets: 'https://openedx.atlassian.net/browse/VAN-622'
ENABLE_COPPA_COMPLIANCE = False
###################### CAPA External Code Evaluation #######################
# Used with XQueue
XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
XQUEUE_INTERFACE = {
'url': 'http://localhost:18040',
'basic_auth': ['edx', 'edx'],
'django_auth': {
'username': 'lms',
'password': 'password'
}
}
########################### Cache Configuration ############################
CACHES = {
'course_structure_cache': {
'KEY_PREFIX': 'course_structure',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': '604800', # 1 week
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'celery': {
'KEY_PREFIX': 'celery',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': '7200',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'mongo_metadata_inheritance': {
'KEY_PREFIX': 'mongo_metadata_inheritance',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'TIMEOUT': 300,
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'staticfiles': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'staticfiles_general',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'default': {
'VERSION': '1',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'default',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'configuration': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'configuration',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
'general': {
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': ['localhost:11211'],
'KEY_PREFIX': 'general',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'OPTIONS': {
'no_delay': True,
'ignore_exc': True,
'use_pooling': True,
'connect_timeout': 0.5
}
},
}
################################### CSRF ###################################
CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52
# It is highly recommended that you override this in any environment accessed by
# end users
CSRF_COOKIE_SECURE = False
# If setting a cross-domain cookie, it's really important to choose
# a name for the cookie that is DIFFERENT than the cookies used
# by each subdomain. For example, suppose the applications
# at these subdomains are configured to use the following cookie names:
#
# 1) foo.example.com --> "csrftoken"
# 2) baz.example.com --> "csrftoken"
# 3) bar.example.com --> "csrftoken"
#
# For the cross-domain version of the CSRF cookie, you need to choose
# a name DIFFERENT than "csrftoken"; otherwise, the new token configured
# for ".example.com" could conflict with the other cookies,
# non-deterministically causing 403 responses.
CROSS_DOMAIN_CSRF_COOKIE_NAME = ''
# When setting the domain for the "cross-domain" version of the CSRF
# cookie, you should choose something like: ".example.com"
# (note the leading dot), where both the referer and the host
# are subdomains of "example.com".
#
# Browser security rules require that
# the cookie domain matches the domain of the server; otherwise
# the cookie won't get set. And once the cookie gets set, the client
# needs to be on a domain that matches the cookie domain, otherwise
# the client won't be able to read the cookie.
CROSS_DOMAIN_CSRF_COOKIE_DOMAIN = ''
CSRF_TRUSTED_ORIGINS = []
ENABLE_CROSS_DOMAIN_CSRF_COOKIE = False
########################## Cross-domain Requests ###########################
if ENABLE_CORS_HEADERS:
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_WHITELIST = ()
CORS_ORIGIN_ALLOW_ALL = False
CORS_ALLOW_INSECURE = False
# .. setting_name: LOGIN_REDIRECT_WHITELIST
# .. setting_default: empty list ([])
# .. setting_description: While logout, if logout request has a redirect-url as query strings,
# then the redirect-url is validated through LOGIN_REDIRECT_WHITELIST.
LOGIN_REDIRECT_WHITELIST = []
######################## Social Media Footer Links #########################
# The footer URLs dictionary maps social footer names
# to URLs defined in configuration.
SOCIAL_MEDIA_FOOTER_ACE_URLS = {
'reddit': 'http://www.reddit.com/r/edx',
'twitter': 'https://twitter.com/edXOnline',
'linkedin': 'http://www.linkedin.com/company/edx',
'facebook': 'http://www.facebook.com/EdxOnline',
}
# The social media logo urls dictionary maps social media names
# to the respective icons
SOCIAL_MEDIA_LOGO_URLS = {
'reddit': 'http://email-media.s3.amazonaws.com/edX/2021/social_5_reddit.png',
'twitter': 'http://email-media.s3.amazonaws.com/edX/2021/social_2_twitter.png',
'linkedin': 'http://email-media.s3.amazonaws.com/edX/2021/social_3_linkedin.png',
'facebook': 'http://email-media.s3.amazonaws.com/edX/2021/social_1_fb.png',
}
############################# Block Structures #############################
# .. setting_name: BLOCK_STRUCTURES_SETTINGS
# .. setting_default: dict of settings
# .. setting_description: Stores all the settings used by block structures and block structure
# related tasks. See BLOCK_STRUCTURES_SETTINGS[XXX] documentation for details of each setting.
# For more information, check https://github.com/openedx/edx-platform/pull/13388.
BLOCK_STRUCTURES_SETTINGS = dict(
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['COURSE_PUBLISH_TASK_DELAY']
# .. setting_default: 30
# .. setting_description: Delay, in seconds, after a new edit of a course is published before
# updating the block structures cache. This is needed for a better chance at getting
# the latest changes when there are secondary reads in sharded mongoDB clusters.
# For more information, check https://github.com/openedx/edx-platform/pull/13388 and
# https://github.com/openedx/edx-platform/pull/14571.
COURSE_PUBLISH_TASK_DELAY=30,
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['TASK_DEFAULT_RETRY_DELAY']
# .. setting_default: 30
# .. setting_description: Delay, in seconds, between retry attempts if a block structure task
# fails. For more information, check https://github.com/openedx/edx-platform/pull/13388 and
# https://github.com/openedx/edx-platform/pull/14571.
TASK_DEFAULT_RETRY_DELAY=30,
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['TASK_MAX_RETRIES']
# .. setting_default: 5
# .. setting_description: Maximum number of retries per block structure task.
# If the maximum number of retries is exceeded, then you can attempt to either manually run
# the celery task, or wait for it to be triggered again.
# For more information, check https://github.com/openedx/edx-platform/pull/13388 and
# https://github.com/openedx/edx-platform/pull/14571.
TASK_MAX_RETRIES=5,
)
################################ Bulk Email ################################
# Suffix used to construct 'from' email address for bulk emails.
# A course-specific identifier is prepended.
BULK_EMAIL_DEFAULT_FROM_EMAIL = 'no-reply@example.com'
# Parameters for breaking down course enrollment into subtasks.
BULK_EMAIL_EMAILS_PER_TASK = 500
# Flag to indicate if individual email addresses should be logged as they are sent
# a bulk email message.
BULK_EMAIL_LOG_SENT_EMAILS = False
################################## Video ###################################
YOUTUBE = {
# YouTube JavaScript API
'API': 'https://www.youtube.com/iframe_api',
'TEST_TIMEOUT': 1500,
# URL to get YouTube metadata
'METADATA_URL': 'https://www.googleapis.com/youtube/v3/videos/',
# Web page mechanism for scraping transcript information from youtube video pages
'TRANSCRIPTS': {
'CAPTION_TRACKS_REGEX': r"captionTracks\"\:\[(?P<caption_tracks>[^\]]+)",
'YOUTUBE_URL_BASE': 'https://www.youtube.com/watch?v=',
'ALLOWED_LANGUAGE_CODES': ["en", "en-US", "en-GB"],
},
'IMAGE_API': 'http://img.youtube.com/vi/{youtube_id}/0.jpg', # /maxresdefault.jpg for 1920*1080
}
YOUTUBE_API_KEY = 'PUT_YOUR_API_KEY_HERE'
########################### Video Image Storage ############################
VIDEO_IMAGE_SETTINGS = dict(
VIDEO_IMAGE_MAX_BYTES=2 * 1024 * 1024, # 2 MB
VIDEO_IMAGE_MIN_BYTES=2 * 1024, # 2 KB
# Backend storage
# STORAGE_CLASS='storages.backends.s3boto3.S3Boto3Storage',
# STORAGE_KWARGS=dict(bucket='video-image-bucket'),
STORAGE_KWARGS=dict(
location=MEDIA_ROOT,
),
DIRECTORY_PREFIX='video-images/',
BASE_URL=MEDIA_URL,
)
VIDEO_IMAGE_MAX_AGE = 31536000
######################## Video Transcripts Storage #########################
VIDEO_TRANSCRIPTS_SETTINGS = dict(
VIDEO_TRANSCRIPTS_MAX_BYTES=3 * 1024 * 1024, # 3 MB
# Backend storage
# STORAGE_CLASS='storages.backends.s3boto3.S3Boto3Storage',
# STORAGE_KWARGS=dict(bucket='video-transcripts-bucket'),
STORAGE_KWARGS=dict(
location=MEDIA_ROOT,
),
DIRECTORY_PREFIX='video-transcripts/',
BASE_URL=MEDIA_URL,
)
VIDEO_TRANSCRIPTS_MAX_AGE = 31536000
############################ Parental Controls #############################
# .. setting_name: PARENTAL_CONSENT_AGE_LIMIT
@@ -535,6 +1337,26 @@ JWT_AUTH = {
# or ``None`` if parental consent is never required.
PARENTAL_CONSENT_AGE_LIMIT = 13
########################### Instructor Downloads ###########################
# These keys are used for all of our asynchronous downloadable files, including
# the ones that contain information other than grades.
GRADES_DOWNLOAD = {
'STORAGE_CLASS': 'django.core.files.storage.FileSystemStorage',
'STORAGE_KWARGS': {
'location': '/tmp/edx-s3/grades',
},
'STORAGE_TYPE': None,
'BUCKET': None,
'ROOT_PATH': None,
}
FINANCIAL_REPORTS = {
'STORAGE_TYPE': 'localfs',
'BUCKET': None,
'ROOT_PATH': 'sandbox',
}
############################### Registration ###############################
# .. setting_name: REGISTRATION_EMAIL_PATTERNS_ALLOWED
@@ -543,6 +1365,20 @@ PARENTAL_CONSENT_AGE_LIMIT = 13
# to only emails that match a regex in this list. Set to ``None`` to allow any email (default).
REGISTRATION_EMAIL_PATTERNS_ALLOWED = None
# String length for the configurable part of the auto-generated username
AUTO_GENERATED_USERNAME_RANDOM_STRING_LENGTH = 4
SHOW_ACTIVATE_CTA_POPUP_COOKIE_NAME = 'show-account-activation-popup'
# .. toggle_name: SOME_FEATURE_NAME
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Flag would be used to show account activation popup after the registration
# .. toggle_use_cases: open_edx
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/27661
# .. toggle_creation_date: 2021-06-10
SHOW_ACCOUNT_ACTIVATION_CTA = False
######################### Course Enrollment Modes ##########################
# The min_price key refers to the minimum price allowed for an instance
@@ -642,6 +1478,113 @@ ENTERPRISE_BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL = "http://127.0.0.1:8000/oaut
ASSET_IGNORE_REGEX = r"(^\._.*$)|(^\.DS_Store$)|(^.*~$)"
DATABASES = {
# edxapp's edxapp-migrate scripts and the edxapp_migrate play
# will ensure that any DB not named read_replica will be migrated
# for both the lms and cms.
'default': {
'ATOMIC_REQUESTS': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
},
'read_replica': {
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
},
'student_module_history': {
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'edxapp_csmh',
'OPTIONS': {},
'PASSWORD': 'password',
'PORT': '3306',
'USER': 'edxapp001'
}
}
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
DEFAULT_HASHING_ALGORITHM = 'sha256'
############################# Micro-frontends ##############################
# .. setting_name: ACCOUNT_MICROFRONTEND_URL
# .. setting_default: None
# .. setting_description: Base URL of the micro-frontend-based account settings page.
# .. setting_warning: Also set site's ENABLE_ACCOUNT_MICROFRONTEND and
# account.redirect_to_microfrontend waffle flag
ACCOUNT_MICROFRONTEND_URL = None
# .. setting_name: LEARNING_MICROFRONTEND_URL
# .. setting_default: None
# .. setting_description: Base URL of the micro-frontend-based courseware page.
LEARNING_MICROFRONTEND_URL = None
# .. setting_name: DISCUSSIONS_MICROFRONTEND_URL
# .. setting_default: None
# .. setting_description: Base URL of the micro-frontend-based discussions page.
# .. setting_warning: Also set site's courseware.discussions_mfe waffle flag.
DISCUSSIONS_MICROFRONTEND_URL = None
# .. setting_name: DISCUSSIONS_MFE_FEEDBACK_URL
# .. setting_default: None
# .. setting_description: Base URL of the discussions micro-frontend google form based feedback.
DISCUSSIONS_MFE_FEEDBACK_URL = None
# .. toggle_name: ENABLE_DYNAMIC_REGISTRATION_FIELDS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this toggle adds fields configured in
# REGISTRATION_EXTRA_FIELDS to Authn MFE
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2022-04-21
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/VAN-838
ENABLE_DYNAMIC_REGISTRATION_FIELDS = False
################################## Swift ###################################
SWIFT_USERNAME = None
SWIFT_KEY = None
SWIFT_TENANT_ID = None
SWIFT_TENANT_NAME = None
SWIFT_AUTH_URL = None
SWIFT_AUTH_VERSION = None
SWIFT_REGION_NAME = None
SWIFT_USE_TEMP_URLS = None
SWIFT_TEMP_URL_KEY = None
SWIFT_TEMP_URL_DURATION = 1800 # seconds
################################### SAML ###################################
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY = ""
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT = ""
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY_DICT = {}
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT_DICT = {}
########################### django-fernet-fields ###########################
FERNET_KEYS = [
'DUMMY KEY CHANGE BEFORE GOING TO PRODUCTION',
]
########################## django-simple-history ###########################
# disable indexing on date field its coming from django-simple-history.
SIMPLE_HISTORY_DATE_INDEX = False
########################### Django OAuth Toolkit ###########################
# This is required for the migrations in oauth_dispatch.models
@@ -687,6 +1630,36 @@ PROFILE_IMAGE_SIZES_MAP = {
'small': 30
}
################################## XBlock ##################################
# .. setting_name: XBLOCK_EXTRA_MIXINS
# .. setting_default: ()
# .. setting_description: Custom mixins that will be dynamically added to every XBlock and XBlockAside instance.
# These can be classes or dotted-path references to classes.
# For example: `XBLOCK_EXTRA_MIXINS = ('my_custom_package.my_module.MyCustomMixin',)`
XBLOCK_EXTRA_MIXINS = ()
# .. setting_name: XBLOCK_FIELD_DATA_WRAPPERS
# .. setting_default: ()
# .. setting_description: Paths to wrapper methods which should be applied to every XBlock's FieldData.
XBLOCK_FIELD_DATA_WRAPPERS = ()
XBLOCK_FS_STORAGE_BUCKET = None
XBLOCK_FS_STORAGE_PREFIX = None
# .. setting_name: XBLOCK_SETTINGS
# .. setting_default: {}
# .. setting_description: Dictionary containing server-wide configuration of XBlocks on a per-type basis.
# By default, keys should match the XBlock `block_settings_key` attribute/property. If the attribute/property
# is not defined, use the XBlock class name. Check `xmodule.services.SettingsService`
# for more reference.
XBLOCK_SETTINGS = {}
# .. setting_name: XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE
# .. setting_default: default
# .. setting_description: The django cache key of the cache to use for storing anonymous user state for XBlocks.
XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE = 'default'
######################## Built-in Blocks Extraction ########################
# The following Django settings flags have been introduced temporarily to facilitate
@@ -775,6 +1748,17 @@ USE_EXTRACTED_PROBLEM_BLOCK = False
# .. toggle_target_removal_date: 2025-06-01
USE_EXTRACTED_VIDEO_BLOCK = False
############################## Marketing Site ##############################
EDXMKTG_LOGGED_IN_COOKIE_NAME = 'edxloggedin'
EDXMKTG_USER_INFO_COOKIE_NAME = 'edx-user-info'
EDXMKTG_USER_INFO_COOKIE_VERSION = 1
MKTG_URLS = {}
MKTG_URL_OVERRIDES = {}
SUPPORT_SITE_LINK = ''
################################# ChatGPT ##################################
CHAT_COMPLETION_API = ''
@@ -796,6 +1780,471 @@ AWS_S3_CUSTOM_DOMAIN = 'edxuploads.s3.amazonaws.com'
AWS_SES_REGION_NAME = 'us-east-1'
AWS_SES_REGION_ENDPOINT = 'email.us-east-1.amazonaws.com'
AWS_ACCESS_KEY_ID = None
AWS_SECRET_ACCESS_KEY = None
################################ Optimizely ################################
OPTIMIZELY_PROJECT_ID = None
OPTIMIZELY_FULLSTACK_SDK_KEY = None
################################# Zendesk ##################################
ZENDESK_URL = ''
ZENDESK_CUSTOM_FIELDS = {}
ZENDESK_OAUTH_ACCESS_TOKEN = ''
# A mapping of string names to Zendesk Group IDs
# To get the IDs of your groups you can go to
# {zendesk_url}/api/v2/groups.json
ZENDESK_GROUP_ID_MAPPING = {}
############################## Python sandbox ##############################
# Some courses are allowed to run unsafe code. This is a list of regexes, one
# of them must match the course id for that course to run unsafe code.
#
# For example:
#
# COURSES_WITH_UNSAFE_CODE = [
# r"Harvard/XY123.1/.*"
# ]
COURSES_WITH_UNSAFE_CODE = []
# Code jail REST service
ENABLE_CODEJAIL_REST_SERVICE = False
# .. setting_name: CODE_JAIL_REST_SERVICE_REMOTE_EXEC
# .. setting_default: 'xmodule.capa.safe_exec.remote_exec.send_safe_exec_request_v0'
# .. setting_description: Set the python package.module.function that is reponsible of
# calling the remote service in charge of jailed code execution
CODE_JAIL_REST_SERVICE_REMOTE_EXEC = 'xmodule.capa.safe_exec.remote_exec.send_safe_exec_request_v0'
# .. setting_name: CODE_JAIL_REST_SERVICE_HOST
# .. setting_default: 'http://127.0.0.1:8550'
# .. setting_description: Set the codejail remote service host
CODE_JAIL_REST_SERVICE_HOST = 'http://127.0.0.1:8550'
# .. setting_name: CODE_JAIL_REST_SERVICE_CONNECT_TIMEOUT
# .. setting_default: 0.5
# .. setting_description: Set the number of seconds LMS will wait to establish an internal
# connection to the codejail remote service.
CODE_JAIL_REST_SERVICE_CONNECT_TIMEOUT = 0.5 # time in seconds
# .. setting_name: CODE_JAIL_REST_SERVICE_READ_TIMEOUT
# .. setting_default: 3.5
# .. setting_description: Set the number of seconds LMS/CMS will wait for a response from the
# codejail remote service endpoint.
CODE_JAIL_REST_SERVICE_READ_TIMEOUT = 3.5 # time in seconds
####################### Locale/Internationalization ########################
# Locale/Internationalization
CELERY_TIMEZONE = 'UTC'
TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
# Languages supported for custom course certificate templates
CERTIFICATE_TEMPLATE_LANGUAGES = {
'en': 'English',
'es': 'Español',
}
USE_I18N = True
USE_L10N = True
STATICI18N_FILENAME_FUNCTION = 'statici18n.utils.legacy_filename'
STATICI18N_OUTPUT_DIR = "js/i18n"
################################# Pipeline #################################
STATICFILES_STORAGE_KWARGS = {}
# List of finder classes that know how to find static files in various locations.
# Note: the pipeline finder is included to be able to discover optimized files
STATICFILES_FINDERS = [
'openedx.core.djangoapps.theming.finders.ThemeFilesFinder',
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'openedx.core.lib.xblock_pipeline.finder.XBlockPipelineFinder',
'pipeline.finders.PipelineFinder',
]
############################## django-require ##############################
# The baseUrl to pass to the r.js optimizer, relative to STATIC_ROOT.
REQUIRE_BASE_URL = "./"
# Whether to run django-require in debug mode.
REQUIRE_DEBUG = False
########################### Student Verification ###########################
VERIFY_STUDENT = {
"DAYS_GOOD_FOR": 365, # How many days is a verficiation good for?
# The variable represents the window within which a verification is considered to be "expiring soon."
"EXPIRING_SOON_WINDOW": 28,
}
################################## ORA 2 ###################################
# Default File Upload Storage bucket and prefix. Used by the FileUpload Service.
FILE_UPLOAD_STORAGE_BUCKET_NAME = 'SET-ME-PLEASE (ex. bucket-name)'
FILE_UPLOAD_STORAGE_PREFIX = 'submissions_attachments'
############################## Authentication ##############################
##### ACCOUNT LOCKOUT DEFAULT PARAMETERS #####
# .. setting_name: MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED
# .. setting_default: 6
# .. setting_description: Specifies the maximum failed login attempts allowed to users. Once the user reaches this
# failure threshold then the account will be locked for a configurable amount of seconds (30 minutes) which will
# prevent additional login attempts until this time period has passed. This setting is related with
# MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS and only used when ENABLE_MAX_FAILED_LOGIN_ATTEMPTS is enabled.
MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 6
# .. setting_name: MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS
# .. setting_default: 30 * 60
# .. setting_description: Specifies the lockout period in seconds for consecutive failed login attempts. Once the user
# reaches the threshold of the login failure, then the account will be locked for the given amount of seconds
# (30 minutes) which will prevent additional login attempts until this time period has passed. This setting is
# related with MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED and only used when ENABLE_MAX_FAILED_LOGIN_ATTEMPTS is enabled.
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 30 * 60
PASSWORD_POLICY_COMPLIANCE_ROLLOUT_CONFIG = {
'ENFORCE_COMPLIANCE_ON_LOGIN': False
}
SESSION_INACTIVITY_TIMEOUT_IN_SECONDS = None
# List of logout URIs for each IDA that the learner should be logged out of when they logout of the LMS
# or CMS. Only applies to IDA for which the social auth flow uses DOT (Django OAuth Toolkit).
IDA_LOGOUT_URI_LIST = []
### External auth usage -- prefixes for ENROLLMENT_DOMAIN
SHIBBOLETH_DOMAIN_PREFIX = 'shib:'
# This is the domain that is used to set shared cookies between various sub-domains.
SHARED_COOKIE_DOMAIN = Derived(lambda settings: settings.SESSION_COOKIE_DOMAIN)
################################ Analytics #################################
ANALYTICS_DASHBOARD_URL = 'http://localhost:18110/courses'
ANALYTICS_DASHBOARD_NAME = 'Your Platform Name Here Insights'
################################ Discovery #################################
# which access.py permission name to check in order to determine if a course is visible in
# the course catalog. We default this to the legacy permission 'see_exists'.
COURSE_CATALOG_VISIBILITY_PERMISSION = 'see_exists'
# which access.py permission name to check in order to determine if a course about page is
# visible. We default this to the legacy permission 'see_exists'.
COURSE_ABOUT_VISIBILITY_PERMISSION = 'see_exists'
DEFAULT_COURSE_VISIBILITY_IN_CATALOG = "both"
# .. toggle_name: DEFAULT_MOBILE_AVAILABLE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: This specifies if the courses are available for mobile by default. To make any individual
# course available for mobile one can set the value of Mobile Course Available to true in Advanced Settings from the
# studio when this is False.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-01-26
# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1985
DEFAULT_MOBILE_AVAILABLE = False
COURSE_CATALOG_URL_ROOT = 'http://localhost:8008'
COURSE_CATALOG_API_URL = f'{COURSE_CATALOG_URL_ROOT}/api/v1'
################################## Search ##################################
# Use None for the default search engine
SEARCH_ENGINE = None
############################### Credentials ################################
CREDENTIALS_INTERNAL_SERVICE_URL = 'http://localhost:8005'
CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:8005'
# time between scheduled runs, in seconds
NOTIFY_CREDENTIALS_FREQUENCY = 14400
CREDENTIALS_SERVICE_USERNAME = 'credentials_service_user'
################################## Themes ##################################
# .. setting_name: COMPREHENSIVE_THEME_DIRS
# .. setting_default: []
# .. setting_description: A list of paths to directories, each of which will
# be searched for comprehensive themes. Do not override this Django setting directly.
# Instead, set the COMPREHENSIVE_THEME_DIRS environment variable, using colons (:) to
# separate paths.
COMPREHENSIVE_THEME_DIRS = os.environ.get("COMPREHENSIVE_THEME_DIRS", "").split(":")
# .. setting_name: DEFAULT_SITE_THEME
# .. setting_default: None
# .. setting_description: Theme to use when no site or site theme is defined, for example
# "dark-theme". Set to None if you want to use openedx default theme.
# .. setting_warning: The theme folder needs to be in 'edx-platform/themes' or define the path
# to the theme folder in COMPREHENSIVE_THEME_DIRS. To be effective, ENABLE_COMPREHENSIVE_THEMING
# has to be enabled.
DEFAULT_SITE_THEME = None
# .. toggle_name: ENABLE_COMPREHENSIVE_THEMING
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: When enabled, this toggle activates the use of the custom theme
# defined by DEFAULT_SITE_THEME.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2016-06-30
ENABLE_COMPREHENSIVE_THEMING = False
################################ Ecommerce #################################
ECOMMERCE_PUBLIC_URL_ROOT = 'http://localhost:8002'
ECOMMERCE_API_URL = 'http://localhost:8002/api/v2'
ECOMMERCE_API_SIGNING_KEY = 'SET-ME-PLEASE'
################################ Enterprise ################################
# The default value of this needs to be a 16 character string
ENTERPRISE_CUSTOMER_CATALOG_DEFAULT_CONTENT_FILTER = {}
# The setting key maps to the channel code (e.g. 'SAP' for success factors), Channel code is defined as
# part of django model of each integrated channel in edx-enterprise.
# The absence of a key/value pair translates to NO LIMIT on the number of "chunks" transmitted per cycle.
INTEGRATED_CHANNELS_API_CHUNK_TRANSMISSION_LIMIT = {}
ENTERPRISE_SERVICE_WORKER_USERNAME = 'enterprise_worker'
ENTERPRISE_API_CACHE_TIMEOUT = 3600 # Value is in seconds
BASE_COOKIE_DOMAIN = 'localhost'
ENTERPRISE_MARKETING_FOOTER_QUERY_PARAMS = {}
################################## Exams ###################################
EXAMS_SERVICE_URL = 'http://localhost:18740/api/v1'
############################## Credit Courses ##############################
# 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
# Secret keys shared with credit providers.
# Used to digitally sign credit requests (us --> provider)
# and validate responses (provider --> us).
# Each key in the dictionary is a credit provider ID, and
# the value is the 32-character key.
CREDIT_PROVIDER_SECRET_KEYS = {}
# 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
################################ Completion ################################
# Once a user has watched this percentage of a video, mark it as complete:
# (0.0 = 0%, 1.0 = 100%)
COMPLETION_VIDEO_COMPLETE_PERCENTAGE = 0.95
############################### Rate Limits ################################
##### LOGISTRATION RATE LIMIT SETTINGS #####
LOGISTRATION_RATELIMIT_RATE = '100/5m'
LOGISTRATION_PER_EMAIL_RATELIMIT_RATE = '30/5m'
LOGISTRATION_API_RATELIMIT = '20/m'
LOGIN_AND_REGISTER_FORM_RATELIMIT = '100/5m'
RESET_PASSWORD_TOKEN_VALIDATE_API_RATELIMIT = '30/7d'
RESET_PASSWORD_API_RATELIMIT = '30/7d'
OPTIONAL_FIELD_API_RATELIMIT = '10/h'
##### PASSWORD RESET RATE LIMIT SETTINGS #####
PASSWORD_RESET_IP_RATE = '1/m'
PASSWORD_RESET_EMAIL_RATE = '2/h'
################################### Help ###################################
HELP_TOKENS_LANGUAGE_CODE = Derived(lambda settings: settings.LANGUAGE_CODE)
HELP_TOKENS_VERSION = Derived(lambda settings: doc_version())
HELP_TOKENS_BOOKS = {
'learner': 'https://edx.readthedocs.io/projects/open-edx-learner-guide',
'course_author': 'https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course',
}
################################ Retirement ################################
# .. setting_name: RETIRED_USERNAME_PREFIX
# .. setting_default: retired__user_
# .. setting_description: Set the prefix part of hashed usernames for retired users. Used by the derived
# setting RETIRED_USERNAME_FMT.
RETIRED_USERNAME_PREFIX = 'retired__user_'
# .. setting_name: RETIRED_EMAIL_PREFIX
# .. setting_default: retired__user_
# .. setting_description: Set the prefix part of hashed emails for retired users. Used by the derived
# setting RETIRED_EMAIL_FMT.
RETIRED_EMAIL_PREFIX = 'retired__user_'
# .. setting_name: RETIRED_EMAIL_DOMAIN
# .. setting_default: retired.invalid
# .. setting_description: Set the domain part of hashed emails for retired users. Used by the derived
# setting RETIRED_EMAIL_FMT.
RETIRED_EMAIL_DOMAIN = 'retired.invalid'
# .. setting_name: RETIRED_USERNAME_FMT
# .. setting_default: retired__user_{}
# .. setting_description: Set the format a retired user username field gets transformed into, where {}
# is replaced with the hash of the original username. This is a derived setting that depends on
# RETIRED_USERNAME_PREFIX value.
RETIRED_USERNAME_FMT = Derived(lambda settings: settings.RETIRED_USERNAME_PREFIX + '{}')
# .. setting_name: RETIRED_EMAIL_FMT
# .. setting_default: retired__user_{}@retired.invalid
# .. setting_description: Set the format a retired user email field gets transformed into, where {} is
# replaced with the hash of the original email. This is a derived setting that depends on
# RETIRED_EMAIL_PREFIX and RETIRED_EMAIL_DOMAIN values.
RETIRED_EMAIL_FMT = Derived(lambda settings: settings.RETIRED_EMAIL_PREFIX + '{}@' + settings.RETIRED_EMAIL_DOMAIN)
# .. setting_name: RETIRED_USER_SALTS
# .. setting_default: ['abc', '123']
# .. setting_description: Set a list of salts used for hashing usernames and emails on users retirement.
# .. setting_warning: Only the last item in this list is used as a salt for all new retirements, but
# historical salts are preserved in order to guarantee that all hashed usernames and emails can still
# be checked.
RETIRED_USER_SALTS = ['abc', '123']
# .. setting_name: RETIREMENT_SERVICE_WORKER_USERNAME
# .. setting_default: RETIREMENT_SERVICE_USER
# .. setting_description: Set the username of the retirement service worker user. Retirement scripts
# authenticate with LMS as this user with oauth client credentials.
RETIREMENT_SERVICE_WORKER_USERNAME = 'RETIREMENT_SERVICE_USER'
# These states are the default, but are designed to be overridden in configuration.
# .. setting_name: RETIREMENT_STATES
# .. setting_default:
# [
# 'PENDING',
# 'LOCKING_ACCOUNT',
# 'LOCKING_COMPLETE',
# 'RETIRING_FORUMS',
# 'FORUMS_COMPLETE',
# 'RETIRING_EMAIL_LISTS',
# 'EMAIL_LISTS_COMPLETE',
# 'RETIRING_ENROLLMENTS',
# 'ENROLLMENTS_COMPLETE',
# 'RETIRING_NOTES',
# 'NOTES_COMPLETE',
# 'RETIRING_LMS',
# 'LMS_COMPLETE',
# 'ERRORED',
# 'ABORTED',
# 'COMPLETE',
# ]
# .. setting_description: Set a list that defines the name and order of states for the retirement
# workflow.
# .. setting_warning: These states are stored in the database and it is the responsibility of the
# administrator to populate the state list since the states can vary across different installations.
# There must be, at minimum, a PENDING state at the beginning, and COMPLETED, ERRORED, and ABORTED
# states at the end of the list.
RETIREMENT_STATES = [
'PENDING',
'LOCKING_ACCOUNT',
'LOCKING_COMPLETE',
# Use these states only when ENABLE_DISCUSSION_SERVICE is True.
'RETIRING_FORUMS',
'FORUMS_COMPLETE',
# TODO - Change these states to be the LMS-only email opt-out - PLAT-2189
'RETIRING_EMAIL_LISTS',
'EMAIL_LISTS_COMPLETE',
'RETIRING_ENROLLMENTS',
'ENROLLMENTS_COMPLETE',
# Use these states only when ENABLE_STUDENT_NOTES is True.
'RETIRING_NOTES',
'NOTES_COMPLETE',
'RETIRING_LMS',
'LMS_COMPLETE',
'ERRORED',
'ABORTED',
'COMPLETE',
]
USERNAME_REPLACEMENT_WORKER = "REPLACE WITH VALID USERNAME"
################################# edx-rbac #################################
SYSTEM_WIDE_ROLE_CLASSES = []
############################### Brand Logos ################################
LOGO_IMAGE_EXTRA_TEXT = ''
LOGO_URL = None
LOGO_URL_PNG = None
LOGO_TRADEMARK_URL = None
FAVICON_URL = None
DEFAULT_EMAIL_LOGO_URL = 'https://edx-cdn.org/v3/default/logo.png'
############################## Course Import ###############################
COURSE_OLX_VALIDATION_STAGE = 1
COURSE_OLX_VALIDATION_IGNORE_LIST = None
############################## Documentation ###############################
CALCULATOR_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/add_calculator.html"
DISCUSSIONS_HELP_URL = "https://docs.openedx.org/en/latest/educators/concepts/communication/about_course_discussions.html"
EDXNOTES_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/enable_notes.html"
PROGRESS_HELP_URL = "https://docs.openedx.org/en/latest/educators/references/data/progress_page.html"
TEAMS_HELP_URL = "https://docs.openedx.org/en/latest/educators/navigation/advanced_features.html#use-teams-in-your-course"
TEXTBOOKS_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/manage_textbooks.html"
WIKI_HELP_URL = "https://docs.openedx.org/en/latest/educators/concepts/communication/about_course_wiki.html"
CUSTOM_PAGES_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/manage_custom_page.html"
ORA_SETTINGS_HELP_URL = "https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/Manage_ORA_Assignment.html"
########################## API Access Management ###########################
API_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/'
AUTH_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html'
API_ACCESS_FROM_EMAIL = 'api-requests@example.com'
API_ACCESS_MANAGER_EMAIL = 'api-access@example.com'
############################## Notifications ###############################
NOTIFICATIONS_EXPIRY = 60
EXPIRED_NOTIFICATIONS_DELETE_BATCH_SIZE = 10000
NOTIFICATION_CREATION_BATCH_SIZE = 76
NOTIFICATIONS_DEFAULT_FROM_EMAIL = "no-reply@example.com"
NOTIFICATION_DIGEST_LOGO = DEFAULT_EMAIL_LOGO_URL
############################# AI Translations ##############################
AI_TRANSLATIONS_API_URL = 'http://localhost:18760/api/v1'
################################ Event Bus #################################
def should_send_learning_badge_events(settings):
return settings.BADGES_ENABLED
############################## Miscellaneous ###############################
COURSE_MODE_DEFAULTS = {
@@ -840,29 +2289,23 @@ ENTERPRISE_ENROLLMENT_API_URL = Derived(
lambda settings: (settings.LMS_INTERNAL_ROOT_URL or '') + settings.LMS_ENROLLMENT_API_PATH
)
# This is the domain that is used to set shared cookies between various sub-domains.
SHARED_COOKIE_DOMAIN = Derived(lambda settings: settings.SESSION_COOKIE_DOMAIN)
SESSION_INACTIVITY_TIMEOUT_IN_SECONDS = None
STATIC_ROOT_BASE = None
VIDEO_CDN_URL = {
# 'EXAMPLE_COUNTRY_CODE': "http://example.com/edx/video?s3_url="
}
# List of logout URIs for each IDA that the learner should be logged out of when they logout of the LMS
# or CMS. Only applies to IDA for which the social auth flow uses DOT (Django OAuth Toolkit).
IDA_LOGOUT_URI_LIST = []
SOFTWARE_SECURE_VERIFICATION_ROUTING_KEY = Derived(lambda settings: settings.HIGH_PRIORITY_QUEUE)
# Queue to use for updating grades due to grading policy change
POLICY_CHANGE_GRADES_ROUTING_KEY = Derived(lambda settings: settings.DEFAULT_PRIORITY_QUEUE)
# Rate limit for regrading tasks that a grading policy change can kick off
POLICY_CHANGE_TASK_RATE_LIMIT = '900/h'
# Queue to use for individual learner course regrades
SINGLE_LEARNER_COURSE_REGRADE_ROUTING_KEY = Derived(lambda settings: settings.DEFAULT_PRIORITY_QUEUE)
STATIC_ROOT_BASE = None
# .. setting_name: STATIC_URL_BASE
# .. setting_default: "None"
# .. setting_description: The LMS and CMS use this to construct ``STATIC_URL`` by appending
@@ -881,8 +2324,92 @@ COMPREHENSIVE_THEME_LOCALE_PATHS = []
# "PREPEND_LOCALE_PATHS" : ["/edx/my-locales/"].
PREPEND_LOCALE_PATHS = []
# API access management
API_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/'
AUTH_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html'
# Used with Email sending
RETRY_ACTIVATION_EMAIL_MAX_ATTEMPTS = 5
RETRY_ACTIVATION_EMAIL_TIMEOUT = 0.5
CSRF_TRUSTED_ORIGINS = []
# Software Secure request retry settings
# Time in seconds before a retry of the task should be 60 mints.
SOFTWARE_SECURE_REQUEST_RETRY_DELAY = 60 * 60
# Maximum of 6 retries before giving up.
SOFTWARE_SECURE_RETRY_MAX_ATTEMPTS = 6
MARKETING_EMAILS_OPT_IN = False
# Set request limits for maximum size of a request body and maximum number of GET/POST parameters. (>=Django 1.10)
# Limits are currently disabled - but can be used for finer-grained denial-of-service protection.
DATA_UPLOAD_MAX_MEMORY_SIZE = None
DATA_UPLOAD_MAX_NUMBER_FIELDS = None
# License for serving content in China
ICP_LICENSE = None
ICP_LICENSE_INFO = {}
ELASTIC_SEARCH_CONFIG = [
{
'use_ssl': False,
'host': 'localhost',
'port': 9200
}
]
LOGGING_ENV = 'sandbox'
EDX_ROOT_URL = ''
PARTNER_SUPPORT_EMAIL = ''
LOCAL_LOGLEVEL = "INFO"
LOG_DIR = '/edx/var/log/edx'
DJFS = {
'type': 'osfs',
'directory_root': '/edx/var/edxapp/django-pyfs/static/django-pyfs',
'url_root': '/static/django-pyfs',
}
# Embargo
EMBARGO_SITE_REDIRECT_URL = None
# shoppingcart Payment
PAYMENT_SUPPORT_EMAIL = 'billing@example.com'
# Platform for Privacy Preferences header
P3P_HEADER = 'CP="Open EdX does not have a P3P policy."'
# .. setting_name: CUSTOM_RESOURCE_TEMPLATES_DIRECTORY
# .. setting_default: None
# .. setting_description: Path to an existing directory of YAML files containing
# html content to be used with the subclasses of xmodule.x_module.ResourceTemplates.
# Default example templates can be found in xmodule/templates/html.
# Note that the extension used is ".yaml" and not ".yml".
# See xmodule.x_module.ResourceTemplates for usage.
# "CUSTOM_RESOURCE_TEMPLATES_DIRECTORY" : null
CUSTOM_RESOURCE_TEMPLATES_DIRECTORY = None
# Affiliate cookie tracking
AFFILIATE_COOKIE_NAME = 'dev_affiliate_id'
ENTRANCE_EXAM_MIN_SCORE_PCT = 50
# Initialize to 'release', but read from JSON in production.py
EDX_PLATFORM_REVISION = 'release'
# Proctoring configuration (redirct URLs and keys shared between systems)
PROCTORING_BACKENDS = {
'DEFAULT': 'null',
# The null key needs to be quoted because
# null is a language independent type in YAML
'null': {}
}
DEPRECATED_ADVANCED_COMPONENT_TYPES = []
SYSLOG_SERVER = ''
FEEDBACK_SUBMISSION_EMAIL = ''
# keys for big blue button live provider
COURSE_LIVE_GLOBAL_CREDENTIALS = {}
BEAMER_PRODUCT_ID = ""

View File

@@ -16,6 +16,6 @@ def plugin_settings(settings):
.. toggle_creation_date: 2017-11-08
.. toggle_tickets: https://github.com/openedx/edx-platform/pull/16496
"""
settings.FEATURES['ENABLE_ANNOUNCEMENTS'] = False
settings.ENABLE_ANNOUNCEMENTS = False
# Configure number of announcements to show per page
settings.FEATURES['ANNOUNCEMENTS_PER_PAGE'] = 5
settings.ANNOUNCEMENTS_PER_PAGE = 5

View File

@@ -5,4 +5,4 @@ def plugin_settings(settings):
"""
Test settings for Announcements
"""
settings.FEATURES['ENABLE_ANNOUNCEMENTS'] = True
settings.ENABLE_ANNOUNCEMENTS = True

75
package-lock.json generated
View File

@@ -71,8 +71,8 @@
"underscore": "1.13.7",
"underscore.string": "3.3.6",
"webpack": "^5.90.3",
"webpack-bundle-tracker": "0.4.3",
"webpack-merge": "4.2.2",
"webpack-bundle-tracker": "3.2.1",
"webpack-merge": "6.0.1",
"which-country": "1.0.0"
},
"devDependencies": {
@@ -6570,7 +6570,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
"integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-plain-object": "^2.0.4",
@@ -7368,15 +7367,6 @@
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
"license": "MIT"
},
"node_modules/deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"license": "MIT",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/deep-is": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
@@ -9304,7 +9294,6 @@
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
"integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==",
"dev": true,
"license": "BSD-3-Clause",
"bin": {
"flat": "cli.js"
@@ -13036,6 +13025,16 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/karma-webpack/node_modules/webpack-merge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz",
"integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==",
"dev": true,
"license": "MIT",
"dependencies": {
"lodash": "^4.17.15"
}
},
"node_modules/karma/node_modules/lodash": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
@@ -13057,7 +13056,6 @@
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -17644,7 +17642,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
"integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
"dev": true,
"license": "MIT",
"dependencies": {
"kind-of": "^6.0.2"
@@ -20484,36 +20481,10 @@
}
},
"node_modules/webpack-bundle-tracker": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/webpack-bundle-tracker/-/webpack-bundle-tracker-0.4.3.tgz",
"integrity": "sha512-Sl/+OsNhFAH3/c6XADupRu8jLvGojfXX0pZIIm3O5ZcJqkHHqlY4nLG+NVRcbDgM/jOeWimKDGQMVEa8FBeJ2g==",
"license": "MIT",
"dependencies": {
"deep-extend": "^0.6.0",
"mkdirp": "^0.5.1",
"strip-ansi": "^5.2.0"
}
},
"node_modules/webpack-bundle-tracker/node_modules/ansi-regex": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
"integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/webpack-bundle-tracker/node_modules/strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"license": "MIT",
"dependencies": {
"ansi-regex": "^4.1.0"
},
"engines": {
"node": ">=6"
}
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/webpack-bundle-tracker/-/webpack-bundle-tracker-3.2.1.tgz",
"integrity": "sha512-N1bi1Kok4kexXUvez2Jwrq2SpA4xm6JZfqK9L5hXNbe3E5pR4oS7UYgOq1ALapP89oRjHXc3fzblqDqo+zag2A==",
"license": "MIT"
},
"node_modules/webpack-cli": {
"version": "5.1.4",
@@ -20587,12 +20558,17 @@
}
},
"node_modules/webpack-merge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz",
"integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz",
"integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==",
"license": "MIT",
"dependencies": {
"lodash": "^4.17.15"
"clone-deep": "^4.0.1",
"flat": "^5.0.2",
"wildcard": "^2.0.1"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/webpack-sources": {
@@ -20776,7 +20752,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz",
"integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==",
"dev": true,
"license": "MIT"
},
"node_modules/word-wrap": {

View File

@@ -96,8 +96,8 @@
"underscore": "1.13.7",
"underscore.string": "3.3.6",
"webpack": "^5.90.3",
"webpack-bundle-tracker": "0.4.3",
"webpack-merge": "4.2.2",
"webpack-bundle-tracker": "3.2.1",
"webpack-merge": "6.0.1",
"which-country": "1.0.0"
},
"devDependencies": {

View File

@@ -25,4 +25,4 @@ elasticsearch<7.14.0
# Cause: https://github.com/openedx/edx-lint/issues/458
# This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved.
pip<24.3

View File

@@ -29,11 +29,6 @@ Django<5.0
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35277
django-oauth-toolkit==1.7.1
# Date: 2021-05-17
# greater version has breaking changes and requires some migration steps.
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35276
django-webpack-loader==0.7.0
# Date: 2024-07-19
# Generally speaking, the major version of django-stubs must either match the major version
# of django, or exceed it by 1. So, we will need to perpetually constrain django-stubs and
@@ -47,7 +42,7 @@ django-stubs<6
# The team that owns this package will manually bump this package rather than having it pulled in automatically.
# This is to allow them to better control its deployment and to do it in a process that works better
# for them.
edx-enterprise==6.4.1
edx-enterprise==6.4.3
# Date: 2023-07-26
# Our legacy Sass code is incompatible with anything except this ancient libsass version.
@@ -79,11 +74,6 @@ openai<=0.28.1
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35267
path<16.12.0
# Date: 2025-05-11
# Broke lxml[html_clean] extra dependency declaration
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/37168
pip-tools<7.5.0
# Date: 2022-08-03
# pycodestyle==2.9.0 generates false positive error E275.
# Constraint can be removed once the issue https://github.com/PyCQA/pycodestyle/issues/1090 is fixed.

View File

@@ -24,9 +24,9 @@ joblib==1.5.2
# via nltk
kiwisolver==1.4.9
# via matplotlib
lxml[html-clean,html_clean]==5.3.2
lxml[html-clean]==5.3.2
# via
# -c requirements/edx-sandbox/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx-sandbox/base.in
# lxml-html-clean
# openedx-calc
@@ -48,7 +48,7 @@ nltk==3.9.1
# chem
numpy==1.26.4
# via
# -c requirements/edx-sandbox/../constraints.txt
# -c requirements/constraints.txt
# chem
# contourpy
# matplotlib

View File

@@ -8,7 +8,7 @@ click==8.2.1
# via -r requirements/edx/assets.in
libsass==0.10.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/assets.in
nodeenv==1.9.1
# via -r requirements/edx/assets.in

View File

@@ -93,7 +93,7 @@ camel-converter[pydantic]==4.0.1
# via meilisearch
celery==5.5.3
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
# django-celery-results
# django-user-tasks
@@ -169,7 +169,7 @@ defusedxml==0.7.1
# social-auth-core
django==4.2.24
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
# django-appconf
# django-autocomplete-light
@@ -320,7 +320,7 @@ django-mysql==4.18.0
# via -r requirements/edx/kernel.in
django-oauth-toolkit==1.7.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
# edx-enterprise
# enterprise-integrated-channels
@@ -370,9 +370,8 @@ django-waffle==5.0.0
# edx-enterprise
# edx-proctoring
# edx-toggles
django-webpack-loader==0.7.0
django-webpack-loader==3.2.1
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/kernel.in
# edx-proctoring
djangorestframework==3.16.1
@@ -474,9 +473,9 @@ edx-drf-extensions==10.6.0
# edxval
# enterprise-integrated-channels
# openedx-learning
edx-enterprise==6.4.1
edx-enterprise==6.4.3
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
edx-event-bus-kafka==6.1.0
# via -r requirements/edx/kernel.in
@@ -558,8 +557,8 @@ edxval==3.0.0
# via -r requirements/edx/kernel.in
elasticsearch==7.9.1
# via
# -c requirements/edx/../common_constraints.txt
# -c requirements/edx/../constraints.txt
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# edx-search
# openedx-forum
enmerkar==0.7.1
@@ -720,9 +719,9 @@ loremipsum==1.0.5
# via ora2
lti-consumer-xblock==9.14.2
# via -r requirements/edx/kernel.in
lxml[html-clean,html_clean]==5.3.2
lxml[html-clean]==5.3.2
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
# edx-i18n-tools
# edxval
@@ -792,7 +791,7 @@ nodeenv==1.9.1
# via -r requirements/edx/kernel.in
numpy==1.26.4
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# chem
# openedx-calc
# scipy
@@ -809,7 +808,7 @@ olxcleaner==0.3.0
# via -r requirements/edx/kernel.in
openai==0.28.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# edx-enterprise
openedx-atlas==0.7.0
# via
@@ -845,7 +844,7 @@ openedx-forum==0.3.6
# via -r requirements/edx/kernel.in
openedx-learning==0.27.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
optimizely-sdk==5.2.0
# via -r requirements/edx/bundled.in
@@ -861,7 +860,7 @@ paramiko==4.0.0
# via edx-enterprise
path==16.11.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
# edx-i18n-tools
# path-py
@@ -946,7 +945,7 @@ pymemcache==4.0.0
# via -r requirements/edx/kernel.in
pymongo==4.4.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
# edx-opaque-keys
# event-tracking
@@ -1124,7 +1123,7 @@ snowflake-connector-python==3.17.3
# via edx-enterprise
social-auth-app-django==5.4.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/kernel.in
# edx-auth-backends
social-auth-core==4.7.0
@@ -1273,7 +1272,7 @@ xblocks-contrib==0.6.0
# via -r requirements/edx/bundled.in
xmlsec==1.3.14
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# python3-saml
xss-utils==0.8.0
# via -r requirements/edx/kernel.in

View File

@@ -157,7 +157,7 @@ bridgekeeper==0.9
# -r requirements/edx/testing.txt
build==1.3.0
# via
# -r requirements/edx/../pip-tools.txt
# -r requirements/pip-tools.txt
# pip-tools
cachecontrol==0.14.3
# via
@@ -178,7 +178,7 @@ camel-converter[pydantic]==4.0.1
# meilisearch
celery==5.5.3
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# django-celery-results
@@ -224,11 +224,11 @@ chem==2.0.0
# -r requirements/edx/testing.txt
click==8.2.1
# via
# -r requirements/edx/../pip-tools.txt
# -r requirements/edx/assets.txt
# -r requirements/edx/development.in
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# -r requirements/pip-tools.txt
# celery
# click-didyoumean
# click-log
@@ -333,7 +333,7 @@ distlib==0.4.0
# virtualenv
django==4.2.24
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# django-appconf
@@ -461,7 +461,7 @@ django-crum==0.7.9
# super-csv
django-debug-toolbar==5.2.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/development.in
django-fernet-fields-v2==0.9
# via
@@ -526,7 +526,7 @@ django-mysql==4.18.0
# -r requirements/edx/testing.txt
django-oauth-toolkit==1.7.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-enterprise
@@ -584,7 +584,7 @@ django-storages==1.14.6
# edxval
django-stubs[compatible-mypy]==5.2.5
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/development.in
# djangorestframework-stubs
django-stubs-ext==5.2.5
@@ -602,9 +602,8 @@ django-waffle==5.0.0
# edx-enterprise
# edx-proctoring
# edx-toggles
django-webpack-loader==0.7.0
django-webpack-loader==3.2.1
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-proctoring
@@ -748,9 +747,9 @@ edx-drf-extensions==10.6.0
# edxval
# enterprise-integrated-channels
# openedx-learning
edx-enterprise==6.4.1
edx-enterprise==6.4.3
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
edx-event-bus-kafka==6.1.0
@@ -862,8 +861,8 @@ edxval==3.0.0
# -r requirements/edx/testing.txt
elasticsearch==7.9.1
# via
# -c requirements/edx/../common_constraints.txt
# -c requirements/edx/../constraints.txt
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-search
@@ -1187,7 +1186,7 @@ lazy==1.6
# xblock
libsass==0.10.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/assets.txt
loremipsum==1.0.5
# via
@@ -1200,7 +1199,7 @@ lti-consumer-xblock==9.14.2
# -r requirements/edx/testing.txt
lxml[html-clean]==5.3.2
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-i18n-tools
@@ -1325,7 +1324,7 @@ nodeenv==1.9.1
# -r requirements/edx/testing.txt
numpy==1.26.4
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# chem
@@ -1347,7 +1346,7 @@ olxcleaner==0.3.0
# -r requirements/edx/testing.txt
openai==0.28.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-enterprise
@@ -1398,7 +1397,7 @@ openedx-forum==0.3.6
# -r requirements/edx/testing.txt
openedx-learning==0.27.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
optimizely-sdk==5.2.0
@@ -1411,9 +1410,9 @@ ora2==6.16.4
# -r requirements/edx/testing.txt
packaging==25.0
# via
# -r requirements/edx/../pip-tools.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# -r requirements/pip-tools.txt
# build
# drf-yasg
# gunicorn
@@ -1433,7 +1432,7 @@ paramiko==4.0.0
# edx-enterprise
path==16.11.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-i18n-tools
@@ -1467,10 +1466,8 @@ pillow==11.3.0
# edx-enterprise
# edx-organizations
# edxval
pip-tools==7.4.1
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/../pip-tools.txt
pip-tools==7.5.0
# via -r requirements/pip-tools.txt
platformdirs==4.4.0
# via
# -r requirements/edx/doc.txt
@@ -1540,7 +1537,7 @@ pyasn1-modules==0.4.2
# google-auth
pycodestyle==2.8.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/testing.txt
pycountry==24.6.1
# via
@@ -1633,7 +1630,7 @@ pymemcache==4.0.0
# -r requirements/edx/testing.txt
pymongo==4.4.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-opaque-keys
@@ -1667,7 +1664,7 @@ pyproject-api==1.9.1
# tox
pyproject-hooks==1.2.0
# via
# -r requirements/edx/../pip-tools.txt
# -r requirements/pip-tools.txt
# build
# pip-tools
pyquery==2.0.1
@@ -1949,7 +1946,7 @@ snowflake-connector-python==3.17.3
# edx-enterprise
social-auth-app-django==5.4.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-auth-backends
@@ -2224,9 +2221,9 @@ webob==1.8.9
# xblock
wheel==0.45.1
# via
# -r requirements/edx/../pip-tools.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# -r requirements/pip-tools.txt
# django-pipeline
# pip-tools
wrapt==1.17.3
@@ -2274,7 +2271,7 @@ xblocks-contrib==0.6.0
# -r requirements/edx/testing.txt
xmlsec==1.3.14
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# python3-saml

View File

@@ -133,7 +133,7 @@ camel-converter[pydantic]==4.0.1
# meilisearch
celery==5.5.3
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# django-celery-results
# django-user-tasks
@@ -227,7 +227,7 @@ defusedxml==0.7.1
# social-auth-core
django==4.2.24
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# django-appconf
# django-autocomplete-light
@@ -389,7 +389,7 @@ django-mysql==4.18.0
# via -r requirements/edx/base.txt
django-oauth-toolkit==1.7.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-enterprise
# enterprise-integrated-channels
@@ -442,9 +442,8 @@ django-waffle==5.0.0
# edx-enterprise
# edx-proctoring
# edx-toggles
django-webpack-loader==0.7.0
django-webpack-loader==3.2.1
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/base.txt
# edx-proctoring
djangorestframework==3.16.1
@@ -558,9 +557,9 @@ edx-drf-extensions==10.6.0
# edxval
# enterprise-integrated-channels
# openedx-learning
edx-enterprise==6.4.1
edx-enterprise==6.4.3
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
edx-event-bus-kafka==6.1.0
# via -r requirements/edx/base.txt
@@ -644,8 +643,8 @@ edxval==3.0.0
# via -r requirements/edx/base.txt
elasticsearch==7.9.1
# via
# -c requirements/edx/../common_constraints.txt
# -c requirements/edx/../constraints.txt
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-search
# openedx-forum
@@ -875,7 +874,7 @@ lti-consumer-xblock==9.14.2
# via -r requirements/edx/base.txt
lxml[html-clean]==5.3.2
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-i18n-tools
# edxval
@@ -963,7 +962,7 @@ nodeenv==1.9.1
# via -r requirements/edx/base.txt
numpy==1.26.4
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# chem
# openedx-calc
@@ -981,7 +980,7 @@ olxcleaner==0.3.0
# via -r requirements/edx/base.txt
openai==0.28.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-enterprise
openedx-atlas==0.7.0
@@ -1019,7 +1018,7 @@ openedx-forum==0.3.6
# via -r requirements/edx/base.txt
openedx-learning==0.27.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
optimizely-sdk==5.2.0
# via -r requirements/edx/base.txt
@@ -1040,7 +1039,7 @@ paramiko==4.0.0
# edx-enterprise
path==16.11.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-i18n-tools
# path-py
@@ -1158,7 +1157,7 @@ pymemcache==4.0.0
# via -r requirements/edx/base.txt
pymongo==4.4.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-opaque-keys
# event-tracking
@@ -1377,7 +1376,7 @@ snowflake-connector-python==3.17.3
# edx-enterprise
social-auth-app-django==5.4.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-auth-backends
social-auth-core==4.7.0
@@ -1600,7 +1599,7 @@ xblocks-contrib==0.6.0
# via -r requirements/edx/base.txt
xmlsec==1.3.14
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# python3-saml
xss-utils==0.8.0

View File

@@ -131,7 +131,7 @@ camel-converter[pydantic]==4.0.1
# meilisearch
celery==5.5.3
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# django-celery-results
# django-user-tasks
@@ -253,7 +253,7 @@ distlib==0.4.0
# via virtualenv
django==4.2.24
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# django-appconf
# django-autocomplete-light
@@ -415,7 +415,7 @@ django-mysql==4.18.0
# via -r requirements/edx/base.txt
django-oauth-toolkit==1.7.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-enterprise
# enterprise-integrated-channels
@@ -468,9 +468,8 @@ django-waffle==5.0.0
# edx-enterprise
# edx-proctoring
# edx-toggles
django-webpack-loader==0.7.0
django-webpack-loader==3.2.1
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/base.txt
# edx-proctoring
djangorestframework==3.16.1
@@ -579,9 +578,9 @@ edx-drf-extensions==10.6.0
# edxval
# enterprise-integrated-channels
# openedx-learning
edx-enterprise==6.4.1
edx-enterprise==6.4.3
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
edx-event-bus-kafka==6.1.0
# via -r requirements/edx/base.txt
@@ -667,8 +666,8 @@ edxval==3.0.0
# via -r requirements/edx/base.txt
elasticsearch==7.9.1
# via
# -c requirements/edx/../common_constraints.txt
# -c requirements/edx/../constraints.txt
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-search
# openedx-forum
@@ -916,7 +915,7 @@ lti-consumer-xblock==9.14.2
# via -r requirements/edx/base.txt
lxml[html-clean]==5.3.2
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-i18n-tools
# edxval
@@ -1008,7 +1007,7 @@ nodeenv==1.9.1
# via -r requirements/edx/base.txt
numpy==1.26.4
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# chem
# openedx-calc
@@ -1026,7 +1025,7 @@ olxcleaner==0.3.0
# via -r requirements/edx/base.txt
openai==0.28.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-enterprise
openedx-atlas==0.7.0
@@ -1064,7 +1063,7 @@ openedx-forum==0.3.6
# via -r requirements/edx/base.txt
openedx-learning==0.27.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
optimizely-sdk==5.2.0
# via -r requirements/edx/base.txt
@@ -1088,7 +1087,7 @@ paramiko==4.0.0
# edx-enterprise
path==16.11.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-i18n-tools
# path-py
@@ -1171,7 +1170,7 @@ pyasn1-modules==0.4.2
# google-auth
pycodestyle==2.8.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/testing.in
pycountry==24.6.1
# via -r requirements/edx/base.txt
@@ -1237,7 +1236,7 @@ pymemcache==4.0.0
# via -r requirements/edx/base.txt
pymongo==4.4.0
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-opaque-keys
# event-tracking
@@ -1483,7 +1482,7 @@ snowflake-connector-python==3.17.3
# edx-enterprise
social-auth-app-django==5.4.1
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# edx-auth-backends
social-auth-core==4.7.0
@@ -1682,7 +1681,7 @@ xblocks-contrib==0.6.0
# via -r requirements/edx/base.txt
xmlsec==1.3.14
# via
# -c requirements/edx/../constraints.txt
# -c requirements/constraints.txt
# -r requirements/edx/base.txt
# python3-saml
xss-utils==0.8.0

View File

@@ -10,10 +10,8 @@ click==8.2.1
# via pip-tools
packaging==25.0
# via build
pip-tools==7.4.1
# via
# -c requirements/constraints.txt
# -r requirements/pip-tools.in
pip-tools==7.5.0
# via -r requirements/pip-tools.in
pyproject-hooks==1.2.0
# via
# build

View File

@@ -8,9 +8,7 @@ wheel==0.45.1
# via -r requirements/pip.in
# The following packages are considered to be unsafe in a requirements file:
pip==24.2
# via
# -c requirements/common_constraints.txt
# -r requirements/pip.in
pip==25.2
# via -r requirements/pip.in
setuptools==80.9.0
# via -r requirements/pip.in

View File

@@ -16,7 +16,7 @@ edx-opaque-keys==3.0.0
# via -r scripts/structures_pruning/requirements/base.in
pymongo==4.4.0
# via
# -c scripts/structures_pruning/requirements/../../../requirements/constraints.txt
# -c requirements/constraints.txt
# -r scripts/structures_pruning/requirements/base.in
# edx-opaque-keys
stevedore==5.5.0

View File

@@ -34,7 +34,7 @@ cryptography==45.0.7
# via pyjwt
django==4.2.24
# via
# -c scripts/user_retirement/requirements/../../../requirements/constraints.txt
# -c requirements/constraints.txt
# django-crum
# django-waffle
# edx-django-utils
@@ -75,7 +75,7 @@ jmespath==1.0.1
# botocore
lxml==5.3.2
# via
# -c scripts/user_retirement/requirements/../../../requirements/constraints.txt
# -c requirements/constraints.txt
# zeep
more-itertools==10.8.0
# via simple-salesforce

View File

@@ -88,11 +88,11 @@ var workerConfig = function() {
}
};
} catch (err) {
return null;
return {};
}
};
module.exports = Merge.smart({
module.exports = Merge.merge({
web: {
context: __dirname,

View File

@@ -9,7 +9,7 @@ var _ = require('underscore');
var commonConfig = require('./webpack.common.config.js');
module.exports = _.values(Merge.smart(commonConfig, {
module.exports = _.values(Merge.merge(commonConfig, {
web: {
output: {
filename: '[name].js'

View File

@@ -10,7 +10,7 @@ const TerserPlugin = require("terser-webpack-plugin");
var commonConfig = require('./webpack.common.config.js');
var optimizedConfig = Merge.smart(commonConfig, {
var optimizedConfig = Merge.merge(commonConfig, {
web: {
output: {
filename: '[name].[chunkhash].js'
@@ -49,7 +49,7 @@ var optimizedConfig = Merge.smart(commonConfig, {
// gone.
// Step 1: Alter the bundle output names to omit the chunkhash.
var requireCompatConfig = Merge.smart(optimizedConfig, {
var requireCompatConfig = Merge.merge(optimizedConfig, {
web: {
output: {
filename: '[name].js'

View File

@@ -380,11 +380,12 @@ class AssignmentFormatGrader(CourseGrader):
earned = random.randint(2, 15)
possible = random.randint(earned, 15)
section_name = _("Generated")
sequential_id = None
else:
earned = scores[i].graded_total.earned
possible = scores[i].graded_total.possible
section_name = scores[i].display_name
sequential_id = str(scores[i].location)
percentage = scores[i].percent_graded
summary_format = "{section_type} {index} - {name} - {percent:.2%} ({earned:.3n}/{possible:.3n})"
@@ -403,10 +404,11 @@ class AssignmentFormatGrader(CourseGrader):
index=i + self.starting_index,
section_type=self.section_type
)
sequential_id = None
short_label = labeler(i + self.starting_index)
breakdown.append({'percent': percentage, 'label': short_label,
'detail': summary, 'category': self.category})
'detail': summary, 'category': self.category, 'sequential_id': sequential_id})
total_percent, dropped_indices = self.total_with_drops(breakdown)
@@ -427,7 +429,8 @@ class AssignmentFormatGrader(CourseGrader):
)
total_label = f"{self.short_label}"
breakdown = [{'percent': total_percent, 'label': total_label,
'detail': total_detail, 'category': self.category, 'prominent': True}, ]
'detail': total_detail, 'category': self.category, 'prominent': True,
'sequential_id': str(scores[0].location) if scores else None}, ]
else:
# Translators: "Homework Average = 0%"
total_detail = _("{section_type} Average = {percent:.2%}").format(

View File

@@ -70,9 +70,10 @@ class GraderTest(unittest.TestCase):
"""
Mock class for SubsectionGrade object.
"""
def __init__(self, graded_total, display_name):
def __init__(self, graded_total, location, display_name):
self.graded_total = graded_total
self.display_name = display_name
self.location = location
@property
def percent_graded(self):
@@ -81,27 +82,64 @@ class GraderTest(unittest.TestCase):
common_fields = dict(graded=True, first_attempted=datetime.now())
test_gradesheet = {
'Homework': {
'hw1': MockGrade(AggregatedScore(tw_earned=2, tw_possible=20.0, **common_fields), display_name='hw1'),
'hw2': MockGrade(AggregatedScore(tw_earned=16, tw_possible=16.0, **common_fields), display_name='hw2'),
'hw1': MockGrade(
AggregatedScore(tw_earned=2, tw_possible=20.0, **common_fields),
location='location_hw1_mock',
display_name='hw1'
),
'hw2': MockGrade(
AggregatedScore(tw_earned=16, tw_possible=16.0, **common_fields),
location='location_hw2_mock',
display_name='hw2'
),
},
# The dropped scores should be from the assignments that don't exist yet
'Lab': {
# Dropped
'lab1': MockGrade(AggregatedScore(tw_earned=1, tw_possible=2.0, **common_fields), display_name='lab1'),
'lab2': MockGrade(AggregatedScore(tw_earned=1, tw_possible=1.0, **common_fields), display_name='lab2'),
'lab3': MockGrade(AggregatedScore(tw_earned=1, tw_possible=1.0, **common_fields), display_name='lab3'),
'lab1': MockGrade(
AggregatedScore(tw_earned=1, tw_possible=2.0, **common_fields),
location='location_lab1_mock',
display_name='lab1'
),
'lab2': MockGrade(
AggregatedScore(tw_earned=1, tw_possible=1.0, **common_fields),
location='location_lab2_mock',
display_name='lab2'
),
'lab3': MockGrade(
AggregatedScore(tw_earned=1, tw_possible=1.0, **common_fields),
location='location_lab3_mock',
display_name='lab3'
),
# Dropped
'lab4': MockGrade(AggregatedScore(tw_earned=5, tw_possible=25.0, **common_fields), display_name='lab4'),
'lab4': MockGrade(
AggregatedScore(tw_earned=5, tw_possible=25.0, **common_fields),
location='location_lab4_mock',
display_name='lab4'
),
# Dropped
'lab5': MockGrade(AggregatedScore(tw_earned=3, tw_possible=4.0, **common_fields), display_name='lab5'),
'lab6': MockGrade(AggregatedScore(tw_earned=6, tw_possible=7.0, **common_fields), display_name='lab6'),
'lab7': MockGrade(AggregatedScore(tw_earned=5, tw_possible=6.0, **common_fields), display_name='lab7'),
'lab5': MockGrade(
AggregatedScore(tw_earned=3, tw_possible=4.0, **common_fields),
location='location_lab5_mock',
display_name='lab5'
),
'lab6': MockGrade(
AggregatedScore(tw_earned=6, tw_possible=7.0, **common_fields),
location='location_lab6_mock',
display_name='lab6'
),
'lab7': MockGrade(
AggregatedScore(tw_earned=5, tw_possible=6.0, **common_fields),
location='location_lab7_mock',
display_name='lab7'
),
},
'Midterm': {
'midterm': MockGrade(
AggregatedScore(tw_earned=50.5, tw_possible=100, **common_fields),
location='location_midterm_mock',
display_name="Midterm Exam",
),
},
@@ -337,6 +375,47 @@ class GraderTest(unittest.TestCase):
graders.grader_from_conf([invalid_conf])
assert expected_error_message in str(error.value)
def test_sequential_location_in_section_breakdown(self):
homework_grader = graders.AssignmentFormatGrader("Homework", 12, 2)
lab_grader = graders.AssignmentFormatGrader("Lab", 7, 3)
midterm_grader = graders.AssignmentFormatGrader("Midterm", 1, 0)
weighted_grader = graders.WeightedSubsectionsGrader([
(homework_grader, homework_grader.category, 0.25),
(lab_grader, lab_grader.category, 0.25),
(midterm_grader, midterm_grader.category, 0.5),
])
expected_sequential_ids = [
'location_hw1_mock',
'location_hw2_mock',
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
'location_lab1_mock',
'location_lab2_mock',
'location_lab3_mock',
'location_lab4_mock',
'location_lab5_mock',
'location_lab6_mock',
'location_lab7_mock',
None,
'location_midterm_mock',
]
graded = weighted_grader.grade(self.test_gradesheet)
for i, section_breakdown in enumerate(graded['section_breakdown']):
assert expected_sequential_ids[i] == section_breakdown.get('sequential_id')
@ddt.ddt
class ShowCorrectnessTest(unittest.TestCase):