Commit Graph

4667 Commits

Author SHA1 Message Date
Julia Eskew
a9b534e10b fix: Use a "through" model for the ManyToManyField fields in CourseSection
and CourseSectionSequence to ensure that cascading deletes will occur to delete
the relation upon deletion of a foreign-keyed object.

This commit is phase 1 of 3 in order to ensure a smooth deploy. The phases:
1) Add separate through models for user partition groups, add fields to point to the
   separate models, and start writing to those fields as well.
2) After all models have been re-generated, switch code over to use separate through
   model fields backed by the separate through models.
3) After phase 2 is deployed smoothly, remove the original ManyToManyField fields
   and rename the new fields to have the same name as the old fields.
2021-06-24 12:17:54 -04:00
Kshitij Sobti
2e416234bc docs: ADR for new course apps API [BD-38] [TNL-8002] [BB-3964] (#27193)
* docs: ADR for new course apps API

This ADR proposes a new course apps API that is driven by a new coruse app
plugin type.

* Updated based on feedback

* Major changes to document structure

* Review feedback
2021-06-24 11:25:14 +05: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
Kristin Aoki
456d6c502c fix: Update course preview redirect
This PR changes the preview URL redirect from Studio. Before when a user clicked on the course preview button to check unpublished changes, the preview in the New Experience would show the most recently published version of the course. The unpublished changes that the user was hoping to view are no present. At the moment users have been publishing the content to check it then having to republish the old version if they did not like the changes. As a short-term fix, this PR redirects to the Legacy experience where the preview option previously worked. Now the user can see the unpublished changes. A long-term fix is still being explored. This change will impact the Course Author.
2021-06-21 13:36:21 -04:00
Manjinder Singh
5838f191c2 docs: Adding readme for auth_exchange app (#27803)
* docs: Adding readme for auth_exchange app
2021-06-21 12:00:41 -04:00
David Ormsbee
fe6448303d fix: Use learning_sequences to remove bad sequences from outline.
A common usage pattern is to make an exam that is restricted to a
particular enrollment track. Since there is no UI in Studio to do this
at the sequence/subsection level, course authors instead restrict every
unit in the sequence to that track (e.g. "verified"). The legacy
courseware experience could handle this, but the Course Blocks API does
not. It is likely that we'll want to permit toggling this at the
sequence level, but regardless of whether we do that going forward, we
still have to deal with this kind of content data in existing courses.

An entirely empty sequence is useless, and currently breaks the
Courseware MFE browsing experience. This commit introduces the first
part of that fix, invoking the new Learning Sequences API to remove
sequences that the user shouldn't be allowed to know about. The plan is
to switch over the entire course outline from the Course Blocks API to
the Learning Sequences API, and this is the first small step in that
direction.

This also creates CourseWaffleFlag learning_sequences.use_for_outlines
to control the gradual rollout of this feature. This will start as a
very limited rollout to address courses that show this specific bug
(TNL-8377).

New learning_sequences public API call: public_api_available
2021-06-17 11:13:47 -04:00
Christie Rice
6d703a086e fix: Add missing init files to trigger linting and address quality errors (#27972) 2021-06-16 13:44:20 -04:00
Christie Rice
09d58a4eb8 test: Update course certificate tests before enabling v2 of course certificates globally (#27954)
MICROBA-1082
2021-06-15 10:27:44 -04:00
Mubbshar Anwar
51f1c4cc71 Merge pull request #27932 from edx/mubbshar/VAN-532
fix:Login failed email_or_username
2021-06-15 17:38:21 +05:00
Muhammad Ammar
7d0bf2b3e7 fix: add is_staff permission on endpoint (#27947) 2021-06-14 15:15:34 -04:00
Christie Rice
417b2cc959 fix: Handle missing course overviews (#27849)
MICROBA-1082
2021-06-14 12:57:45 -04:00
Christie Rice
94a1940115 fix: Add missing PII annotation and fix amnesty warnings (#27917) 2021-06-14 09:57:08 -04:00
mubbsharanwar
7b299977b7 fix:Login failed email_or_username
Fix email_or_username null in login failed case.

Fixes: VAN-532
2021-06-14 10:38:40 +05:00
Tim McCormack
c0bed87954 Revert "ENT-4361 | Added user's "id" and "email" as public fields in ACCOUNT_VISIBILITY_CONFIGURATION." (#27942) 2021-06-11 22:53:41 +00:00
Simon Chen
16cffd206f Revert "[FEAT]: Add mem caching to the API to create and retrieve IntegritySignature" (#27936)
This reverts commit c6192b8b40656c44ba0a89cdd569fb0c0e4f87c4.
The caching does little to save performance and in the case of whole
course interation, it has a netgative performance impact.
2021-06-11 13:59:20 -04:00
Usama Sadiq
2e33565320 fix: fixed the pylint violations causing quality failures (#27934) 2021-06-11 19:49:17 +05:00
Ihor Romaniuk
06c542dfa0 [BD-26] feat: add temporary waffle flag for enabling disabling proctored exams (#27810)
* feat: [BD-26] add the is_proctored value to SequenceMetadata API

* feat: add temporary flag for enabling/disabling proctored exams

* fix: change creation date

* fix: fix text indents

* fix: [BD-26] Remove redundant duplicated test.

Co-authored-by: Sagirov Eugeniy <sagirov19@gmail.com>
Co-authored-by: Igor Degtiarov <igor.degtiarov@raccoongang.com>
2021-06-11 10:04:11 -04:00
Mehak Nasir
baa9fd8831 Merge pull request #27860 from edx/TNL-7832
feat: documentation links added in discussion api
2021-06-11 14:57:42 +05:00
Simon Chen
6d380fc5a2 [FEAT]: Add mem caching to the API to create and retrieve IntegritySignature (#27922)
With this change, whenever a IntegritySignature is created or retrieved, the result will be cached into mem cache for future use. This will save round trip to database significantly for honor code check
2021-06-10 14:45:06 -04:00
Mehak Nasir
222d898e39 refactor: renaming external keys and improved code review fixes 2021-06-10 21:51:08 +05:00
Julia Eskew
14ec30e018 feat: Make the new courseware MFE the default courseware experience.
- Remove the REDIRECT_TO_COURSEWARE_MICROFRONTEND waffle flag.
- Add a new COURSEWARE_USE_LEGACY_FRONTEND waffle flag that directs
all learners to the legacy courseware experience.
- Skip two failing a11y tests which fail due to the new default of
the courseware MFE.

TNL-8279
2021-06-10 12:21:24 -04:00
Adeel Ehsan
335a0f28de Merge pull request #27661 from edx/aehsan/VAN-434/account_activation_dialogue_box_added
Account activation popup added
2021-06-10 15:20:15 +05:00
adeelehsan
78f1f1916c Account activation popup added
VAN-434
2021-06-10 14:46:49 +05:00
Mehak Nasir
b6f96f25b9 fix: removed google drive link from codebase 2021-06-10 14:17:35 +05:00
Mehak Nasir
d4431455a1 refactor: updated provider map structure and test cases 2021-06-10 12:01:51 +05:00
Bianca Severino
c3c31af329 Merge pull request #27898 from edx/bseverino/integrity-signature-flag-fix
fix: convert integrity signature waffle flag to CourseWaffleFlag
2021-06-09 14:01:54 -04:00
Bianca Severino
58d5b29f19 fix: convert integrity signature waffle flag to CourseWaffleFlag 2021-06-09 13:19:17 -04:00
Matt Hughes
8023a09191 fix: deleted courses do not break program details page
Sometimes learners have certificates in old course runs which've been
deleted. When this happens loading the learner's program progress can
result in 500 errors. This corrects those by choosing to count any
non-existent course the learner has certificates for as counting
towards program completion, effectively assuming that availability
dates have passed for all such courses.

Also fixes an error with a condition related to how we determine
whether an enrolled course is considered "in progress". The previous
version of the code had a bug that would result in a lot more courses
being marked "in progress" for the purpose of program completion than
actually were.

JIRA:EDUCATOR-5787
2021-06-09 10:58:00 -04:00
Kyle McCormick
de8859584f Merge pull request #27874 from edx/kdmccormick/xmodule-no-cms
refactor: make xmodule & openedx independent of code in cms

The xmodule and openedx packages both contain code that is common
between LMS and CMS. The cms package is, of course,
contains CMS-specific code.

So, one prerequisite to extracting CMS into an independent service
will be making sure that lms, common, openedx, and the projects in
common/lib (xmodule, capa, etc.) are not coupled to any CMS-specific
features. This PR moves us towards that reality by making sure
that those packages are independent from cms from a Python-import
perspective, at least.
2021-06-09 09:15:31 -04:00
alangsto
8c205e5c0e fix: add created and modified fields to integrity signature admin (#27882)
MST-861. The Django admin page for IntegritySignature only displays
the user and course_key for a signature. This adds the created and modified
fields, and will order signatures by the modified field.
2021-06-08 12:15:37 -04:00
Simon Chen
a284b9704c [Fix]: CR-3731 correct the spelling of the error message on password reset (#27883) 2021-06-08 11:33:37 -04:00
Kyle McCormick
709db42835 refactor: de-index courses in contentstore, not course_overviews
This is a minor refactoring in order to remove
a code dependency of ./opendedx on ./cms
2021-06-08 10:46:52 -04:00
Albert (AJ) St. Aubin
c37e88fdbf refactor: Move CertificateStatuses to data.py file per OEP-49
[MICROBA-678]

To allow access to CertificateStatuses constants in other Django apps we are moving the
CertificateStatuses enum to data.py per OEP-49.
2021-06-08 08:56:21 -04:00
Kyle McCormick
4d914e0415 Merge pull request #27871 from edx/kdmccormick/import-as-xmodule
refactor: normalize xmodule imports
2021-06-08 08:45:42 -04:00
Kyle McCormick
d42b0c401d refactor: normalize xmodule imports
Code in ./common/lib/xmodule/xmodule should
be imported as `from xmodule`, since `xmodule`
is a locally-installed package.

This is weird, but as long as it is the case,
we should be consistent.

(In BOM-2584, I propose moving the files to
 ./xmodule, which would quell this confusion.)
2021-06-07 16:36:38 -04:00
Simon Chen
3f589ab2c7 [Chore]: Add the readme file documenting the Agreements app (#27869)
This is a simple housekeeping action to help other edx-platform development to understand the current state of Agreements app
2021-06-07 15:22:04 -04:00
Aarif
58a54f8d0b BOM-2543: Remove the diff-quality step from quality checks (#27619)
* build: Removed the diff-quality step
Applied lint-amnesty on all the warnings
Removed pylint thresholds comparison code and related tests

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-06-07 18:37:06 +05:00
Mehak Nasir
b9fc89a328 feat: documentation links added in discussion model 2021-06-07 13:57:01 +05:00
David Ormsbee
92de07a7f9 fix: Convert block_structure.data to relative paths (TNL-8335)
In order to upgrade to Django > 2.2.20, we can't continue to use
absolute paths in the block_structure's data FileField. This used to
work for S3, but it will not work going forward due to a security fix
in Django 2.2.21.

This data migration will remove the starting '/' from any paths in the
block_structure table. The resulting locations in S3 should be
unaffected.
2021-06-04 12:01:12 -04:00
Matthew Piatetsky
cea450a35b fix: pass in course key when checking the bucket for the streak discount experiment 2021-06-01 16:32:21 -04:00
Matthew Piatetsky
f89ae754e4 Revert "feat: add debugging logs to help figure out why experiment isn't activating in production" 2021-06-01 15:10:14 -04:00
Matthew Piatetsky
9a76223047 Merge pull request #27772 from edx/debugging_logs
feat: add debugging logs to help figure out why experiment isn't activating in production
2021-06-01 10:02:09 -04:00
Matthew Piatetsky
98eb516745 feat: add debugging logs to help figure out why experiment isn't activating in production 2021-06-01 09:10:40 -04:00
Raul Gallegos
24f9568c4e fix: no library context when not found (#27493)
FAL-1848 (OpenCraft)
2021-05-28 13:01:35 -04:00
Régis Behmo
a131d63608 feat: run mypy as part of testing the codebase
The edx-platform codebase already includes quite a few type annotations, but
they were not regularly checked. This may cause problems, when the annotations
themselves include errors (as we found out in some of the learning_sequences
annotations). So here, we add mypy as a dev requirement and introduce a make
command to run mypy regularly. Mypy runs on a very small portion of the total
edx-platform, as configured in mypy.ini. Our hope is that developers will add
more and more modules to this configuration file, until we can eventually run
mypy on the full code base.

See discussion: https://discuss.openedx.org/t/dev-notes-running-mypy-on-edx-platform/4860
2021-05-27 13:54:37 -04:00
Matt Tuchfarber
b6fe11ea43 Merge pull request #27737 from edx/tuchfarber/fix_program_explicit_queue
fix: remap explicit queues for program tasks
2021-05-27 11:01:11 -04:00
Matt Tuchfarber
e4d3c1a59b fix: remap explicit queues for program tasks
Program tasks got moved from tasks.v1.tasks.py to just tasks.py, but
the mapping was never updated.
2021-05-27 10:01:02 -04:00
Thomas Tracy
4d8abcac00 MB-1067: [refactor] Change credentials date backfill to single longlived task (#27734)
[refactor] change backfill date task to long running task

Change from a task that spins off multiple other tasks to a single long
running task. This will hopefully be way less heavy when this is ran in
production.
2021-05-26 16:31:22 -04:00
Thomas Tracy
089dbf6e20 [refactor] Move backfill_date_for_all_course_runs to Tasks.py (#27725)
* [refactor] Move backfill_date_for_all_course_runs to Tasks.py

In order for celery to register this task, it needs to be in the right
file. duh!

* fix imports

* fix more imports
2021-05-25 16:53:26 -04:00