Commit Graph

1270 Commits

Author SHA1 Message Date
Binod Pant
33cdf634b4 refactor: Extract core functionality of enrollment api in a python api to avoid REST calls from edx-enterprise (#28202)
* feat: Refactor out non REST portions of enrollment api from enrollment POST method

For use with edx-enterprise to avoid making REST calls for bulk enrollment and other use cases

ENT-4746

* feat: Remove unused test

Testing is covered by test_views

* refactor: isort

isort fixes

* docs: ADR for why this change

ADR

ENT-4746

* test: Fix test failure by restoring course_id to correct object

* test: Test fix

* refactor: pylint fixes

* refactor: raise from to avoid pylint error

* refactor: Start to work toward a util in enterprise_support instead of refactoring this endpoint

* feat: Add util function in enterprise_support to eventually handle enrollment, only used by bulk enrollment for now

* feat: One more revised idea, this time low risk in edx platform and also helps address enterprise specific flow. testing pending

* feat: syntax and unused constant

* feat: Restore view and add new util function to use in edx-enterprise instead

* feat: breakpoint

* unused import

* feat: don't fail on existing enrollment

* docs: ADR update

* docs: docstring minor update

* test: unit test add_user_to_course_cohort

* refactor: imports

* feat: remove unused error classes

* refactor: lint

* test: Test cases

* test: Two more tests for negative cases

* feat: missing init.py file

* test: Fix tests to use correct user mock

* unused import

* refactor: Review feedback, test fixes, needs rebase now

* feat: rebase changes

* feat: keep audit_log with similar logic as in the view

* refactor: Review feedback, test constant usage
2021-07-21 16:59:45 -04:00
Diana Huang
29548459fa refactor: Remove PyContracts usage. (#27887)
* refactor: Remove PyContracts usage.

We have not used PyContracts in a while and it is overhead we don't
need in edx-platform.

https://openedx.atlassian.net/browse/DEPR-147

* chore: Updating Python Requirements (#28018)

Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2021-06-23 18:24:06 -04:00
Kshitij Sobti
d2c2fcdefe feat: Course Apps API [BD-38] [TNL-8103] [BB-2716] (#27542)
* feat: Course Apps API

This adds a new concept called course apps. These are exposed via a new
"openedx.course_app" entrypoint, which helps the LMS and studio discover such
apps and list them in a new rest api for the same.

These course apps will drive the pages and resources view in the course authoring
MFE. This system will track which apps are enabled and which are disabled. It
also allows third-party apps to be listed here by using the plugin entrypoint.

* Apply feedback from review
2021-06-23 21:51:12 +05:00
Kshitij Sobti
161e3560dd feat: Add REST endpoints for problem response report generation that can be driven by MFEs. (#27313) 2021-05-06 14:05:14 -04:00
Michael Terry
35f78a3241 feat!: remove all email_marketing djangoapp code
This djangoapp was designed for talking to sailthru, in a fairly
edx.org-specific way. Nowadays, edx.org doesn't need this code and
if other installations do, it's better off as a more distinct
plugin anyway, rather than direct support in the platform.

I've moved the one signal that was still useful (calling
segment.identify() whenever user fields change) into user_authn.

And I've left the EmailMarketingConfiguration model alone for now,
but will remove that shortly. Nothing uses it as of this commit.

AA-607
DEPR-139
2021-05-03 16:39:01 -04:00
Jawayria
dbcd8066e5 Merge pull request #26626 from edx/jawayria/bom-2416
BOM-2416: Removed unused imports from docs, scripts, pavelib
2021-04-09 19:31:20 +05:00
Jawayria
96e1bffc97 Refactor: Removed unused imports
Removed unused imports from docs, scripts, pavelib
2021-04-09 16:03:53 +05:00
Piotr Surowiec
bc1e9afe4b feat: allow overriding unit icons (#21433)
This:
1. Introduces a new override using the `pluggable_override` decorator.
It is now possible to specify a custom way of getting XBlock's icon
by defining `GET_UNIT_ICON_IMPL` in settings.
2. Introduces a way to add custom `XBLOCK_MIXINS` by defining
`XBLOCK_EXTRA_MIXINS` in settings. This allows, e.g. to add
new fields to XBlocks.
2021-04-07 09:42:12 -04:00
Kyle McCormick
37650c1009 build: fix+simplify docs config now that sys.paths hacks are gone
The docs configuration files previously had to account
for the fact that lms/djangoapps, cms/djangoapps, and
common/djangoapps were hacked into sys.path. As of ~Lilac,
this is no longer the case.

Unrelated cleanup: devstack_docker and devstack
are now aliases, so we can simplify a conditional import
in docs_settings.py
2021-03-08 12:49:31 -05:00
Kyle McCormick
dfa60a5e92 docs: update sys.path hacks ADR & add upgrade guide
The timeline of the import_shims removal has evolved
over time; notably, we are keeping the import_shims
in Lilac in order to make any lingering old-style
import paths obvious to operators.

Update the ADR to reflect this. Also, add a table
mapping old import paths to new ones.
2021-03-08 12:49:31 -05:00
M. Zulqarnain
e35d3de376 refactor: pyupgrade on docs & pavelib (#26768) 2021-03-05 15:24:59 +05:00
Feanil Patel
8925756f11 doc: Add some docs for how rate-limiting works. (#26475)
* doc: Add a decision around rate-limiting in edx-platform

While looking into whether a change to how we handle RateLimitExceptions
would impact logins, I learned the following about the current state of
how rate limiting works in our login flows.  Based on what I learned, I captured
the current state as well as decisions on how we should rate limit in the future.
2021-02-17 13:16:57 -05:00
Jawayria
69e0dc7d68 Applied pylint-amnesty to {docs, import_shims, pavelib} 2021-02-02 21:17:16 +05:00
David Ormsbee
5353324c80 Merge pull request #26145 from edx/ormsbee/course-outline-publish-tnl-7733
Push Course Outlines to learning_sequences on publish.
2021-01-28 10:21:11 -05:00
David Ormsbee
d531d38ec7 Fix formatting on interapp APIs extension ADR.
The numbered lists were not written correctly.
2021-01-28 09:56:38 -05:00
Feanil Patel
c5913a58d5 Add an ADR about secret key usage. (#26146)
Add an ADR about secret key usage.

Don't use secret keys for use cases which would result in breakage upon
rotation and which might slow down the act of rotation.
2021-01-25 13:35:49 -05:00
Jayram
5a9e12dd96 [ADD] user account registration endpoint for api-docs
Added alias for /user_api endpoints

FIX quality violations

IMPROVED urls_common for readability

Removed redundant URL entry from urls_common file
2021-01-15 03:59:16 +00:00
Nizar
1e872d4e10 Adds support for enabling custom tinymce plugins in Studio's HTML editor (#25695) 2021-01-11 11:28:20 -05:00
Awais Qureshi
1f616f6fcd Fixing make docs
Adding constraint on sphinx.
2021-01-05 22:42:01 +05:00
Muhammad Soban Javed
dd534a90e5 Added celery task documentation (#25926)
* Added celery task documentation
2021-01-05 14:32:52 +05:00
Robert Raposa
fd584b70b6 Merge pull request #25681 from edx/robrap/capitalize-technical-reference-2
capitalize technical reference title
2020-12-01 12:22:57 -05:00
Manjinder Singh
d99070f68d docs: Clarifying pytest testing guide (#25668) 2020-12-01 09:48:30 -05:00
Diana Huang
1049c8c502 Clarify how to debug javascript tests in testing.rst. 2020-11-30 11:38:17 -05:00
Robert Raposa
10ce4af1ea capitalize technical reference title
Capitalize the title of the "edx-platform Technical Reference" documentation.
2020-11-24 16:59:52 -05:00
Sarina Canelake
18059c20e7 Merge pull request #25505 from edx/sarina/gender-neutral-language
Change gendered language to gender-neutral 'they/them/their'
2020-11-03 16:16:59 -05:00
Robert Raposa
64a162f69c Merge pull request #25494 from regisb/regisb/fix-swaggerdocs
[BD-21] Fix API docs generation and update swagger.yml
2020-11-03 11:40:29 -05:00
sarina
f414fad0cc Change gendered language to gender-neutral 'they/them/their' 2020-11-02 18:23:13 -05:00
Régis Behmo
3599198f19 Fix API docs generation and update swagger.yml
API docs generation was being blocked by missing values in the doc
settings. We wanted to update the swagger.yml to get the toggle state
("/toggles/v0/state/") endpoint in the docs.
2020-11-02 09:27:48 +01:00
Kyle McCormick
090e10683c Rename sys_path_hacks/ to import_shims/
The old folder name is somewhat confusing, because the
folder contains shims to _compensate for the removal
of sys.path hacks_, but does not contain the sys.path
hacks themselves.

Furthermore, this import_shims/ system could also be
used for other import path changes, such as turning
the locally-installed packages in common/lib/
into regular, importable modules
(e.g. `from common.lib.xmodule import abc` instead of
`from xmodule import abc`). So, a name that is not
specific to the sys.path hacks may be better
in the medium-to-long term.

Along the same lines, we also rename SysPathHackWarning
to DeprecatedEdxPlatformImportWarning.
2020-10-30 10:20:48 -04:00
Kyle McCormick
4847a18a66 Remove sys.path modification for Studio; use sys_path_hacks instead
Also, tweak the un_sys_path.sh script.
2020-10-19 09:34:31 -04:00
Jeremy Bowman
d19368525b DEPR-43 Remove most of the shoppingcart app (#24692)
Removed most of the deprecated shoppingcart app, leaving just enough to allow us to cleanly remove the related database tables later. Also removed the relevant Django settings that weren't in use elsewhere.
2020-10-14 14:24:52 -04:00
Robert Raposa
f65bf0ed9d Merge pull request #24794 from regisb/regisb/settings-docs
[BD-21] Document settings with annotations
2020-10-01 11:53:39 -04:00
Régis Behmo
a41f2a5ca8 Rename "featuretoggles" docs target to "technical"
We also split the feature toggle and settings docs in different pages.
2020-10-01 16:35:48 +02:00
Kyle McCormick
b82ac1fc16 Add sys_path_hacks/warn.py for easier modification of path warnings 2020-09-30 08:56:44 -04:00
Régis Behmo
e555d8a571 [BD-21] Document settings with annotations
We introduce the documentation of django settings via code annotations.
This will allow us to produce a human-readable documentatio of all Open
edX settings.
2020-09-28 12:44:36 +02:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
Calen Pennington
7cbfc8de40 Add an ADR capturing sys.path removal justifications 2020-09-23 10:05:37 -04:00
Gábor Boros
6ccd6c308d docs(lms and studio): Replace all .(lms|cms).(\w+|_)?\.json to .(lms|cms).(\w+|_)?\.yml 2020-09-18 10:44:14 +02:00
David Ormsbee
607400c403 ADR for the role of XBlock
Architecture Decision Record detailing the history of XBlock and
where we're going with it in the platform.
2020-08-26 10:37:37 -04:00
Robert Raposa
2c8105f7ae [BD-21] Generate feature toggle documentation
We introduce a new documentation target, where we use the featuretoggles
Sphinx extension from code-annotations to generate human-readable
documentation of feature toggles in edx-platform. The annotation report
is generated on-the-fly based on the standard feature toggle
configuration file in code-annotations.

In addition, we add new doc.in & doc.txt requirement files that will be
pip-installed by readthedocs to generate the documentation targets.
2020-08-14 19:41:26 +02:00
Manjinder Singh
c76ed6ae45 Extracting plugin app from edx-platform (#24678)
* Moving plugins infrastructure to edx-django-utils
This PR extracts the code that enables plugins in edx-platform and puts it in edx-django-utils. This is done to allow other IDAS to add plugin functionality.
2020-08-12 07:48:53 -04:00
Aarif
09ac7f9372 remove cyclomatic complexity calculation for python code 2020-08-04 22:10:05 +05:00
David Ormsbee
6d8fba77b2 ADR for LMS/Studio subdomain boundaries (TNL-7323)
Introduce an Architectural Decision Record about the boundaries
and responsibilities of Studio (Content Authoring) and the LMS
(Learning Experience). These are not new ideas. This is just
explicitly writing down the many local decisions that have been
made for years (Block Transformers, edx-when, grading, etc.), and
showing how they add together to a set of high level principles.

I hope to eventually have docs describing Studio/LMS's relation
to other subdomains in Open edX.
2020-07-11 13:05:18 -04:00
Braden MacDonald
831a90ebca Document the various integration points for platform extensions (#24057) 2020-06-10 17:22:32 -04:00
Ned Batchelder
cca33732ba Correct markup mistakes in api docs 2020-05-12 13:36:14 -04:00
Ned Batchelder
ac166306b3 Swagger.yaml is different due to DRF 3.9.x 2020-05-12 10:15:48 -04:00
Ned Batchelder
878b75191c Update docs_settings.py with latest settings 2020-05-11 14:21:15 -04:00
Feanil Patel
f95158458e Merge pull request #23888 from edx/feanil/update_bokchoy_adr
Bokchoy ADR Updates.
2020-05-05 15:16:42 -04:00
Feanil Patel
307986575e Make updates based on feedback. 2020-05-05 09:54:05 -04:00
Feanil Patel
55303e9233 Bokchoy ADR Updates. 2020-05-04 11:37:46 -04:00