Skip to content

Commit 8a375e2

Browse files
authored
Merge branch 'master' into turn-on-extracted-xblocks
2 parents a7cf5f8 + ef49090 commit 8a375e2

File tree

41 files changed

+946
-1330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+946
-1330
lines changed

.github/renovate.json5

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
1-
// This file is written in "JSON5" (https://json5.org/) so that we can use comments.
21
{
3-
"extends": [
4-
"config:base",
5-
"schedule:weekly",
6-
":automergeLinters",
7-
":automergeMinor",
8-
":automergeTesters",
9-
":enableVulnerabilityAlerts",
10-
":semanticCommits",
11-
":updateNotScheduled"
2+
extends: [
3+
'config:recommended',
4+
'schedule:weekly',
5+
':automergeLinters',
6+
':automergeMinor',
7+
':automergeTesters',
8+
':enableVulnerabilityAlerts',
9+
':semanticCommits',
10+
':updateNotScheduled',
1211
],
13-
"packageRules": [
12+
packageRules: [
1413
{
15-
"matchDepTypes": [
16-
"devDependencies"
14+
matchDepTypes: [
15+
'devDependencies',
1716
],
18-
"matchUpdateTypes": [
19-
"lockFileMaintenance",
20-
"minor",
21-
"patch",
22-
"pin"
17+
matchUpdateTypes: [
18+
'lockFileMaintenance',
19+
'minor',
20+
'patch',
21+
'pin',
2322
],
24-
"automerge": true
23+
automerge: true,
2524
},
2625
{
27-
"matchPackagePatterns": ["@edx", "@openedx"],
28-
"matchUpdateTypes": ["minor", "patch"],
29-
"automerge": true
30-
}
26+
matchUpdateTypes: [
27+
'minor',
28+
'patch',
29+
],
30+
automerge: true,
31+
matchPackageNames: [
32+
'/@edx/',
33+
'/@openedx/',
34+
],
35+
},
36+
],
37+
ignoreDeps: [
38+
'karma-spec-reporter',
3139
],
32-
// When adding an ignoreDep, please include a reason and a public link that we can use to follow up and ensure
33-
// that the ignoreDep is removed.
34-
// This can be done as a comment within the ignoreDeps list.
35-
"ignoreDeps": [
36-
// karma-spec-reporter>0.20.0 does not seem compatible with our super-old 2016 Karma version (0.13.22).
37-
// Ticket link: None, as upgrading Karma does not strike as worth the benefit.
38-
"karma-spec-reporter"
40+
timezone: 'America/New_York',
41+
prConcurrentLimit: 3,
42+
enabledManagers: [
43+
'npm',
3944
],
40-
"timezone": "America/New_York",
41-
"prConcurrentLimit": 3,
42-
"enabledManagers": ["npm"]
4345
}

cms/conftest.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
only running cms tests.
77
"""
88

9-
10-
import importlib
119
import logging
12-
import os
1310

1411
import pytest
1512

@@ -29,13 +26,6 @@ def pytest_configure(config):
2926
else:
3027
logging.info("pytest did not register json_report correctly")
3128

32-
if config.getoption('help'):
33-
return
34-
settings_module = os.environ.get('DJANGO_SETTINGS_MODULE')
35-
startup_module = 'cms.startup' if settings_module.startswith('cms') else 'lms.startup'
36-
startup = importlib.import_module(startup_module)
37-
startup.run()
38-
3929

4030
@pytest.fixture(autouse=True, scope='function')
4131
def _django_clear_site_cache():

cms/djangoapps/contentstore/xblock_storage_handlers/view_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ def _get_release_date(xblock, user=None):
15621562
reset_to_default = False
15631563
try:
15641564
reset_to_default = xblock.start.year < 1900
1565-
except ValueError:
1565+
except (ValueError, AttributeError):
15661566
# For old mongo courses, accessing the start attribute calls `to_json()`,
15671567
# which raises a `ValueError` for years < 1900.
15681568
reset_to_default = True

cms/envs/common.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,3 +2925,26 @@ def _should_send_learning_badge_events(settings):
29252925
# .. for now it wil impact country listing in auth flow and user profile.
29262926
# .. eg ['US', 'CA']
29272927
DISABLED_COUNTRIES = []
2928+
2929+
# .. setting_name: LIBRARY_ENABLED_BLOCKS
2930+
# .. setting_default: ['problem', 'video', 'html', 'drag-and-drop-v2']
2931+
# .. setting_description: List of block types that are ready/enabled to be created/used
2932+
# .. in libraries. Both basic blocks and advanced blocks can be included.
2933+
# .. In the future, we will support individual configuration per library - see
2934+
# .. openedx/core/djangoapps/content_libraries/api.py::get_allowed_block_types()
2935+
LIBRARY_ENABLED_BLOCKS = [
2936+
'problem',
2937+
'video',
2938+
'html',
2939+
'drag-and-drop-v2',
2940+
'conditional',
2941+
'done',
2942+
'freetextresponse',
2943+
'google-calendar',
2944+
'google-document',
2945+
'invideoquiz',
2946+
'pdf',
2947+
'poll',
2948+
'survey',
2949+
'word_cloud',
2950+
]

0 commit comments

Comments
 (0)