tutor 23.0.0.dev3185__tar.gz → 23.0.0.dev3188__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/PKG-INFO +1 -1
  2. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/lms/development.py +1 -3
  3. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/partials/common_all.py +27 -5
  4. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/partials/common_cms.py +1 -1
  5. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/partials/common_lms.py +4 -4
  6. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/jobs/init/lms.sh +40 -0
  7. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/.gitignore +0 -0
  8. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/.hatch_build.py +0 -0
  9. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/LICENSE.txt +0 -0
  10. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/README.rst +0 -0
  11. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/pyproject.toml +0 -0
  12. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/requirements/base.in +0 -0
  13. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/requirements/dev.txt +0 -0
  14. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/requirements/plugins.txt +0 -0
  15. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/__about__.py +0 -0
  16. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/__init__.py +0 -0
  17. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/bindmount.py +0 -0
  18. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/__init__.py +0 -0
  19. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/cli.py +0 -0
  20. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/compose.py +0 -0
  21. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/config.py +0 -0
  22. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/context.py +0 -0
  23. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/dev.py +0 -0
  24. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/images.py +0 -0
  25. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/jobs.py +0 -0
  26. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/jobs_utils.py +0 -0
  27. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/k8s.py +0 -0
  28. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/local.py +0 -0
  29. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/mounts.py +0 -0
  30. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/params.py +0 -0
  31. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/plugins.py +0 -0
  32. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/upgrade/__init__.py +0 -0
  33. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/upgrade/common.py +0 -0
  34. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/upgrade/compose.py +0 -0
  35. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/commands/upgrade/k8s.py +0 -0
  36. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/config.py +0 -0
  37. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/core/__init__.py +0 -0
  38. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/core/hooks/__init__.py +0 -0
  39. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/core/hooks/actions.py +0 -0
  40. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/core/hooks/contexts.py +0 -0
  41. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/core/hooks/filters.py +0 -0
  42. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/core/hooks/priorities.py +0 -0
  43. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/env.py +0 -0
  44. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/exceptions.py +0 -0
  45. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/fmt.py +0 -0
  46. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/hooks/__init__.py +0 -0
  47. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/hooks/catalog.py +0 -0
  48. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/images.py +0 -0
  49. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/interactive.py +0 -0
  50. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/plugins/__init__.py +0 -0
  51. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/plugins/base.py +0 -0
  52. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/plugins/indexes.py +0 -0
  53. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/plugins/openedx.py +0 -0
  54. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/plugins/v0.py +0 -0
  55. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/plugins/v1.py +0 -0
  56. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/py.typed +0 -0
  57. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/serialize.py +0 -0
  58. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/tasks.py +0 -0
  59. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/caddy/Caddyfile +0 -0
  60. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/config/cms.env.yml +0 -0
  61. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/config/lms.env.yml +0 -0
  62. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/config/partials/auth.yml +0 -0
  63. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/cms/__init__.py +0 -0
  64. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/cms/development.py +0 -0
  65. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/cms/production.py +0 -0
  66. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/cms/test.py +0 -0
  67. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/lms/__init__.py +0 -0
  68. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/lms/production.py +0 -0
  69. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/lms/test.py +0 -0
  70. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/settings/partials/common_test.py +0 -0
  71. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/openedx/uwsgi.ini +0 -0
  72. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/permissions/setowners.sh +0 -0
  73. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/apps/redis/redis.conf +0 -0
  74. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/Dockerfile +0 -0
  75. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/bin/reload-uwsgi +0 -0
  76. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/revisions.yml +0 -0
  77. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/cms/__init__.py +0 -0
  78. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/cms/assets.py +0 -0
  79. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/cms/i18n.py +0 -0
  80. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/lms/__init__.py +0 -0
  81. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/lms/assets.py +0 -0
  82. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/lms/i18n.py +0 -0
  83. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/partials/assets.py +0 -0
  84. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/partials/i18n.py +0 -0
  85. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/settings/uwsgi.ini +0 -0
  86. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/openedx/themes/README +0 -0
  87. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/permissions/Dockerfile +0 -0
  88. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/build/permissions/setowner.sh +0 -0
  89. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/config/base.yml +0 -0
  90. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/config/defaults.yml +0 -0
  91. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/dev/docker-compose.jobs.yml +0 -0
  92. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/dev/docker-compose.yml +0 -0
  93. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/jobs/init/cms.sh +0 -0
  94. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/jobs/init/meilisearch.sh +0 -0
  95. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/jobs/init/mounted-directories.sh +0 -0
  96. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/jobs/init/mysql.sh +0 -0
  97. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/k8s/deployments.yml +0 -0
  98. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/k8s/jobs.yml +0 -0
  99. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/k8s/namespace.yml +0 -0
  100. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/k8s/override.yml +0 -0
  101. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/k8s/services.yml +0 -0
  102. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/k8s/volumes.yml +0 -0
  103. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/kustomization.yml +0 -0
  104. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/local/docker-compose.jobs.yml +0 -0
  105. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/local/docker-compose.prod.yml +0 -0
  106. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/local/docker-compose.yml +0 -0
  107. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/templates/version +0 -0
  108. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/types.py +0 -0
  109. {tutor-23.0.0.dev3185 → tutor-23.0.0.dev3188}/tutor/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tutor
