Commit Graph

241 Commits

Author SHA1 Message Date
Irtaza Akram
33cc1a94ba chore: upstream ProblemBlock exceptions and shared utilities to XBlock (#37806)
* fix: add support for xblock 5.3.0
2026-01-07 13:30:53 +05:00
Muhammad Labeeb
8ad4d42e3b feat!: Remove proctortrack references; add requires_escalation_email and show_review_rules options (#37576)
BREAKING CHANGE: All references to the hardcoded 'proctortrack' string have
been removed from the codebase,  as well as the `studio.show_review_rules`
waffle flag. These were used to determine whether an escalation email is
required and whether review rules should be shown. These decisions are now made
based on the value of 'requires_escalation_email' (default False) and 'show_review_rules'
(default True) config items in the PROCTORING_BACKENDS entry.

Additionally:
* The proctoring info api will now return the list of providers which require an escalation
   email so that frontend-app-learning does not need to use a hardcoded check agaist
   the provider name 'proctortrack'.
* Removed translation commands, mock variables and user facing strings that contained
  'proctortrack'.
* Updated all test cases that were using proctortrack to use fake providers names.

Part of: https://github.com/openedx/edx-platform/issues/36329
2025-11-25 09:37:32 -05:00
Taylor Payne
3e83efa609 fix: exclude fields from UpstreamSyncMixin in advanced settings api (#36831)
The UpstreamSyncMixin introduced in [1] which is added as a XBlock mixin,
currently contains four fields - `upstream`, `upstream_version`,
`upstream_version_declined`, and `upstream_display_name`. These fields are
coming through in the course advanced settings API endpoint
(`/api/contentstore/v0/advanced_settings/{course_id}`), and subsequently show
up in the Advanced Settings view in the frontend-app-authoring MFE, which they
shouldn't.

This PR resolves this issue by adding the fields from the `UpstreamSyncMixin`
into the FIELDS_EXCLUDE_LIST [2] of the `CourseMetadata` class. Unless the API is
called with `fetch_all=1` (the authoring MFE uses `fetch_all=0`), then these
fields will be filtered out.

[1] https://github.com/openedx/edx-platform/blob/master/cms/lib/xblock/upstream_sync.py#L289
[2] https://github.com/openedx/edx-platform/blob/master/cms/djangoapps/models/settings/course_metadata.py#L41

Fixes: https://github.com/openedx/frontend-app-authoring/issues/2018
2025-06-04 13:38:30 -04:00
Zachary Hancock
4b827bf9be feat: show error on courses with unknown proctoring providers (#35445) 2024-09-10 09:02:13 -04:00
Alison Langston
e498d2087d fix: allow courses to render with invalid proctoring provider (#35430) 2024-09-09 10:51:06 -04:00
Muhammad Qasim Gulzar
dfb09bbf4f fix: Unexpected "Copied_from_block" field in Advanced Settings (#34472)
Closes https://github.com/openedx/edx-platform/issues/34370
2024-06-17 11:14:15 -04:00
Maria Grimaldi
33b8137763 refactor: rename minimum partition ID constant to be more generic (#34529)
Rename MINIMUM_STATIC_PARTITION_ID to MINIMUM_UNUSED_PARTITION_ID
so it's not confusing when used to generate IDs for static or dynamic
partitions.
2024-05-20 14:38:58 -04:00
Maria Grimaldi
809ffc3743 feat: connect teams with content groups using dynamic partition generator (#33788)
Implements the connection from the teams feature to the content groups feature. This implementation uses the dynamic partition generator extension point to associate content groups with the users that belong to a Team.

This implementation was heavily inspired by the enrollment tracks dynamic partitions.
2024-04-25 13:02:49 -04:00
Cristhian Garcia
5a36fa9163 feat: add open_managed team type (#33672)
Ref: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3885760525/Open+Managed+Group+Type
2024-02-14 11:30:19 -04:00
ayesha waris
53270f17b3 chore: removed and merged multiple flags into enable_discussions_mfe flag (#33983) 2024-01-12 15:07:00 +05:00
thezaeemaanwar
0b3e4d73b6 feat!: Removed Badges App
fix: restored badges handlers

feat: remove FE code for badges

fix: resolved failing tests

fix: removed test case for badges app

fix: unused import error

fix: Response Field Count

fix: shareable account response length

fix: resolved PR comments

fix: revert settings override

feat!: Removed Badges App

fix: restored badges handlers

feat: remove FE code for badges

fix: resolved failing tests

fix: removed test case for badges app

fix: unused import error

fix: Response Field Count

fix: shareable account response length

fix: revert subscription badge
2023-10-18 20:30:04 +05:00
Pooja Kulkarni
ce13cd540a refactor: rename descriptor -> block within cms
Co-authored-by: Agrendalath <piotr@surowiec.it>
2023-04-26 17:10:53 +02:00
0x29a
0df1411636 refactor: xmodule/course_module.py -> xmodule/course_block.py 2022-12-19 17:48:49 +01:00
alangsto
92b60f11b2 feat: add lti proctoring provider option (#30950) 2022-09-08 13:53:23 -04:00
Eugene Dyudyunov
655e4a344f refactor!: update CourseWaffleFlag (#30351)
BREAKING: get rid of the LegacyWaffle-based CourseWaffleFlag.
Both CourseWaffleFlag and FutureCourseWaffleFlag now use the modern
WaffleFlag as parent class. FutureCourseWaffleFlag left to support ORA
transition to modern waffle.

Switch to the ORA version which supporting new Waffles.
2022-05-10 15:08:59 -04:00
Eugene Dyudyunov
8bd43207ca refactor!: switch from LegacyWaffle* to modern waffles (#30330)
This is a first stage for removing the LegacyWaffle* classes.

LegacyWaffleFlag usage replaced with WaffleFlag;
LegacyWaffleSwitche usage replaced with WaffleSwitch;
New CourseWaffleFlag added to the temporary module __future__ as FutureCourseWaffleFlag;
Updated all the imports to use CourseWaffleFlag from the __future__ module;

BREAKING CHANGE: A number of toggle related constants (e.g. ENABLE_ACCESSIBILITY_POLICY_PAGE)
changed types. They were strings, and are now toggle instances (e.g. WaffleSwitch). Although the entire
refactor should be self-contained in edx-platform, if any plugins or dependencies were directly
using these constants, they will break. If this is the case, try to find a better publicized way of
exposing those toggles.
2022-05-05 12:03:10 -04:00
Jawayria
59631c4825 chore: Applied lint-amnesty on cms/djangoapps 2021-12-10 19:14:36 +05:00
Kshitij Sobti
79cd0b1ef8 feat: Adds discussions settings for new discusions experience [BD-38] [TNL-8621] [BB-4854] (#29131)
* feat: Adds discussions settings for new discusions experience
This commit adds new discussions settings for the new discussions experience. These are stored in the course so they can be a part of course import/export flow.
These are also added to the discussions configuraiton API to allow MFEs to update the settings.
The discussions API is currently available via LMS, however that means it cannot save changes to the modulestore. This also adds the API to the studio config so it can now also be accessed from studio and be used to save course settings.

* fix: tests
2021-10-28 11:56:17 +05:00
David Ormsbee
5d0132305d Revert "feat: Adds discussions settings for new discusions experience (#28749)"
This reverts commit bb0c03123c.
2021-10-27 10:40:12 -04:00
Kshitij Sobti
bb0c03123c feat: Adds discussions settings for new discusions experience (#28749)
This commit adds new discussions settings for the new discussions experience. These are stored in the course so they can be a part of course import/export flow.
These are also added to the discussions configuraiton API to allow MFEs to update the settings.
The discussions API is currently available via LMS, however that means it cannot save changes to the modulestore. This also adds the API to the studio config so it can now also be accessed from studio and be used to save course settings.
2021-10-27 15:41:27 +05:00
M. Zulqarnain
e54fb5f76e feat: New codemods on CMS (#28768) 2021-10-25 12:59:54 +05:00
Kyle McCormick
9bf266f717 fix: add missing __init__.py files 2021-10-21 09:54:22 -04:00
Kshitij Sobti
8cf751a405 feat: Add REST APIs for course advanced settings and course tabs
This commit adds new APIs that allow MFEs to modify a course's advanced settings
and to update tab settings to show/hide/move tabs.
2021-08-31 11:11:46 +05:00
Matt Tuchfarber
622d56026c Certificate Display Settings revamp (round 2) (#28286)
feat: reimagine certificate display settings

The course settings `certificate_available_date` (CAD) and
`certificates_display_behavior` (CDB) were previously
acting indedependantly of one another. They now work in
tandem. This change:
- limits CDB to a dropdown
- removes "early_with_info" and adds "end_with_date"
- only takes CAD into account if "end_with_date" is selected
- Moves CDB to the main course schedule settings page
- updates CourseOverview model and CourseDetails objects to
validate these fields and choose sane defaults if they aren't
expected values

This work was previously done in bd9e7dd (complete with bugs), so this
version is toggleable via the ENABLE_V2_CERT_DISPLAY_SETTINGS setting
2021-08-02 11:30:15 -04:00
Matt Tuchfarber
63cb6a97ff Revert "feat: Reimagine certificate_availability_date and certificates_display_behavior" 2021-07-07 16:53:05 -04:00
Matt Tuchfarber
2a7106acfb feat: reimagine certificate display settings
The course settings `certificate_available_date` (CAD) and
`certificates_display_behavior` (CDB) were previously acting indedependantly
of one another. They now work in tandem. This change:
- limits CDB to a dropdown
- removes "early_with_info" and adds "end_with_date"
- only takes CAD into account if "end_with_date" is selected
- Moves CDB to the main course schedule settings page
- updates CourseOverview to validate these fields and choose sane
defaults if they aren't expected values

Certificates will now show under the following circumstances:
"Immediately upon passing"
certificate_availability_date = null
certificates_display_behavior = "early_no_info"

"End date of course"
certificate_availability_date = null
certificates_display_behavior = "end"

"A date after the course end date"
certificate_availability_date = <date>
certificates_display_behavior = "end_with_date"
2021-07-06 16:45:23 -04:00
SaadYousaf
608f1994b7 refactor: move waffle flag calculation to utils file and other updates 2021-06-28 11:54:16 +05:00
SaadYousaf
039a816e57 refactor: move pages_and_resources_mfe WaffleFlag to use in both LMS and Studio 2021-06-28 11:54:16 +05:00
SaadYousaf
09c8ef931e feat: Add CourseWaffleFlag for overriding course discussion settings for legacy experience. 2021-06-28 11:54:16 +05:00
alangsto
5bfc790014 fix: allow instructors to modify zendesk ticket setting (#27512)
MST-362. Previously instructors were unable to modify the zendesk ticket field, although that field should change based on the proctoring provider. This backend change allows course instructors to modify the field so that it is appropriate for whateverproctoring provider they choose.
2021-05-05 12:04:53 -04:00
Usama Sadiq
ab41a7daee refactor: Apply lint-amnesty on pylint violations 2021-04-20 21:43:59 +05:00
Ahtisham Shahid
f3a62b5f89 Error message for proctor exam show to user (#27238)
* Error message for proctor exam visible to user

* Created exception class for Invalid Proctor settings
2021-04-07 10:46:19 +05:00
alangsto
736e399cde MST-643 prevent errors for escalation email if proctoring is disabled (#27166) 2021-03-30 08:33:48 -04:00
M. Zulqarnain
3a5be3b074 pyupgrade on course_creators, maintenance and models apps under CMS (#26709) 2021-03-02 16:45:20 +05:00
Régis Behmo
5a618bfdbb Annotate git export settings and toggles in CMS
We take the opportunity to resolve a few linting issues, without affecting the
feature behaviour.
2021-02-09 12:39:48 +01:00
Zulqarnain
ffb9e6cb4b pylint amnesty in cms apps 2021-02-02 15:31:33 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Kyle McCormick
a3deb6e317 Sort imports in cms/
Command: `isort --recursive cms/`
2020-10-19 09:34:31 -04:00
Kyle McCormick
538dbf696b Import CMS code using fully qualified module names
or, using proper the proper Python 3 relative imports
(e.g., 'from .views import x') which are standard and
unambiguous.
2020-10-19 09:34:31 -04:00
Jansen Kantor
2667d8766e prevent max_team_size from exceeding 500 (#25267) 2020-10-07 12:02:48 -04:00
Jansen Kantor
45c54ee6a5 log grade policy changes (#25247)
* log grade policy changes

* quality
2020-10-05 19:58:33 -04:00
Andytr1
586e1cc4d5 EDUCATOR-5300 - advanced team settings validation (#25171)
* EDUCATOR-5300 - advanced team settings validation

* EDUCATOR-5300 - handle missing team config

* EDUCATOR-5300 - CR comments

* EDUCATOR-5300 - CR comments 2

* EDUCATOR-5300 - CR max team size

* EDUCATOR-5300 - CR max team size fix up
2020-10-05 14:29:56 -04:00
Zachary Hancock
33f6d77f31 Alert banner for proctoring settings error (#24960) 2020-09-17 14:15:34 -04:00
Régis Behmo
307457a255 Simplify hack to obtain waffle module names
Instead of going up the stacktrace to find the module names of waffle
flags and switches, we manually pass the module __name__ whenever the
flag is created. This is similar to `logging.getLogger(__name__)`
standard behaviour.

As the waffle classes are used outside of edx-platform, we make the new
module_name argument an optional keyword argument. This will change once
we pull waffle_utils outside of edx-platform.

Note that the module name is normally only required to view the list of
existing waffle flags and switches. The module name should not be
necessary to verify if a flag is enabled. Thus, maybe it would make
sense to create a `add` class methor similar to:

    class WaffleFlag:
        @classmethod
        def add(cls, namespace, flag, module):
            instance = cls(namespace, flag)
            cls._class_instances.add((instance, module))
2020-09-14 09:30:24 +02:00
alangsto
1f5b1e6c4d Removed waffle flag for proctoring backend advanced setting (#24606)
* remove waffle flag for proctoring providers

removed waffle flag

removed tests

updates for requested changes

corrected mistake

Add edX Django Rest Framework Extensions CSRF App URLS to Studio

MST-334 Make sure the CSRF hooks are in INSTALLED_APPS on Studio (#24607)

ENT-2894: Use new welcome template when redirected from enterprise proxy login view (#24587)

* using new welcome template when redirected from enterprise proxy login view

* enabling safe redirects to enterprise learner portal from login in devstack

* ading admin portal to login redirect whitelist

* running make upgrade to version bump edx-enterprise

fix(i18n): update translations

Updating Python Requirements

[REV-1257] Add upsell tracking for upgrading all programs button on program dashboard (#24589)

Added upsell tracking to the course upgrade all button on the program dashboard so we have a better understanding of when users are clicking our upsell links.

POST proctored exam settings (#24597)

allow blank escalation email (#24613)

[BD-10] Remove _uses_pattern_library property from EdxFragmentViews (#24536)

[BD-10] remove edx-pattern-library from JS bundles (#24165)

Co-authored-by: Sankar Raj <sankar.raj@crystaldelta.com>

Make the ExperimentWaffleFlag respect course masquerading when checking if it's active for a specific enrollment

[REV-1205] Add doc location comment so future devs can easily find it  (#24615)

AA-204: passing correct section information to frontend to complete outline portion of tab

AA-204: adding tests

AA-204: fixed up documentation and tests

[BD-10] Remove uses bootstrap method  (#24535)

Remove pattern library of certificate styles.

update search description on new search string (#24619)

* update search description on new search string

* disable xss-lint rule for jquery.html

make comment more general, to allow for future changes (#24618)

[BD-10] [DEPR-92] Remove pattern library of pavelib folder (#24591)

[BD-10] [DEPR-92] Remove directories that includes pattern-library. (#24602)

Add SSO Records endpoint for support tools

Bucket users regardless of enrollment in courseware MFE experiment

Updating Python Requirements

Change the default value of allow_proctoring_opt_out (#24626)

MST-333

ENT-3143: display message banner guiding user to their enterprise LP if enabled (#24625)

* display message banner guiding user to their enterprise LP if enabled

* adding new sass class name to use same styling as recovery email alert

Add "Source from library" XBlock

This lets the user import a block from a blockstore-based content library into a (modulestore based) course, by copying the block into the course.

Revert "[BD-10] [DEPR-92] Remove pattern library of certificate styles." (#24633)

Revert "[BD-10] [DEPR-92] Remove directories that includes pattern-library. (#24602)"

This reverts commit e4f28debb7.

Revert "[BD-10] [DEPR-92] Remove pattern library of pavelib folder (#24591)" (#24635)

This reverts commit 6980291d96.

allow plus or minus one (#24637)

geoip2: update maxmind geolite country database

fix keyerror with request.session (#24642)

* fix keyerror with request.session

* improve the conditional

AA-127: Created MFE Outline Tab Waffle Flag

Note: The team settled on raising a 404 when the waffle flag is disabled.
Upon receiving the 404, the frontend will redirect to the LMS.

Fixes session caching for enterprise portal links by only caching for auth'd learners

BUG: fixes for saml provider config/data lookup

Fix xss in edit member template

Fix xss while rendering file-upload

Fix xss in date

Fix xss in base site template

* revert

* removed from test_views
2020-08-13 11:37:17 -04:00
Zachary Hancock
57de9b2ac6 POST proctored exam settings (#24597) 2020-07-27 09:23:03 -04:00
Andytr1
af072a5158 EDUCATOR-5039 (#24546)
* EDUCATOR-5039

* EDUCATOR-5039 - pr updates
2020-07-21 13:36:18 -04:00
Zachary Hancock
c9f5ec3397 disable escalation email requirement (#24551) 2020-07-21 09:45:25 -04:00
Zachary Hancock
bcc1ddd375 add proctoring escalation contact setting (#24243) 2020-06-24 16:02:17 -04:00
Michael Roytman
e5f298e158 Change validation code to use the value of the proctoring_provider model when making a comparison instead of the entire model. Otherwise, the condition 'current_provider != requested_provider' always resolves to True. 2020-06-23 18:49:28 -04:00