Commit Graph

123 Commits

Author SHA1 Message Date
Christie Rice
8198606138 feat: Refactor code to check both regular and allowlist V2 certs (#27156)
MICROBA-1039
2021-03-30 10:23:23 -04:00
Christie Rice
4aff07ad82 MICROBA-923 Add method to generate V2 course certificates (#26898) 2021-03-09 11:02:19 -05:00
Jawayria
2b943d93eb Merge pull request #26537 from edx/jawayria/bom-2352-2
BOM-2352: Removed unused imports from lms/djangoapps/{certificates, c…
2021-03-04 20:40:36 +05:00
usamasadiq
84bb9faa3f refactor: ran pyupgrade on lms/djangoapps/certificates 2021-02-25 19:58:39 +05:00
Christie Rice
57f9005e57 MICROBA-918 Add allowlist check (#26584) 2021-02-24 09:07:04 -05:00
Jawayria
b3b0b083d2 BOM-2352: Removed unused imports from lms/djangoapps/{certificates, commerce, course_api} 2021-02-23 19:38:25 +05:00
Christie Rice
7db147e06a Fix lint-amnesty warnings (#26412) 2021-02-09 10:20:46 -05:00
Christie Rice
997e31b56b MICROBA-918 Check the allowlist when regenerating certificates, and stop incidentally modifying the certificate invalidation list (#26439) 2021-02-09 09:47:33 -05:00
Christie Rice
6e5a9f5f6f MICROBA-918 Move methods to separate certificate generation from celery task to schedule certificate generation. Also standardizes imports. (#26410) 2021-02-08 10:01:04 -05:00
Jawayria
f5f037b62f Resolved errors 2021-02-02 20:30:46 +05:00
Jawayria
1d1dc07310 Resolved quality failures 2021-02-02 19:24:08 +05:00
Jawayria
92a13c55c3 Applied pylint-amnesty to certificates 2021-02-02 19:23:48 +05:00
Matt Tuchfarber
606311bd69 Merge pull request #25777 from open-craft/shimulch/bb-3306
[BB-3306] Customizable Certificate Date Format
2021-01-27 16:01:29 -05:00
Christie Rice
b1e5695acf MICROBA-921 Move emit_certificate_event() to utils (#26133) 2021-01-26 14:41:34 -05:00
Christie Rice
32e0eb2edc MICROBA-921 Standardize imports within the certificates app for consistency (#26131) 2021-01-25 15:29:42 -05:00
Christie Rice
8888f27d29 MICROBA-921 Fix typos (#26132)
* MICROBA-921 fix typos

* Fix quality
2021-01-25 15:05:22 -05:00
Shimul Chowdhury
421e661a5f Added new setting CERTIFICATE_DATE_FORMAT for easy customization of
certificate issued date
2020-12-10 21:46:20 +06:00
Kyle McCormick
4dda73d797 [BD-14] Migrate all environments to use database-backed organizations (#25153)
* Install `organizations` app into LMS and Studio non-optionally.
* Add toggle `ORGANIZATIONS_AUTOCREATE` to Studio.
* Remove the `FEATURES["ORGANIZATIONS_APP"]` toggle.
* Use the new `organizations.api.ensure_organization` function to
  either validate or get-or-create organizations, depending
  on the value of `ORGANIZATIONS_AUTOCREATE`,
  when creating course runs and V2 content libraries.
  We'll soon use it for V1 content libraries as well.
* Remove the `util.organizations_helpers` wrapper layer
  that had to exist because `organizations` was an optional app.
* Add `.get_library_keys()` method to the Split modulestore.
* Add Studio management command for backfilling organizations tables
  (`backfill_orgs_and_org_courses`).

For full details, see
https://github.com/edx/edx-organizations/blob/master/docs/decisions/0001-phase-in-db-backed-organizations-to-all.rst

TNL-7646
2020-12-02 13:58:40 -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
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Dillon Dumesnil
084ab4c10d AA-385: Add in LinkedIn Add to Profile to courseware meta API
A major update to this function allows it to actually autofill the
certificate information again! I believe LinkedIn changed their API
and we never updated our end. This fixes that!
2020-10-16 10:07:38 -04:00
uzairr
fb9ba90efe PROD-1236: Do not expose user id with certificate URL. 2020-07-17 22:59:34 +05:00
stvn
0ae91c0921 Replace references to 'log.warn' with 'log.warning'
to remove some `DeprecationWarning`s from the logs
as the former method as been deprecated since Python 3.3 [1][2].

- [1] https://github.com/python/cpython/blob/3.3/Lib/logging/__init__.py#L1252-L1253
- [2] https://stackoverflow.com/a/15655674
2020-06-18 12:08:15 -07:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +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
David Moreno
c519196022 @require_certificate_permission parameters added 2019-12-13 15:55:59 -05:00
David Moreno
5c2818d309 Convert @require_certificate_permission to use user.has_perm 2019-11-20 17:08:05 -05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
uzairr
1f531571ff edX logo is not loading on invalid cert view
edX logo image is not loading on invalid certificate view because
context is not been updated with the logo image for invalid cert view.
To overcome it, context is updated before rendering invalid cert.

PROD-611
2019-08-28 14:37:36 +05:00
Matthew Piatetsky
17ef02e34f add preview_certificates permission 2019-07-31 13:39:16 -04:00
edx-pipeline-bot
de5d25eccc Merge pull request #20794 from edx/private_to_public_55dd3e1
Mergeback PR from private to public.
2019-06-11 19:17:13 +05:00
Nimisha Asthagiri
aee2d36580 Remove microsites from certificates
DEPR-26
2019-05-29 03:15:53 -04:00
noraiz-anwar
34cf433588 rate limit requests for password reset emails 2019-05-23 13:29:36 +05:00
Stu Young
c33bd1c643 INCR-262 Run python-modernize on lms/djangoapps/certificates/migrations and lms/djangoapps/certificates/views (#20558)
* run python modernize

* run isort

* Fix quality
2019-05-21 11:32:51 -04:00
adeelehsan
b4f1a774c2 Removing logs
Removing all the logs added for
the investigation of learner-6943
2019-03-14 15:23:10 +05:00
adeelehsan
fd062a9c12 Added logs
adding logs to investigate cache.

learner-6943
2019-02-27 17:31:40 +05:00
Waheed Ahmed
e3fb888268 Disable PDF certificate generation/regenration.
Since PDF generation is discontinued long time ago, disable PDF certificate
generation/regenration from support tool and on all other places.

LEARNER-5562
2019-02-22 15:22:36 +05:00
Calen Pennington
78c8950ea3 Clean up a few remaining unicode format string errors 2019-02-20 15:28:14 -05:00
adeelehsan
f265d58cb1 Merge branch 'master' into aehsan/LEARNER-6943/adding_logs_to_check_discovery_response 2019-02-20 12:37:15 +05:00
adeelehsan
86ae3a9f20 Adding logs
adding logs to check response
returned by discovery

LEARNER-6943
2019-02-19 22:50:34 +05:00
adeelehsan
212d7efa72 Get User language
if template language is None
then use user language instead
of getting from setings which is
always english

LEARNER-6943
2019-02-19 22:39:56 +05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
adeelehsan
88ef4de655 Adding log for investigation
Logs added while fetching the
certificate template to investigate
LEARNER-6943s
2019-02-01 11:46:50 +05:00
Diana Huang
6572d99e76 Remove all references to datadog from our code. 2019-01-08 15:41:24 -05:00
rabiaiftikhar
e9b2b7f8a7 Clean XSS in Certificates Support URL 2018-12-31 12:16:34 +05:00
Jeremy Bowman
1a5bf35357 TE-2689 Remove useless pylint suppressions part 2 2018-08-14 17:39:02 -04:00
Eric Fischer
e18448e27d Silence deprecation warnings
https://docs.djangoproject.com/en/1.11/releases/1.10/#using-user-is-authenticated-and-user-is-anonymous-as-methods
2018-05-02 10:03:50 -04:00
Adeel Khan
d9d4ae5535 Fix invalid certificate page for a11y and translation.
Invalid certificate page has hardcoded lang='en' for
html, that would cause a11y issue for other languages user.
Some of screen reader text is not under translation. This patch
would fix both issues.

LEARNER-3110
2018-01-25 14:02:12 +05:00
Nimisha Asthagiri
2e9efe6472 Fix Certificates import and signals code 2018-01-19 15:12:28 -05:00