3
- Version: 23.0.0.dev3185
3
+ Version: 23.0.0.dev3188
4
4
  Summary: The Docker-based Open edX distribution designed for peace of mind
5
5
  Project-URL: Homepage, https://docs.tutor.edly.io/
6
6
  Project-URL: Documentation, https://docs.tutor.edly.io/
@@ -26,10 +26,8 @@ SESSION_COOKIE_SAMESITE = "Lax"
26
26
  # CMS authentication
27
27
  IDA_LOGOUT_URI_LIST.append("http://{{ CMS_HOST }}:8001/logout/")
28
28
 
29
- FEATURES["ENABLE_COURSEWARE_MICROFRONTEND"] = False
30
-
31
29
  # Disable enterprise integration
32
- FEATURES["ENABLE_ENTERPRISE_INTEGRATION"] = False
30
+ ENABLE_ENTERPRISE_INTEGRATION = False
33
31
  SYSTEM_WIDE_ROLE_CLASSES.remove("enterprise.SystemWideEnterpriseUserRoleAssignment")
34
32
 
35
33
  LOGGING["loggers"]["oauth2_provider"] = {
@@ -4,6 +4,14 @@ import os
4
4
 
5
5
  from xmodule.modulestore.modulestore_settings import update_module_store_settings
6
6
 
7
+ # Re-bind the FEATURES proxy to this settings module, so that both flat feature
8
+ # settings and legacy FEATURES["..."] reads and writes resolve here.
9
+ try:
10
+ from openedx.core.lib.features_setting_proxy import FeaturesProxy
11
+ FEATURES = FeaturesProxy(globals())
12
+ except ImportError:
13
+ pass
14
+
7
15
  # Mongodb connection parameters: simply modify `mongodb_parameters` to affect all connections to MongoDb.
8
16
  mongodb_parameters = {
9
17
  "db": "{{ MONGODB_DATABASE }}",
@@ -86,8 +94,22 @@ CACHES = {
86
94
  }
87
95
  }
88
96
 
89
- # The default Django contrib site is the one associated to the LMS domain name. 1 is
90
- # usually "example.com", so it's the next available integer.
97
+ # The Django contrib site associated to the LMS domain name. Django creates the
98
+ # initial "example.com" site at pk=SITE_ID during the first migration, and the LMS
99
+ # init job (tutor/templates/jobs/init/lms.sh) renames it in place to the platform
100
+ # domain, so that SITE_ID points at the real site instead of "example.com".
101
+ #
102
+ # Open edX resolves the current site from the request host first (see the
103
+ # django-sites-extensions package) and falls back to SITE_ID only when there is no
104
+ # request, so this setting is what request-less code paths use, such as bulk emails
105
+ # sent from Celery workers. The CMS shares it, and the django_site table: Studio
106
+ # requests resolve to a site matching the Studio domain when one exists ("do
107
+ # settheme" creates one) and to this site otherwise.
108
+ #
109
+ # Keep the value at 2. Existing installations have their site, and whatever
110
+ # SiteConfiguration or theme is attached to it, at that id; pointing SITE_ID
111
+ # somewhere else leaves them raising Site.DoesNotExist (see the revert of #1323).
112
+ # See https://github.com/overhangio/tutor/issues/1182
91
113
  SITE_ID = 2
92
114
 
93
115
  # Contact addresses
@@ -229,9 +251,9 @@ JWT_AUTH["JWT_ISSUERS"] = [
229
251
  ]
230
252
 
231
253
  # Enable/Disable some features globally
232
- FEATURES["ENABLE_DISCUSSION_SERVICE"] = False
233
- FEATURES["PREVENT_CONCURRENT_LOGINS"] = False
234
- FEATURES["ENABLE_CORS_HEADERS"] = True
254
+ ENABLE_DISCUSSION_SERVICE = False
255
+ PREVENT_CONCURRENT_LOGINS = False
256
+ ENABLE_CORS_HEADERS = True
235
257
 
236
258
  # CORS
237
259
  CORS_ALLOW_CREDENTIALS = True
@@ -21,7 +21,7 @@ FRONTEND_LOGIN_URL = LMS_ROOT_URL + '/login'
21
21
  FRONTEND_REGISTER_URL = LMS_ROOT_URL + '/register'
22
22
 
23
23
  # Enable "reindex" button
24
- FEATURES["ENABLE_COURSEWARE_INDEX"] = True
24
+ ENABLE_COURSEWARE_INDEX = True
25
25
 
26
26
  # Create folders if necessary
27
27
  for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT, ORA2_FILEUPLOAD_ROOT]:
