-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Expand file tree
/
Copy pathcommon.py
More file actions
3186 lines (2682 loc) · 125 KB
/
common.py
File metadata and controls
3186 lines (2682 loc) · 125 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
This is the common settings file, intended to set sane defaults.
If you wish to override some of the settings set here without needing to specify
everything, you should create a new settings file that imports the content of this
one and then overrides anything you wish to make overridable.
Some known files that extend this one:
- `production.py` - This file loads overrides from a yaml settings file and uses that
to override the settings set in this file.
Conventions
-----------
1. Extending a List Setting
Sometimes settings take the form of a list and rather than replacing the
whole list, we want to add items to the list. eg. CELERY_IMPORTS.
In this case, it is recommended that a new variable created in your extended
file that contains the word `EXTRA` and enough of the base variable to easily
let people map between the two items.
Examples:
- CELERY_EXTRA_IMPORTS (preferred format)
- EXTRA_MIDDLEWARE_CLASSES
- XBLOCK_EXTRA_MIXINS (preferred format)
The preferred format for the name of the new setting (e.g. `CELERY_EXTRA_IMPORTS`) is to use
the same prefix (e.g. `CELERY`) of the setting that is being appended (e.g. `CELERY_IMPORTS`).
"""
# We intentionally define lots of variables that aren't used
# pylint: disable=unused-import
# Pylint gets confused by path.py instances, which report themselves as class
# objects. As a result, pylint applies the wrong regex in validating names,
# and throws spurious errors. Therefore, we disable invalid-name checking.
# pylint: disable=invalid-name
import os
from corsheaders.defaults import default_headers as corsheaders_default_headers
from path import Path as path
from django.utils.translation import gettext_lazy as _
from enterprise.constants import (
ENTERPRISE_ADMIN_ROLE,
ENTERPRISE_LEARNER_ROLE,
ENTERPRISE_CATALOG_ADMIN_ROLE,
ENTERPRISE_DASHBOARD_ADMIN_ROLE,
ENTERPRISE_ENROLLMENT_API_ADMIN_ROLE,
ENTERPRISE_FULFILLMENT_OPERATOR_ROLE,
ENTERPRISE_REPORTING_CONFIG_ADMIN_ROLE,
ENTERPRISE_SSO_ORCHESTRATOR_OPERATOR_ROLE,
ENTERPRISE_OPERATOR_ROLE,
SYSTEM_ENTERPRISE_PROVISIONING_ADMIN_ROLE,
PROVISIONING_ENTERPRISE_CUSTOMER_ADMIN_ROLE,
PROVISIONING_PENDING_ENTERPRISE_CUSTOMER_ADMIN_ROLE,
DEFAULT_ENTERPRISE_ENROLLMENT_INTENTIONS_ROLE,
)
from openedx_content.settings_api import openedx_content_backcompat_apps_to_install
from openedx.core.lib.derived import Derived
from openedx.envs.common import * # pylint: disable=wildcard-import
from openedx.core.lib.features_setting_proxy import FeaturesProxy
# A proxy for feature flags stored in the settings namespace
FEATURES = FeaturesProxy(globals())
################################### FEATURES ###################################
CC_MERCHANT_NAME = Derived(lambda settings: settings.PLATFORM_NAME)
# .. 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
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"
]
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
# .. toggle_default: False
# .. toggle_description: Set to True to prevent using username/password login and registration and only allow
# authentication with third party auth
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-09-16
# .. toggle_warning: Requires configuration of third party auth
ENABLE_REQUIRE_THIRD_PARTY_AUTH = False
# Specifies extra XBlock fields that should available when requested via the Course Blocks API
# Should be a list of tuples of (block_type, field_name), where block_type can also be "*" for all block types.
# e.g. COURSE_BLOCKS_API_EXTRA_FIELDS = [ ('course', 'other_course_settings'), ("problem", "weight") ]
COURSE_BLOCKS_API_EXTRA_FIELDS = []
# Used for A/B testing
DEFAULT_GROUPS = []
# .. setting_name: GRADEBOOK_FREEZE_DAYS
# .. setting_default: 30
# .. setting_description: Sets the number of days after which the gradebook will freeze following the course's end.
GRADEBOOK_FREEZE_DAYS = 30
RETRY_CALENDAR_SYNC_EMAIL_MAX_ATTEMPTS = 5
############################# SET PATH INFORMATION #############################
PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/lms
NODE_MODULES_ROOT = REPO_ROOT / "node_modules"
# Where to look for a status message
STATUS_MESSAGE_PATH = ENV_ROOT / "status_message.json"
############################ Global Database Configuration #####################
DATABASE_ROUTERS.append('edx_django_utils.db.read_replica.ReadReplicaRouter')
################################## DJANGO OAUTH TOOLKIT #######################################
# Scope description strings are presented to the user
# on the application authorization page. See
# lms/templates/oauth2_provider/authorize.html for details.
# Non-default scopes should be added directly to OAUTH2_PROVIDER['SCOPES'] below.
OAUTH2_DEFAULT_SCOPES = {
'read': _('Read access'),
'write': _('Write access'),
'email': _('Know your email address'),
'profile': _('Know your name and username'),
}
OAUTH2_PROVIDER = {
'OAUTH2_VALIDATOR_CLASS': 'openedx.core.djangoapps.oauth_dispatch.dot_overrides.validators.EdxOAuth2Validator',
# 3 months and then we expire refresh tokens using edx_clear_expired_tokens (length is mobile app driven)
'REFRESH_TOKEN_EXPIRE_SECONDS': 7776000,
'SCOPES_BACKEND_CLASS': 'openedx.core.djangoapps.oauth_dispatch.scopes.ApplicationModelScopes',
'SCOPES': dict(OAUTH2_DEFAULT_SCOPES, **{
'certificates:read': _('Retrieve your course certificates'),
'grades:read': _('Retrieve your grades for your enrolled courses'),
'tpa:read': _('Retrieve your third-party authentication username mapping'),
# user_id is added in code as a default scope for JWT cookies and all password grant_type JWTs
'user_id': _('Know your user identifier'),
}),
'DEFAULT_SCOPES': OAUTH2_DEFAULT_SCOPES,
'REQUEST_APPROVAL_PROMPT': 'auto_even_if_expired',
'ERROR_RESPONSE_WITH_SCOPES': True,
}
# Automatically clean up edx-django-oauth2-provider tokens on use
OAUTH_DELETE_EXPIRED = True
OAUTH_ID_TOKEN_EXPIRATION = 60 * 60
OAUTH_ENFORCE_SECURE = True
OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS = 365
OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS = 30
################################## THIRD_PARTY_AUTH CONFIGURATION #############################
TPA_PROVIDER_BURST_THROTTLE = '10/min'
TPA_PROVIDER_SUSTAINED_THROTTLE = '50/hr'
# .. toggle_name: TPA_AUTOMATIC_LOGOUT_ENABLED
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Redirect the user to the TPA logout URL if this flag is enabled, the
# TPA logout URL is configured, and the user logs in through TPA.
# .. toggle_use_cases: opt_in
# .. toggle_warning: Enabling this toggle skips rendering logout.html, which is used to log the user out
# from the different IDAs. To ensure the user is logged out of all the IDAs be sure to redirect
# back to <LMS>/logout after logging out of the TPA.
# .. toggle_creation_date: 2023-05-07
TPA_AUTOMATIC_LOGOUT_ENABLED = False
################################## TEMPLATE CONFIGURATION #####################################
MAKO_TEMPLATE_DIRS_BASE = lms_mako_template_dirs_base
CONTEXT_PROCESSORS.remove('django.contrib.messages.context_processors.messages')
CONTEXT_PROCESSORS[5:5] = [
# Added for django-wiki
'django.template.context_processors.media',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'sekizai.context_processors.sekizai',
# Hack to get required link URLs to password reset templates
'common.djangoapps.edxmako.shortcuts.marketing_link_context_processor',
# Timezone processor (sends language and time_zone preference)
'lms.djangoapps.courseware.context_processor.user_timezone_locale_prefs',
]
CONTEXT_PROCESSORS += [
# Mobile App processor (Detects if request is from the mobile app)
'lms.djangoapps.mobile_api.context_processor.is_from_mobile_app',
# Context processor necessary for the survey report message appear on the admin site
'openedx.features.survey_report.context_processors.admin_extra_context',
]
DEFAULT_TEMPLATE_ENGINE_DIRS = Derived(lambda settings: settings.TEMPLATES[0]['DIRS'][:])
###############################################################################################
STUDENT_FILEUPLOAD_MAX_SIZE = 4 * 1000 * 1000 # 4 MB
MAX_FILEUPLOADS_PER_INPUT = 20
# Configuration option for when we want to grab server error pages
STATIC_GRAB = False
DEV_CONTENT = True
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 = ""
EDX_API_KEY = None
LOGIN_REDIRECT_URL = EDX_ROOT_URL + '/login'
LOGIN_URL = EDX_ROOT_URL + '/login'
CERT_QUEUE = 'test-pull'
ALTERNATE_WORKER_QUEUES = 'cms'
DATA_DIR = '/edx/var/edxapp/data'
MAINTENANCE_BANNER_TEXT = None
# Set certificate issued date format. It supports all formats supported by
# `common.djangoapps.util.date_utils.strftime_localized`.
CERTIFICATE_DATE_FORMAT = "%B %-d, %Y"
### Dark code. Should be enabled in local settings for devel.
ENABLE_MULTICOURSE = False # set to False to disable multicourse display (see lib.util.views.edXhome)
###
# IP addresses that are allowed to reload the course, etc.
# TODO (vshnayder): Will probably need to change as we get real access control in.
LMS_MIGRATION_ALLOWED_IPS = []
############################## EVENT TRACKING #################################
LMS_SEGMENT_KEY = None
DEBUG_TRACK_LOG = False
TRACKING_IGNORE_URL_PATTERNS += [r'^/segmentio/event', r'^/performance']
TRACKING_SEGMENTIO_WEBHOOK_SECRET = None
TRACKING_SEGMENTIO_ALLOWED_TYPES = ['track']
TRACKING_SEGMENTIO_DISALLOWED_SUBSTRING_NAMES = []
TRACKING_SEGMENTIO_SOURCE_MAP = {
'analytics-android': 'mobile',
'analytics-ios': 'mobile',
}
######################## GOOGLE ANALYTICS ###########################
GOOGLE_SITE_VERIFICATION_ID = None
GOOGLE_ANALYTICS_LINKEDIN = None
GOOGLE_ANALYTICS_TRACKING_ID = None
GOOGLE_ANALYTICS_4_ID = None
######################## BRANCH.IO ###########################
BRANCH_IO_KEY = None
######################## HOTJAR ###########################
HOTJAR_SITE_ID = 00000
######################## subdomain specific settings ###########################
COURSE_LISTINGS = {}
############# ModuleStore Configuration ##########
CONTENTSTORE['DOC_STORE_CONFIG']['password'] = 'password'
CONTENTSTORE['DOC_STORE_CONFIG']['read_preference'] = 'SECONDARY_PREFERRED'
MODULESTORE_BRANCH = 'published-only'
HOSTNAME_MODULESTORE_DEFAULT_MAPPINGS = {}
MONGODB_LOG = {}
#################### Python sandbox ############################################
CODE_JAIL = {
# from https://github.com/openedx/codejail/blob/master/codejail/django_integration.py#L24, '' should be same as None
'python_bin': '/edx/app/edxapp/venvs/edxapp-sandbox/bin/python',
# User to run as in the sandbox.
'user': 'sandbox',
# Configurable limits.
'limits': {
# How many CPU seconds can jailed code use?
'CPU': 1,
# Limit the memory of the jailed process to something high but not
# infinite (512MiB in bytes)
'VMEM': 536870912,
# Time in seconds that the jailed process has to run.
'REALTIME': 3,
'PROXY': 0,
},
# Overrides to default configurable 'limits' (above).
# Keys should be course run ids (or, in the special case of code running
# on the /debug/run_python page, the key is 'debug_run_python').
# Values should be dictionaries that look like 'limits'.
"limit_overrides": {},
}
# .. setting_name: PYTHON_LIB_FILENAME
# .. setting_default: python_lib.zip
# .. setting_description: Name of the course file to make available to code in
# custom Python-graded problems. By default, this file will not be downloadable
# by learners.
PYTHON_LIB_FILENAME = 'python_lib.zip'
############################### DJANGO BUILT-INS ###############################
# django-session-cookie middleware
DCS_SESSION_COOKIE_SAMESITE = 'None'
DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL = True
# LMS base
LMS_BASE = 'localhost:18000'
# CMS base
CMS_BASE = 'studio.edx.org'
# Studio name
STUDIO_NAME = 'Studio'
STUDIO_SHORT_NAME = 'Studio'
# Platform Email
EMAIL_FILE_PATH = Derived(lambda settings: path(settings.DATA_DIR) / "emails" / "lms")
DEFAULT_FROM_EMAIL = 'registration@example.com'
DEFAULT_FEEDBACK_EMAIL = 'feedback@example.com'
SERVER_EMAIL = 'devops@example.com'
TECH_SUPPORT_EMAIL = 'technical@example.com'
CONTACT_EMAIL = 'info@example.com'
BUGS_EMAIL = 'bugs@example.com'
UNIVERSITY_EMAIL = 'university@example.com'
PRESS_EMAIL = 'press@example.com'
FINANCE_EMAIL = ''
# Platform mailing address
CONTACT_MAILING_ADDRESS = 'SET-ME-PLEASE'
# Account activation email sender address
ACTIVATION_EMAIL_FROM_ADDRESS = ''
# Static content
STATIC_URL = '/static/'
STATIC_ROOT = os.environ.get('STATIC_ROOT_LMS', ENV_ROOT / "staticfiles")
STATICFILES_DIRS.insert(2, NODE_MODULES_ROOT / "@edx")
# 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
################################# SIMPLEWIKI ###################################
SIMPLE_WIKI_REQUIRE_LOGIN_EDIT = True
SIMPLE_WIKI_REQUIRE_LOGIN_VIEW = False
################################# WIKI ###################################
from lms.djangoapps.course_wiki import settings as course_wiki_settings # pylint: disable=wrong-import-position
# .. toggle_name: WIKI_ACCOUNT_HANDLING
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: We recommend you leave this as 'False' for an Open edX installation
# to get the proper behavior for register, login and logout. For the original docs see:
# https://github.com/openedx/django-wiki/blob/edx_release/wiki/conf/settings.py
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2012-08-13
WIKI_ACCOUNT_HANDLING = False
WIKI_EDITOR = 'lms.djangoapps.course_wiki.editors.CodeMirror'
WIKI_SHOW_MAX_CHILDREN = 0 # We don't use the little menu that shows children of an article in the breadcrumb
# .. toggle_name: WIKI_ANONYMOUS
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enabling this allows access to anonymous users.
# For the original docs, see:
# https://github.com/openedx/django-wiki/blob/edx_release/wiki/conf/settings.py
# .. toggle_warning: Setting allow anonymous access to `True` may have styling issues.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2012-08-21
WIKI_ANONYMOUS = False
WIKI_CAN_DELETE = course_wiki_settings.CAN_DELETE