Commit Graph

67 Commits

Author SHA1 Message Date
Justin Hynes
346fe90002 chore: remove cert_allowlist_generation management command
[MICROBA-1100]
* Remove `cert_allowlist_generation` management command. This has been replaced by the `cert_generation` management command which can handle generation of allowlist and v2 certificates.
* Remove AllowListGenerationConfiguration configuration model.
2021-04-01 08:53:14 -04:00
Justin Hynes
6b38debfeb feat: Update cert_generation mgmt command with ability to read arguments from config model
[MICROBA-1100]
* Add CertificationGenerationCommandConfiguration model that will store the command arguments for the `cert_generation` mgmt command
* Add ability to add entries to the CertificationGenerationCommandConfiguration through Django admin
* Update mgmt command with ability to read arguments from the config model/database
* Fix failing test in `test_cert_generation.py`
* Add new test for missing `users` argument in `test_cert_generation.py`
2021-04-01 07:39:33 -04:00
Justin Hynes
f00f562deb Merge pull request #26989 from edx/jhynes/microba-1011_allowlist-uniqueness
MICROBA-1011 | Remove duplicate allowlist entries and add constraint preventing future occurrences
2021-03-15 09:15:20 -04:00
Justin Hynes
eed9202485 MICROBA-1011 | Remove duplicate allowlist entries and add constraint to model to prevent future occurrences
[MICROBA-1011]
- Add data migration to remove the duplicate certificate allowlist entries before adding the new constraint to the CertificateWhitelist model.
- Add `unique_together` constraint to the CertificateWhitelist model. A learner should only have a single allowlist entry per course-run.
2021-03-12 14:18:39 -05:00
Usama Sadiq
bd9bb424cd refactor: ran pyupgrade on lms/djangoapps/certificates (#26740) 2021-03-12 14:47:30 +05:00
Jawayria
b3b0b083d2 BOM-2352: Removed unused imports from lms/djangoapps/{certificates, commerce, course_api} 2021-02-23 19:38:25 +05:00
Kyle McCormick
6d78f6aab2 fix: staff debug actions depended on legacy courseware URL (#26658)
The Staff Debug Actions didn't work in the Learning MFE
because the underlying JS depended on the URL being
formatted as /courses/<course_key>/... in order to
parse out the course key. This worked in the legacy
experience, but breaks in the chromeless xblock view,
which is rendered under the URL /xblock/<usage_key>/...

The fix is to explicitly pass the course key into the
templated courseware HTML as a data attribute.

TNL-7955
2021-02-22 15:14:31 -05:00
Matt Tuchfarber
55d9e18495 Update mgmt cmds to use user_ids instead of PII 2021-02-22 10:30:35 -05:00
Matt Tuchfarber
0374c3f62b Update help text 2021-02-16 15:16:52 -05:00
Matt Tuchfarber
d380d85f5c feat: Allow cert allowlist mgmt cmd to use db args
The management command to generate certificates for users on a course's
allowlist (formerly whitelist) now allows for database arguments to
allow it to be called outside of a manual shell.
2021-02-16 14:49:26 -05:00
Olivia Ruiz-Knott
016b1ce3f7 Merge pull request #26227 from edx/ork/MICROBA-905_add-history-to-certificate-invalidation
MICROBA-905 Add django-simple-history  to CertificateInvalidation model
2021-02-04 10:11:05 -05:00
Jawayria
bf1726ece9 Applied pylint-amnesty to branding 2021-02-01 13:05:31 +00:00
oliviaruizknott
8dc86227b9 MICROBA-905 Add django-simple-history to CertificateInvalidation model 2021-01-29 15:10:08 -05:00
Christie Rice
852d61eaff MICROBA-666 Add migration for executive education mode (#25631) 2020-11-18 13:18:27 -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
Robert Raposa
e56eacebd3 ARCHBOM-1105: fix migration issues (#23708)
* fix direct assignment error
* fix byte string error

ARCHBOM-1105

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2020-04-14 10:53:26 -04: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
Troy Sankey
22f8b65228 Add history to GeneratedCertificate
DE-1881
2019-12-17 17:50:25 +05:00
Ayub khan
d081b3a86d BOM-947
certificates: Explicitly Set fields to unicode to avoid migration
2019-10-23 15:15:47 +05:00
Feanil Patel
ac76eda862 Open the image file as binary. 2019-10-21 10:31:50 -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
Dave St.Germain
5b8c5d4500 Master's certs will automatically be generated 2019-04-05 12:02:38 -04:00
Dave St.Germain
66744598df Master's track will result in a verified cert 2019-04-05 12:02:38 -04:00
Tyler Hallada
1540f9ec72 Add on_delete kwarg to ForeignKey & OneToOneFields
Django 2.0 will make this field required for `ForeignKey` and `OneToOneFields`.
In previous versions the option defaulted to `models.CASCADE` when not
specified. This change should make the deprecation warnings in the current
Django version go away.

The migrations where also modified, but the changes should not cause a change in
the database schema since `models.CASCADE` was already the old default.
2018-06-05 17:05:12 -04:00
Troy Sankey
81ed96bc88 bump django to 1.11.11 2018-03-27 15:55:07 -04: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
Michael Terry
57ba9b2ac6 Remove deprecated enabled field
The CertificateGenerationCourseSetting.enabled column is
deprecated. It is no longer referenced anywhere in the code, and
it's time to remove it.

Original code by Michael LoTurco.

LEARNER-2549
2018-01-09 10:04:26 -05:00
Jeremy Bowman
ba06372cac PLAT-1780 Remove dependency on django-extensions 2017-10-27 13:19:12 -04: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
McKenzie Welter
190b2c36fe Changed lookup logic to consider language learner-1995 2017-09-27 07:53:39 -04:00
McKenzie Welter
288ae94857 Added language field to certificate template 2017-09-15 08:51:09 -04:00
Michael LoTurco
2399f0ab16 Added Fields to CertificateGenerationCourseSetting 2017-09-13 12:42:51 -04:00
John Eskew
3614eb2800 Move xmodule_django app to openedx.core.djangoapps 2016-10-06 14:50:40 -04:00
Jonathan Piacenti
112a143589 Refactor badging, move into its own app. 2016-04-01 10:13:08 -05:00
Kevin Falcone
2d9708da03 Remove uses of using() from migrations
This hardcoded the db_alias fetched from schema_editor and forces django
to try and migrate any second database you use, rather than routing to
the default database.  In testing a build from scratch, these do not
appear needed.

Using using() prevents us from using multiple databases behind edxapp.

Additionally - add back a removed backwards migration from certificates
0003.  I have no idea why this was dropped in the 1.8 upgrade.
2016-02-01 16:57:26 -05:00
Saleem Latif
9aa0a01cae Allow PMs to Invalidate Certificates 2016-01-04 14:28:32 +05:00
Zia Fazal
bb1c86baff added a slug field to reference template asset using this field
removed print statement

removed unnecessary status code assertion
2015-12-21 17:48:56 +05:00
Zia Fazal
4f939f79f9 added new endpoint which renders certificate by uuid
fixed broken tests and added some optimisations

fixed migration history
2015-12-08 18:21:04 +05:00
Saleem Latif
1e16e873a4 Add Certificate Regeneration history table. 2015-12-04 10:24:02 +05:00
Ned Batchelder
e7fcc743c0 More-correct data migrations
We need to be sure the migrations will work even in the presence of data
from the future.  get_or_create is a problem, because if the data
already exists, there could be more than one record, even if this
migration only creates one.
2015-11-11 09:03:21 -05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Saleem Latif
99bd47e9a8 Add Cert Exception UI on Instructor Dash 2015-11-03 12:52:22 +05:00
Matt Drayer
31cbef709a mattdrayer/eliminate-base-distinguished: Switch back to honor/verified
* talbs: Remove obsolete stuff
* frrrances: remove base and distinguished sass references and image assets
* mattdrayer: Cleaned up JSON syntax for test setups
2015-10-09 00:29:42 -04:00
Zia Fazal
2467d6971f ziafazal/SOL-1044: Database-Driven Certificate Templates
* added certificate template model
* added certificate template asset model
* added django admin configs and migration
* initial LMS template matching logic
* improved LMS template matching
* improved LMS template matching and rendering logic
* address Django admin form/model load order incongruence
* add missing unique constraint migration.
2015-08-13 08:01:34 -04:00
Matt Drayer
e756685418 mattdrayer/SOL-952: Update default URLs and add backwards migration 2015-06-09 15:11:48 -04:00
David Baumgold
9643aca40e Use dicts when defining JSON 2015-06-09 10:02:58 -04:00
Brian Talbot
33b7fbbbd4 UX-2011: adding print-based styles for Open edX web certs 2015-06-08 20:58:38 -04:00
Xavier Antoviaque
b32629d62f Default to filestorage when S3 isn't configured (aws.py)
Also moves the default icons to the badges subfolder to avoid storage conflicts.
2015-06-08 11:30:16 +02:00
Jonathan Piacenti
81877300cd Implement OpenBadge Generation upon Certificate generation through Badgr API 2015-06-02 18:32:50 +00:00