Commit Graph

92 Commits

Author SHA1 Message Date
usamasadiq
84bb9faa3f refactor: ran pyupgrade on lms/djangoapps/certificates 2021-02-25 19:58:39 +05:00
Christie Rice
7db147e06a Fix lint-amnesty warnings (#26412) 2021-02-09 10:20:46 -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
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
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
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
Nimisha Asthagiri
aee2d36580 Remove microsites from certificates
DEPR-26
2019-05-29 03:15:53 -04: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
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
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
ayub-khan
1b774d15aa -Allow staff to preview certificates before course end 2017-12-05 13:57:46 +05:00
Nimisha Asthagiri
38cfadeb20 Schedules: convert course language to supported released language 2017-11-29 20:08:33 -05:00
Ahsan Ulhaq
da675e52dc Learner certificates should not be findable before the available date
LEARNER-3298
2017-11-23 14:14:05 +05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
Anthony Mangano
7e52af97b5 Render certificate templates in the correct language
LEARNER-2921
2017-11-07 14:49:44 -05:00
McKenzie Welter
39bf59e6d3 Flag for Hours of Effort in course certificates
Retrieve different data fields from Discovery
2017-10-17 17:07:54 -04:00
Michael LoTurco
96dbd26f83 Added edx-themed certificate template partials for learner-1996 2017-10-13 11:02:20 -04:00
McKenzie Welter
1fe76d7c01 calculated hours of effort for rendering cert template context 2017-09-29 14:26:16 -04:00
McKenzie Welter
f846442233 language --> content_language and get_fields() actually returns 2017-09-21 13:25:40 -04:00
Alex Dusenbery
ab71318104 EDUCATOR-1316 | Refactor courseware.views.views._get_cert_data and related functions. 2017-09-19 11:11:37 -04:00
McKenzie Welter
531a51f75c Added util method to retrieve individual course_run data from Catalog 2017-09-15 15:03:20 -04:00
Alex Dusenbery
d6604ebb02 EDUCATOR-1354 | Get cert display date a little more safely; include course when updating cert webview context. 2017-09-13 16:48:34 -04:00
Sanford Student
4f977fb228 common function for cert display date 2017-09-08 10:05:30 -04:00
Gregory Martin
4d59eff8f6 Update cert display date
EDUCATOR-1266
2017-09-06 15:17:27 -04:00
Sofiya Semenova
c7fc1929f2 ED-801 Certificate issued date should display the certificate availability date for instructor paced coursest 2017-08-23 17:07:43 -04:00
pepeportela
2bea8be06e Added spaces between arguments 2017-08-07 16:57:17 +02:00
pepeportela
e4003559de Add i18n month with strftime_localized in certificate views 2017-08-07 11:09:02 +02:00
Michael Youngstrom
ca1ca99abf Revert "Add i18n to date in certificate web" 2017-08-04 13:55:17 -04:00