Commit Graph

117 Commits

Author SHA1 Message Date
Jawayria
df06d1312d refactor: Removed unused imports
Removed unused imports from openedx/core/djangoapps/{content_libraries, coursegraph,courseware_api, crawlers, credentials, credit}
2021-04-06 17:07:13 +05:00
Thomas Tracy
9f4e51a241 feat: Add command to generate credentials config (#27088)
Adds a command to create an API connection to credentials for testing
program certificates on devstack. This command is not meant to be ran
manually, and will be included in a provisioning type script that will
be added later.
2021-03-29 10:04:59 -04:00
Usama Sadiq
7108562c87 refactor: ran pyupgrade on openedx/core/djangoapps/credentials (#26847) 2021-03-15 18:09:56 +05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Matt Tuchfarber
5345466e31 Merge pull request #26622 from edx/tuchfarber/remove_pii_from_mgmt_cmd_cfg
Update mgmt cmds to use user_ids instead of PII
2021-02-22 11:04:49 -05:00
Matt Tuchfarber
55d9e18495 Update mgmt cmds to use user_ids instead of PII 2021-02-22 10:30:35 -05:00
Aarif
ba16e05899 replaced unittest assertions pytest assertions (#26564) 2021-02-19 16:04:32 +05:00
Olivia Ruiz-Knott
5c95258115 Merge pull request #26461 from edx/ork/MICROBA-989_notify-credentials-takes-usernames
feat: allow notify_credentials to take a list of usernames
2021-02-12 10:45:15 -05:00
oliviaruizknott
52814f7378 test: add test to notify_credentials for multiple usernames 2021-02-10 11:25:23 -05:00
oliviaruizknott
0533ecc814 feat: allow notify_credentials to take a list of usernames 2021-02-09 17:04:21 -05:00
Matt Tuchfarber
64032faae7 Make credentials celery tasks errors consistent
In order to better alert off of tasks that failed after maximum retries,
this makes the the error for each task consistent with itself.
2021-02-08 13:55:35 -05:00
Soban Javed
5199bf7acb Replace task decorator with shared_task in openedx 2021-02-04 18:35:38 +05:00
M. Zulqarnain
355423d322 pylint amnesty in openedx (#26364) 2021-02-04 15:34:01 +05:00
Robert Raposa
874c3e7b61 Merge pull request #25182 from regisb/regisb/disable-learner-records-from-settings
Add default value for learner records feature toggle in settings
2020-12-17 12:16:40 -05:00
Régis Behmo
bd038bab3c Add default value for learner records feature toggle in settings
The learner records feature had to be enabled/disabled via site-specific
configuration models, which is inconvenient for platforms that want to
disable this feature globally. Here, we introduce a
ENABLE_LEARNER_RECORDS feature toggle in the lms/cms settings that makes
it possible to disable this feature on all sites. Because this feature
toggle is set to True by default, this will not modify the behaviour of
existing platforms.
2020-12-17 16:28:04 +01:00
Muhammad Soban Javed
bd601cf3a6 Update celery routing for celery 4+ (#25567)
* Update celery routing

- Used routing function instead of class
- Move task queues dictionary to Django settings
- Removed routing_key parameter
- Refactored routing for singleton celery instantiation

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2020-12-16 13:40:47 +05:00
Robert Raposa
8eef18710d set code_owner for celery tasks
ARCHBOM-1260

Co-authored-by: Tim McCormack <tmccormack@edx.org>
2020-11-17 15:33:33 -05:00
Albert (AJ) St. Aubin
9551b23d08 [MICROBA-721] Updates the notify_credentials job to run over new window 2020-11-12 08:27:03 -05:00
Awais Qureshi
7201edb11d Revert "Update routing config" (#25536)" (#25549)" (#25553)" (#25561)
This reverts commit db4c3b1210.
2020-11-11 00:13:47 +05:00
Awais Qureshi
db4c3b1210 Revert "Revert ""Update routing config" (#25536)" (#25549)" (#25553)
This reverts commit c1fe3c3a93.
2020-11-10 23:23:09 +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
Muhammad Soban Javed
c1fe3c3a93 Revert ""Update routing config" (#25536)" (#25549)
This reverts commit 39a22734c1.
2020-11-09 23:43:47 +05:00
Awais Qureshi
39a22734c1 "Update routing config" (#25536)
* Revert "Revert "Update routing config"

* Removed settings from lms/celery.py and cms/celery.py

* Moved settings import from top-level to function's scopes

Co-authored-by: Soban Javed <iamsobanjaved@gmail.com>
2020-11-09 19:06:55 +05:00
Muhammad Soban Javed
5a2ea1f954 Revert "Update routing config" 2020-11-06 02:05:48 +05:00
Soban Javed
3206d9cb9a Update celery routing
- Used routing function istead of class
- Move task queues to Djano settings
- Removed routing_key parameter
2020-11-02 15:03:53 +05:00
Albert (AJ) St. Aubin
72aa58406b [MICROBA-676] Changes to the notify_credentials task to filter on username 2020-10-29 15:11:09 -04:00
Albert (AJ) St. Aubin
69a63380c2 Adding in a call to send Program award events to Credentials in
management command
2020-10-28 19:41:32 -04:00
Calen Pennington
2714da86a4 Always import task packages by absolute paths
This follows the recommendation in the Celery documentation so as to
not confuse automatic task name generation.

Docs: https://docs.celeryproject.org/en/stable/userguide/tasks.html#automatic-naming-and-relative-imports
2020-10-08 14:10:17 -04:00
Florian Haas
125b502c79 Fix documentation for ENABLE_LEARNER_RECORDS
Commit 3222d3fd13 (LEARNER-5987)
introduced the ENABLE_LEARNER_RECORDS site configuration flag, but
incorrectly referred to it as ENABLE_CREDENTIALS_RECORDS in the
documentation for the credentials service.

Fix the reference with the correct flag name.
2020-09-11 14:12:18 +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
Adeel Khan
ebc2948f81 Fix key error.
Job is failing because of unhandled
case where the mode, status key is
not found in course_cert_info.

PROD-1363
2020-06-08 15:53:03 +05:00
Matt Hughes
bd6dd986be Revert "Optimizing notify_credentials management command"
This reverts commit 3e987cfe76.
2020-05-26 13:23:07 -04:00
Adeel Khan
3e987cfe76 Optimizing notify_credentials management command
** This removes some of the extra
   celery calls to credential service for
   updating grade when a certificate is updated.

** This removes extra db calls
   by reusing existing queryset values.

PROD-1363
2020-05-19 16:43:38 +05:00
Troy Sankey
d428f7530d Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""
This reverts commit e6f58b6d4c.

This is our third (3rd!) attempt to deploy stage 2 of this column rename.
2020-03-04 14:53:47 -05:00
Troy Sankey
e6f58b6d4c Revert "Rename values in SiteConfiguration (2/3) attempt #2" 2020-02-27 13:24:55 -05:00
Troy Sankey
c422dec083 Revert "Revert "Rename values in SiteConfiguration (2/3)""
This reverts commit b85aa4b3fb.
2020-02-26 12:54:24 -05:00
Troy Sankey
b85aa4b3fb Revert "Rename values in SiteConfiguration (2/3)" 2020-02-26 11:23:56 -05:00
Troy Sankey
1307946d05 Merge pull request #22851 from edx/juliasq/rename_site_configuration_siteconfiguration_values_2
Rename values in SiteConfiguration (2/3)
2020-02-26 10:26:22 -05:00
Julia Eskew
3541643dd5 Rename values in SiteConfiguration (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-02-25 13:54:02 -05:00
Diana Huang
0b9f7298c6 Replace DOP library factories with the DOT equivalent.
https://openedx.atlassian.net/browse/BOM-1312
2020-02-24 16:33:56 -05:00
Troy Sankey
18deacde54 Revert "Revert "This stage does the following: (#22692)""
This reverts commit 84de6bc6de
which reverts commit cebeab4348
which implements the first stage of the `values` column rename in
SiteConfiguration.  However, I included a small change:

This time, we set a default value on the new `site_values` column so
that the ORM will happily deserialize the JSONField without throwing a
JSONDecodeError.
2020-02-19 12:01:57 -05:00
Adeel Khan
10ce3cbeb3 Limiting dataset for notify_credentials job
notify_credentials job when executed without
any restriction consumes a lot of memory
because of huge dataset that  makes
it unsuable to be executed periodically.
This patch would time bound it to only work
on last day dataset.

PROD-1190
2020-01-28 14:00:35 +05:00
Julia Eskew
84de6bc6de Revert "This stage does the following: (#22692)"
This reverts commit cebeab4348.
2020-01-14 13:01:21 -05:00
Julia Eskew
cebeab4348 This stage does the following: (#22692)
- Adds the new field and migration to create the column.
- Makes all writes go to both old and new field.
2020-01-14 10:40:39 -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
adeelehsan
e32e39e099 Fixing notify credentials job
To save the memory get cert and grade object directly from
the db because by doing that we'll override the queryset
evaluation and object won't be cached once it has gone out
of scope.

PROD-987
2019-11-22 18:38:00 +05:00
Manjinder Singh
a384e753fd BOM-933: Fix type mismatches in various migrations (#22112)
* Fix type mismatches in the course_modes migrations

* Fix type mismatches in the course_action_state migrations

* Fix type mismatches in the schedules migrations

* Fix type mismatches in grades migrations

* Fix type mismatches in video_pipeline

* Fix type mismatches in api_admin

* Fix mismatches in credential migrations
2019-10-24 11:42:39 -04:00
Ayub khan
5c47a3b425 BOM Project
Updated __unicode__ to __str__
2019-09-25 18:31:54 +05:00
Ayub
9e3d66f3d4 Merge pull request #21025 from edx/INCR-366
INCR-366 python3 compatibility
2019-07-18 11:17:49 +05:00