@@ -21,7 +21,7 @@ OAUTH_ENFORCE_SECURE = False
21
21
  # Email settings
22
22
  DEFAULT_EMAIL_LOGO_URL = LMS_ROOT_URL + "/theming/asset/images/logo.png"
23
23
  BULK_EMAIL_SEND_USING_EDX_ACE = True
24
- FEATURES["ENABLE_FOOTER_MOBILE_APP_LINKS"] = False
24
+ ENABLE_FOOTER_MOBILE_APP_LINKS = False
25
25
 
26
26
  # Branding
27
27
  MOBILE_STORE_ACE_URLS = {}
@@ -38,9 +38,9 @@ CACHES["staticfiles"] = {
38
38
  }
39
39
 
40
40
  # Enable search features
41
- FEATURES["ENABLE_COURSE_DISCOVERY"] = True
42
- FEATURES["ENABLE_COURSEWARE_SEARCH"] = True
43
- FEATURES["ENABLE_DASHBOARD_SEARCH"] = True
41
+ ENABLE_COURSE_DISCOVERY = True
42
+ ENABLE_COURSEWARE_SEARCH = True
43
+ ENABLE_DASHBOARD_SEARCH = True
44
44
 
45
45
  # Create folders if necessary
46
46
  for folder in [DATA_DIR, LOG_DIR, MEDIA_ROOT, STATIC_ROOT, ORA2_FILEUPLOAD_ROOT]:
@@ -15,6 +15,46 @@ echo "Loading settings $DJANGO_SETTINGS_MODULE"
15
15
 
16
16
  ./manage.py lms migrate
17
17
 
18
+ # Point the SITE_ID site at the LMS domain instead of the default "example.com"
19
+ # site that Django auto-creates during the first migration. Otherwise, code paths
20
+ # that run outside of an HTTP request (e.g. bulk emails sent from Celery workers)
21
+ # fall back to SITE_ID and send links/branding for "example.com".
22
+ # https://github.com/overhangio/tutor/issues/1182
23
+ ./manage.py lms shell -c "
24
+ from django.conf import settings
25
+ from django.contrib.sites.models import Site
26
+ site_id = settings.SITE_ID
27
+ domain = settings.LMS_BASE
28
+ name = str(settings.PLATFORM_NAME)[:Site._meta.get_field('name').max_length]
29
+ current = Site.objects.filter(pk=site_id).first()
30
+ existing = Site.objects.filter(domain=domain).first()
31
+ current_domain = current.domain if current else None
32
+ if existing and existing.pk == site_id:
33
+ print(f'SITE_ID {site_id} already points at {domain}')
34
+ elif existing:
35
+ # Two sites exist: the SITE_ID site and a separate site for the LMS domain.
36
+ # Both may have data attached (SiteConfiguration, themes, ...), so we cannot
37
+ # safely guess which to keep. Leave the database untouched and let the
38
+ # operator decide.
39
+ print('WARNING: cannot automatically fix SITE_ID: two candidate sites exist.')
40
+ print(f'WARNING: - SITE_ID={site_id} currently points at site id={current.pk if current else None} ({current_domain!r})')
41
+ print(f'WARNING: - the LMS domain {domain!r} is site id={existing.pk}')
42
+ print('WARNING: the database was left unchanged. Request-less features (e.g. bulk')
43
+ print(f'WARNING: email) will keep using {current_domain!r}.')
44
+ print('WARNING: to fix, review both sites, delete the one you do not need, and set')
45
+ print('WARNING: SITE_ID (via a plugin) to the id of the site you keep.')
46
+ elif current is None:
47
+ Site.objects.create(pk=site_id, domain=domain, name=name)
48
+ print(f'Created site id={site_id} for {domain}')
49
+ elif current.domain == 'example.com':
50
+ current.domain = domain
51
+ current.name = name
52
+ current.save()
53
+ print(f'Renamed default site id={site_id} from example.com to {domain}')
54
+ else:
55
+ print(f'SITE_ID {site_id} points at {current.domain} - leaving unchanged')
56
+ "
57
+
18
58
  # Create meilisearch indexes
19
59
  ./manage.py lms shell -c "import search.meilisearch; search.meilisearch.create_indexes()"
20
60