Commit Graph

98 Commits

Author SHA1 Message Date
Navin Karkera
2598084946 feat: upstream downstream link model [FC-0076] (#36111)
Adds models, tasks, signal handlers and api's for adding, updating and deleting upstream->downstream links in database.
2025-02-11 12:15:50 -05:00
Muhammad Adeel Tajamul
ebe3dc5e12 fix: fixed course update notification UI in notification tray (#35715) 2024-10-28 15:47:08 +05:00
Muhammad Adeel Tajamul
968f4f716b feat: removed styling from course update notification (#35680) 2024-10-21 16:04:44 +05:00
Muhammad Adeel Tajamul
481a50717a feat: updated content in course_update notification (#35373) 2024-08-29 18:07:57 +05:00
Justin Hynes
907c32ae6d fix: add validation to cdb and cad settings on update (#34406)
[APER-3228]

This PR tries to correct bad data on a course update before it enters the system. There are times when we are updating a course (via Studio) and we save bad data that has been persisted and passed to the backend from the CMS's legacy Django template-based frontend.

The bad data doesn't affect the LMS or CMS much, as there is extra logic in the monolith around course pacing. However, downstream services (e.g. Credentials) don't understand the concept of course pacing and will persist bad data (like a certificate available date associated with a self-paced course run).

The most common problem that manifests is that Credentials will hide a certificate from a learner on their Learner Record, even though the course certificate is visible and accessible to the learner from the LMS.
2024-03-21 13:46:45 -04:00
Jesper Hodge
a6c57811cd feat add xblock api endpoint (#32282)
* feat: add xblock endpoint for updating an xblock

fix: remove debugger

feat: make function call more generic

refactor: just use request.json for request data as before

refactor: extract method

fix: revert wrong method change

fix: refactor correct method

feat: use handle_xblock method so that we can do more than update xblocks

fix: usage_key_string defaults to None

add all CRUD operations

fix usage key parameter

refactor: create /views folder

refactor: move xblock view functions to xblock_services

fix: tests

fix: tests

refactor: move xblock API endpoint to contentstore

* docs: add explanatory comment to new xblock_service

* feat: add feature flag for enabling content editing api

* feat: raise 404 if studio content api is disabled

* tests: test xblock endpoint

* test: make all post tests work

* test: check that xblock_handler receives correct args

* refactor: create util mixin for course factories with staff

* refactor: extract course staff authorization tests

* refactor: extract tests to api view testcase class

* test: add get tests

* test: fix tests

* test: fix tests

* test: fix tests

* test: add all crud tests

* fix: refactor to fix tests

* fix: merge conflict

* fix: merge conflict

* fix: tests after merge

* fix: json request decorator

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: new test files

* fix: lint

* fix: lint and apply PR suggestions

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: lint
2023-06-15 14:17:49 -04: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
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
Sagirov Eugeniy
02617283a0 test: fix problem with .get_children() in tests for split modulestore
* fixed problem with creating some CourseItem with some parent:
we must get the updated parent item before using that parent item
* replaced parent_location with parent argument in ItemFactory due to
error children/parent relation for split modulestore. In all tests with
split modulestore parent argument used
2022-12-21 10:58:43 -05:00
Raymond Zhou
d1394922ae feat: change text xblock title to 'Text' v2 (#30578) 2022-06-13 14:13:08 -04:00
connorhaugh
2e13033fbe Revert "Feat change default title for text xblock to be 'text'" 2022-06-01 10:52:09 -04:00
Raymond Zhou
8422f50a16 feat: fix test 2022-05-27 11:05:52 -07:00
Raymond Zhou
9c8b026588 feat: assertEqual 2022-05-27 10:47:27 -07:00
rayzhou-bit
cf84c3bc64 feat: more pep8 fix 2022-05-27 03:48:33 -04:00
rayzhou-bit
701bfbc8c6 feat: pep8 fixes 2022-05-27 03:24:18 -04:00
rayzhou-bit
c63d871e5c feat: add testing and i18n 2022-05-27 02:58:07 -04:00
Jawayria
c42e356f95 chore: Applied lint-amnesty on cms/djangoapps/contentstore/tests 2021-12-10 19:16:43 +05:00
Usama Sadiq
35d7b13de3 BOM-2494: pyupgrade second iteration-VIII (#27448) 2021-05-10 13:44:41 +05:00
Awais Jibran
9722e37492 Enable Course Olx Validation during Course Import (#27300)
* Enable import failure and email with Errors/Warnings

This PR enables course import failure in case of olx validation errors. Here is the flow.
  * Course Import tries to import foo.tar.gz into their course shell
  * Course olx contains validation errors
  * During course import, olx is validated and import is failed with the error message "Course olx validation failed. Please check your email."
  * System generates an email with ERRORs & WARNINGs in the body of the email.

This PR also adds a waffle flag contentstore.bypass_olx_failure. The purpose of this test flag is to allow course teams to unblock by enabling them to bypass the
the olx-validation failure.
The workaround is shared on the ticket TNL8214.

* Disable olx validation out of the box.
2021-04-16 18:45:59 +05:00
Awais Jibran
30c80082c3 Use config settings for olxcleaner (#27294)
* Use config settings for olxcleaner

Use config settings instead of hardcoded values for olx validation. This would help in adding a great deal of control when you want to change these settings in the future. With this approch we would not need a redeploy.

* Use configs and deprecate waffleflag and also add / update tests
2021-04-12 16:27:42 +05:00
Awais Jibran
f898fc5d72 Short circuit, library import. (#27195) 2021-04-01 12:29:57 +05:00
M. Zulqarnain
fa271dafe9 BOM-2369 (C): pyupgrade on contentstore/tests (#26759)
* pyupgrade on contentstore/tests
2021-03-04 14:37:39 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05: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
uzairr
fb9ba90efe PROD-1236: Do not expose user id with certificate URL. 2020-07-17 22:59:34 +05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
39d3a7ca17 Fix pep8 issues caused by the fixer. 2019-12-30 11:42:04 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
aarif
5f5b2ddc12 parent c89ecb384f
author aarif <mraarif@outlook.com> 1562661182 +0500
committer root <root@lms.devstack.edx> 1563270070 +0000

ran python-modernize and isort on files mentioned in INCR-327

changes made to comply with pylint

changes made to comply with pylint and pass failing test

changes made to comply with pylint
2019-07-16 09:46:20 +00:00
Jeremy Bowman
68902a2f3f TE-2689 Remove useless pylint suppressions part 3 2018-08-16 09:57:01 -04:00
cahrens
6f71706b17 Remove SlashSeparatedCourseKey from tests. 2017-08-07 14:49:30 -04:00
bbaker6225
8e06cdbf5e EDUCATOR-760
Change partitions logic to include partitions with one deleted group
2017-07-25 15:06:54 -04:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
John Eskew
3b57542ab0 Revert "Merge pull request #15170 from edx/jeskew/PLAT_1316_partitions_inheritance"
This reverts commit f97f052591, reversing
changes made to 800bcd8e20.
2017-05-30 12:42:54 -04:00
John Eskew
76389d8678 Run all files touched in inheritance/partition work through isort. 2017-05-25 13:24:08 -04:00
John Eskew
66f3aa5ccf Move fields.py, inheritance.py, and partitions to openedx/core. 2017-05-25 13:24:08 -04:00
Eric Fischer
5c26acc115 Re-kill ICRV block
This reverts commit 1224e341de. I've also added
NotImplementedPartitionScheme, which allows deprecated partition types to have
a valid entry point despite being unusable.

TNL-6675
2017-04-19 15:55:13 -04:00
cahrens
6e416310b9 Show messages about component visibility.
TNL-6746
2017-04-13 11:33:57 -04:00
cahrens
dbae1e397d Add ability to set visibility by enrollment track.
TNL-6744
2017-04-05 11:05:31 -04:00
cahrens
e5035746bf Introduce EnrollmentTrackUserPartition.
TNL-6674
2017-03-30 12:24:48 -04:00
Nimisha Asthagiri
1224e341de Revert "Merge pull request #14588 from edx/efischer/kill_stuff"
This reverts commit 83f2be4929, reversing
changes made to 01ed17426f.
2017-03-08 13:10:48 -05:00
Eric Fischer
7b85c0ea00 Remove in-course reverification
This is unused, and will no longer be supported on edx.org. Also adds a
DeprecatedModel utility class.

TNL-6126
2017-03-01 10:46:29 -05:00
Hasnain
4454899821 WL-615 | Fix the preview certificate link. 2016-11-10 14:15:03 +00:00
wajeeha-khalid
986dcff626 MA-2536: get 'course_about' url in enrollment 2016-07-29 14:58:54 +05:00
Ned Batchelder
2e1238b83e Remove unused imports 2016-04-08 11:23:05 -04:00
Ehtesham
5ad2eb300c [TNL-4073][TNL-4273] Make sure that domain defined for preview exists in
HOSTNAME_MODULESTORE_DEFAULT_MAPPINGS,
2016-03-23 18:52:32 +05:00
Toby Lawrence
e2cbb547b1 Switch to SharedModuleStoreTestCase in the 'contentstore' app where possible. 2016-02-16 09:39:00 -05:00
Nimisha Asthagiri
d170c92f3b Refactor course_image_url 2015-12-04 11:25:40 -05:00
zubair-arbi
ec28a75f14 In-course reverification access control
* Automatically create user partitions on course publish for each ICRV checkpoint.
* Disable partitions for ICRV checkpoints that have been deleted.
* Skip partitions that have been disabled when checking access.
* Add verification access control UI to visibility settings.
* Add verification access control UI to sequential and vertical settings.
* Add partition scheme for verification partition groups.
* Cache information used by verification partition scheme and invalidate the cache on update.
* Add location parameter to UserPartition so the partition scheme can find the associated checkpoint.
* Refactor GroupConfiguration to allow multiple user partitions.
* Add special messaging to ICRV for students in the honor track.

Authors: Zubair Arbi, Awais Qureshi, Aamir Khan, Will Daly
2015-08-20 08:43:55 -07:00