Commit Graph

100 Commits

Author SHA1 Message Date
Christie Rice
8f50edea6f feat: Implement generation of regular V2 course certificates (#27189)
MICROBA-1039
2021-03-31 14:12:19 -04:00
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
Justin Hynes
32685a7999 MICROBA-1025 | Update cert_whitelist.py management command
[MICROBA-1025]
- Update management command to use the same logic that the Instructor Dashboard uses
- Fix bug in management command where processing stopped when encountering a user that did not exist
- Add more logging
- Add and update tests where needed
2021-03-09 14:45:44 -05:00
Justin Hynes
05c82810e0 MB-1023 | Fix defect when removing allowlist entry on instructor dashboard
[MB-1023]
- Fix issue from recent refactor. Verify certificate is not none before attempting to invalidate the certificate.
- Add more logging
2021-03-03 13:14:01 -05:00
Justin Hynes
07837cf54e MICROBA-1024 | Move the allowlist and blocklist checks to certificates app
[MICROBA-1024]
- Move some of the recently added logic from the instructor app to the certificates app
- Attempt to not use other certificate models directly in the code I am touching, moving this logic to certificates as well.
2021-03-02 14:58:20 -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
Matt Tuchfarber
55d9e18495 Update mgmt cmds to use user_ids instead of PII 2021-02-22 10:30:35 -05:00
Christie Rice
6b0bc6389a MICROBA-918 Update allowlist check to handle more signals (#26606) 2021-02-18 10:48:53 -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
0533ecc814 feat: allow notify_credentials to take a list of usernames 2021-02-09 17:04:21 -05:00
Christie Rice
7db147e06a Fix lint-amnesty warnings (#26412) 2021-02-09 10:20:46 -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
92a13c55c3 Applied pylint-amnesty to certificates 2021-02-02 19:23:48 +05:00
Christie Rice
3638005326 MICROBA-921 Add certificate allowlist (#26129) 2021-01-29 10:22:07 -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
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
Justin Hynes
dcfa7ea72c MB-714 | Fix log message when generating certificates
[MB-714]
- While investigating a certificate generation issue I happened to notice a log statement whose arguments were backwards
2020-11-17 14:15:12 -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
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
Dillon Dumesnil
a96079f2d1 AA-196: Course Celebration for passing Verified Learners 2020-10-01 16:53:25 -04:00
uzairr
fb9ba90efe PROD-1236: Do not expose user id with certificate URL. 2020-07-17 22:59:34 +05:00
Kyle McCormick
ec9ac34886 Paginate course card API for Programs Learner Portal
* Pull business logic of ProgramCourseEnrollmentOverviewView
  out of view class and into utils.py.
* Add UserProgramCourseEnrollmentsView, which is a paginated
  version of ProgramCourseEnrollmentOverviewView with a
  URL that is parameterized on the user (to enable masquerading
  in MST-109).
* Add get_certificates_for_user_by_course_keys to certs API
  to make enrollments overviews REST API use fewer SQL queries.
* Document new course cards API with edx-api-doc-tools.

In a follow-up ticket, the Programs Learner Portal will switch
to the new paginatd API in order to speed up its page load.

MST-126
2020-05-04 09:26:23 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Alan Zarembok
70955119f1 PROD-1236: Change URL returned for generated certificates to use UUID, for consistency across api calls. 2020-02-07 10:19:55 -05:00
Waheed Ahmed
442da4a7fe Don't show certificate on profile if no active config.
Stop showing certificate information on profile page if there is no
active certificate configuration.

PROD-1200
2020-01-28 22:30:16 +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
Jeremy Bowman
553d35e53e Upgrade mock BOM-596 (#21717) 2019-09-24 10:14:17 -04:00
uzairr
38cd616f06 Beta tester doesn't allow to earn cert
If beta tester wants to earn a cert then they must
create a separate user account by using email and
username different from the account with beta tester
role.

PROD-491
2019-08-21 16:24:00 +05:00
usama sadiq
26d493e34d Certificate Generation Logs
Added additional logs in the certificate generation
task being executed after id verification of a learner.
2019-07-11 10:51:39 +05:00
adeelehsan
1b227232c5 Python3 update
INCR-471
2019-06-25 15:47:00 +05:00
Nimisha Asthagiri
eb0791ec89 Inter-app API cleanup for Grades 2019-05-04 11:35:06 -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
Douglas Hall
092d1bdf01 Check GeneratedCertificate.download_url before using HTML cert URL. 2019-03-11 14:18:16 -04:00
Douglas Hall
8373298149 Add list endpoint to course certificate API. 2019-03-01 14:48:00 -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
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
Giovanni Cimolin da Silva
8563cf437a Fix certificate api when retrieving certificates from deleted courses
This commit fixes a problem with the Certificates API that make it fail when trying to retrieve user certificates from courses that don't exist anymore.
The problem lies in the Certificate API not checking if the courses being retrieved by some user actually exist, to fix this, this commit improves the fault tolerance of the Certificates API.

This issue was found when investigating why a user profile page (/u/username) was returning 404's.
Turns out that LearnerAchievementsFragmentView used the certificates api to retrieve certificate information, which did not check if the course exists before trying to pull information from it, resulting in a cascade of errors that lead to a 404 on the user's profile page.

Signed-off-by: Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
2019-01-11 11:40:00 -02:00
Waheed Ahmed
c2ad6f4002 Revert "Fix PDF cert gereration/regeneration and URLs." 2018-07-26 18:20:27 +05:00
Waheed Ahmed
23d1beedf7 Merge pull request #18285 from edx/waheed/LEARNER-4520-fix-pdf-certificates
Fix PDF cert gereration/regeneration and URLs.
2018-06-06 15:36:52 +05:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Waheed Ahmed
baf3e594be Fix PDF cert gereration/regeneration and URLs.
Since cert_html_view_enabled is deprecated and set default true,
PDF certificates are not appearing for learners and staff also
unable to regenerate them.

LEARNER-4520
2018-05-31 15:45:31 +05:00
Ahsan Ulhaq
7428b2fe94 Discovery for pdf cert generation
LEARNER-4520
2018-03-27 15:23:46 +05:00
Jeremy Bowman
bf86b3da98 PLAT-1942 Handle xmodule_django field deprecations 2018-02-05 15:05:54 -05:00
Nimisha Asthagiri
2e9efe6472 Fix Certificates import and signals code 2018-01-19 15:12:28 -05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00