Commit Graph

129 Commits

Author SHA1 Message Date
Emad Rad
4529041643 chore: cleanup
- rst heading definitions
- indirect hyperlinks and code-blocks for better readability
2024-05-25 18:08:25 +03:30
Kyle McCormick
15caa9746f refactor: Completely remove Blockstore (#34739)
Blockstore and all of its (experimental) functionality has been replaced with
openedx-learning, aka "Learning Core". This commit uninstalls the now-unused
openedx-blockstore package and removes all dangling references to it.

Note: This also removes the `copy_library_from_v1_to_v2` management command,
which has been broken ever since we switched from Blockstore to Learning Core.

Part of this DEPR: https://github.com/openedx/public-engineering/issues/238
2024-05-13 09:48:18 -04:00
salmannawaz
57b480b04f Update all edx-platform REST endpoints to support JWT Auth (#34152)
* chore: update API endpoints to support default JWT auth

The default DRF Auth classes were recently updated to allow for both JWT and Session auth by default. Any endpoint that overrides the AUTHENTICATION_CLASSES but has just session, just JWT or just both of those should be updated to remove the override.

Details in https://github.com/openedx/edx-platform/issues/33662
2024-02-13 10:46:58 -05:00
Pooja Kulkarni
5447a211de refactor: rename descriptor -> block within lms/djangoapps/edxnotes
Co-authored-by: Agrendalath <piotr@surowiec.it>
2023-04-26 17:10:53 +02:00
0x29a
fd191db332 refactor: rename module (or item) -> block within remaining lms
Also, removed `_iter_scorable_xmodules` method from `lms/djangoapps/grades/transformer.py` file.
2023-01-30 18:15:23 +01:00
0x29a
9d8375ff99 refactor: rename module -> block within lms/djangoapps/courseware
Also, removed unused `_has_access_xmodule` methid from `lms/djangoapps/courseware/access.py`.
2023-01-30 18:15:22 +01:00
Arunmozhi
b6634a811a refactor: replace get_display_blocks with get_children 2023-01-23 14:47:47 +01:00
Arunmozhi
851eb65d53 refactor: rename get_displayable_items and displayable_items 2023-01-23 14:47:47 +01:00
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
0x29a
83396ffb07 refactor: convert course_module term to course_block 2022-12-19 17:48:49 +01:00
0x29a
007e02cd76 refactor: xmodule/html_module.py -> xmodule/html_block.py 2022-12-19 17:48:49 +01:00
Sagirov Eugeniy
8f88422c4a test: prepare tests for removing support for children in Old Mongo 2022-10-28 11:43:20 -04:00
Agrendalath
c2ac3d83c3 refactor: remove deprecated runtime.course_id from edxnotes decorator
We will use `context_key` instead.
2022-09-21 18:52:28 +02:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00
Jillian Vogel
f828d89feb refactor: use UserService to remove deprecation warnings
from code and tests.
2021-12-20 15:41:25 +01:00
Jawayria
1caae59c1a chore: Applied lint-amnesty on lms/djangoapps/{edxnotes, experiments} 2021-12-20 16:05:02 +05:00
edX requirements bot
bb20b17428 Python Requirements Update (#29516)
* chore: Updating Python Requirements

* fix: fix pylint issues

Co-authored-by: Mohammad Ahtasham ul Hassan <mohammad.ahtasham@arbisoft.com>
2021-12-08 14:13:27 +05:00
Kshitij Sobti
e8e8f4acbe feat!: Change the way tabs are ordered [BD-38] [TNL-9174] [BB-5076] (#29262)
* feat!: Change the way tabs are ordered
The change imposes a new ordering for tabs based on their new priority. When reordering tabs, this ordering will be maintained.

* fix: Apply suggestions from code review

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>

* fix: review feedback

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
2021-11-22 11:17:30 +05:00
M. Zulqarnain
b84b862cc0 feat: Django codemods on LMS (3) (#28853) 2021-11-16 18:27:21 +05:00
Kshitij Sobti
285e2c4f29 feat: Adds a new discussion topic configuration mechanism [BD-38] [TNL-8623] [BB-4968] (#29082)
* feat: Adds a new discussion topic configuration mechanism

The new discussion configuration system links discussion topics directly to the course structure. This change adds a new task that sends a discussion update signal if there are any changes to the course. This signal includes all the context needed to update the configuration of the course.

The handler for this new event will create a new entry for each unit that needs a topic in the database. In the future this will be used to see the topics in the course.

* fix: add support for marking a provider as supporting LTI

* fix: review feedback
2021-11-12 19:08:43 +05:00
Jillian Vogel
bafc0cd91f refactor: removes calls to deprecated ModuleSystem attributes
Removes references to these deprecated attributes from the platform code:
* runtime.anonymous_student_id
* runtime.seed
* runtime.user_id
* runtime.user_is_staff

Related changes:

* Ensure that all platform XBlocks which use these attributes "need" the user service.
* ProblemBlock: Removes check for existence of runtime.seed attribute in preparation for removal of this attribute from ModuleSystem.
* edxnotes: Catches NoSuchServiceError just in case some XBlocks using notes don't have the user service.
* UserTagsService refactor: pass user and course_id on creation

(cherry picked from commit 753839276f)
2021-11-02 18:24:14 +10:30
Kshitij Sobti
d4cd3bd611 fix: enabling the notes tool using the course authoring will now add the notes tab (#29093)
If an existing course doesn't already have the notes tab, enabling notes will not make it show up. This change fixes this by adding the tab in case it isn't already in the course.
2021-10-26 14:57:19 +05:00
David Ormsbee
deaf80f346 revert: "[BD-13] Let ModuleSystem use UserService" (#28857)
This caused a regression where anonymous_id values were not as expected.
Reverting for now, with investigation to follow.
2021-09-27 15:42:35 -04:00
David Ormsbee
3827f4c90d Merge pull request #28440 from open-craft/jill/BD-13-user-service
[BD-13] Let ModuleSystem use UserService
2021-09-24 09:26:43 -04:00
Usama Sadiq
023f4144ab fix: fix new pylint warnings (#28725) 2021-09-23 17:54:15 +05:00
Jillian Vogel
753839276f refactor: removes calls to deprecated ModuleSystem attributes
Removes references to these deprecated attributes from the platform code:
* runtime.anonymous_student_id
* runtime.seed
* runtime.user_id
* runtime.user_is_staff

Related changes:

* Ensure that all platform XBlocks which use these attributes "need" the user service.
* ProblemBlock: Removes check for existence of runtime.seed attribute in preparation for removal of this attribute from ModuleSystem.
* edxnotes: Catches NoSuchServiceError just in case some XBlocks using notes don't have the user service.
* UserTagsService refactor: pass user and course_id on creation
2021-09-23 11:46:43 +09:30
Soban Javed
56d12bf230 feat!: upgrade pyjwt to version 2.1.0 2021-09-17 16:08:15 +05:00
Braden MacDonald
da09bcadc5 refactor: run modulestore tests in common/lib/... using Django
Does 3 things:
(1) Use django for modulestore tests
(2) Use normal LMS settings for modulestore tests instead of openedx/tests/settings.py
(3) Simplify some TestCase subclasses by converting them to use ModuleStoreTestCase


Details and rationale:

(1) Currently parts of the modulestore test suite are designed to run "without django", although there is still a lot of django functionality imported at times, and many of the tests do in fact use django. But for the upcoming PR #27565 (moving split's course indexes from MongoDB to MySQL), we will need to always have Django enabled. So this commit paves the way for that change.

(2) The previous tests that did use Django used a special settings file, openedx/tests/settings.py which made some debugging confusing because those tests had quite different django settings than other tests. This change deletes that file and runs the tests using the LMS test settings.

(3) The test suite also contains many different ways of initializing and testing a modulestore, with significant differences in their configuration, and also a lot of repetition. I find this makes understanding, debugging and writing tests more difficult. So this commit also reduces the number of different "test case using modulestore" base classes:

* Simplifies MixedWithOptionsTestCase and MixedSplitTestCase by making them simple subclasses of ModuleStoreTestCase.
* Removes PureModulestoreTestCase.
2021-08-05 12:20:19 -07:00
Kshitij Sobti
6cbb9cbca3 feat: Supply documentation links for course apps from the backend (#28327)
Instead of hard-coding the "Learn More" and potentially other links for course
apps in the course authoring  MFEs this change loads those URLs from the
django settings as part of each individual course app.
2021-08-04 15:04:13 +05:00
Mehak Nasir
7b29d1bdf2 fix: description updates for pages and resources 2021-07-27 20:32:31 +05: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
Usama Sadiq
f74d7c9ea7 refactor: pyupgrade second iteration 2021-04-30 15:35:47 +05:00
Usama Sadiq
aa618c460c refactor: remove unused-imports (#27083) 2021-03-19 22:42:14 +05:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
M. Zulqarnain
16f600910b pyupgrade on lms edxnotes,email_marketing,experiments apps (#26531) 2021-02-22 15:42:32 +05:00
Aarif
906b6f7fed replaced unittest assertions pytest assertions (19) (#26545) 2021-02-18 18:00:30 +05:00
M. Zulqarnain
c9c14ee6fc BOM-2279 : Pylint amnesty for edxnotes,email_marketing, and experiments (#26274)
* lint amnesty for edxnotes,email_marketing, and experiments
2021-02-03 18:15:26 +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
ef845ebc43 Fully qualify remaining edxnotes imports 2020-09-25 14:13:30 -04:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Nathan Sprenkle
c66176da13 Add error reporting to UI for CSV team management (#23035)
* Add error banner for upload memberships errors

* Edit error message language

* Fix linter warnings
2020-02-14 09:58:58 -05:00
Dave St.Germain
1aa8c9c53d Add a new courseware API Django app to support the courseware micro-frontend. 2020-01-28 14:59:07 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Alan Zarembok
38491776f0 Updates notes client name and API url for compatiblity with devstack. 2019-11-21 10:54:19 -05:00
Jeremy Bowman
d4b0968e3a Fix JSON parsing in edxnotes.helpers BOM-990 (#22122) 2019-10-22 17:57:01 -04:00
Ayub
d6c99de909 BOM-418 TypeError: unhashable type: SequenceDescriptorWithMixins (#22051)
DescriptorWithMixins are dynamically created and do not have a hash
class method. Those classes had hash values in python2 but do not
have a default hash in python3. Thus those class objects can not be
used as dict keys. Used location of section/unit instead of real object
for cache dict. Location object is hashable.
2019-10-17 13:23:31 -04:00
Nimisha Asthagiri
a6b219a9e9 Python-3: assertIn(..response.content) -> assertContains 2019-09-30 08:50:38 -04:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00