Commit Graph

362 Commits

Author SHA1 Message Date
Simon Chen
4c5d56ef06 MST-682 Add external_user_key to the student profile CSV (#27091)
* MST-682 Add external_user_key to the student profile CSV
This is a request from some Masters school partners. They would like to download the student enrolled list with the Masters external_user_key data referenced. This way, the schools can properly match the students enrolled in the course with the students enrolled through Masters enrollment system
2021-03-22 14:25:34 -04:00
Justin Hynes
0b22c70248 MICROBA-1011 | Reduce use of Certificates models accessed directly in Instructor Dashboard djangoapp
[MICROBA-1011]
- When creating bulk allowlist entries make the tool use the `is_on_allowlist` certificate API function over accessing the CertificateWhitelist model methods directly
- When creating bulk allowlist entries make the tool use the `create_or_update_allowlist_entry` certificate API function over using CertificateWhitelist model/Django ORM directly
2021-03-15 12:00:56 -04:00
Saad Yousaf
b6b8c3b8d6 [TNL-7970] - Convert anonymized id report code to an instructor task. (#26778)
Co-authored-by: SaadYousaf <saadyousaf@A006-00314.local>
2021-03-11 11:48:35 +05: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
a3a05bc440 MICROBA-1038 | Don't check enrollment status when removing allowlist entries
[MICROBA-1038]
- Today, we check if a learner is actively enrolled in a course-run before we add or remove them from the Instructor Dashboard allow list. We ran into an issue where we couldn't remove an entry from the list because the learner is no longer actively enrolled in the course-run. Update instructor dashboard logic to only check enrollment status when _adding_ a learner to the allow list.
2021-03-04 13:44:45 -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
Sarina Canelake
e15e372233 Merge pull request #26772 from edx/sarina/DEPR-142-TNL-7522
Remove the "role of users being enrolled" field from Instructor Dashboard
2021-03-03 08:57:16 -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
sarina
173bbce500 feat!: Remove the "role of users being enrolled" field from Instructor Dashboard
See DEPR-142
2021-02-28 18:40:16 -05:00
Justin Hynes
0de1d2b89a MICROBA-908 | Prevent overlap of allowlist and blocklist [WIP]
[MICROBA-908]
- When adding a learner to the allowlist we now check if they have an invalidated certificate on the blocklist
- Refactor some pieces of the Certificate Invalidation flow
- Make it so an error message is displayed when trying to add someone to CertificateInvalidation list if they already appear on the Allowlist
- Add support to pass back and display an error message to Instructor Dashboard UI if a learner already appears on the certificate invalidation list when attempting to create certificate exceptions in bulk
- Add python tests for backend changes
- Disable xss linting warnings in certificate_bulk_whitelist.js (checked with security group first)
2021-02-24 09:25:13 -05:00
Matthew Carter
9dc6ab1c7d Merge pull request #20955 from open-craft/samuel/se-1168-ora-summary
SE-1168 [FAL-92] implement ORA process summary report csv
2021-02-23 12:47:19 -05:00
Sarina Canelake
e3b0bffa50 Revert "Remove the "role of users being enrolled" field from Instructor Dashboard" 2021-02-23 09:03:31 -05:00
Samuel Walladge
f43f1635df Add new functionality to generate ora summary report 2021-02-23 11:52:50 +10:30
sarina
406176b9e6 feat!: Remove the "role of users being enrolled" field from Instructor Dashboard
See DEPR-142
2021-02-22 16:18:12 -05:00
M. Zulqarnain
36748ff78f pyupgrade on LMS instructor app (#26533) 2021-02-22 12:58:35 +05:00
Tim McCormack
80a4437f33 fix: Always save generated anonymous user ID in DB; ignore save=False (#26399)
This deprecates `save=False` for several functions and removes all known
usages of the parameter but does not actually remove the parameter.
Instead, it will emit a deprecation warning if the parameter is used.
We can remove the parameter as soon as we feel sure nothing is using it.

Now that we have refactored `anonymous_id_for_user` to always prefer
retrieving an existing ID from the database -- and observed that only a
small fraction of calls pass save=False -- we can stop respecting
save=False. This opens the door for future improvements, such as generating
random IDs or switching to the external user ID system.

Metrics: I observe that 1 in 16 requests for new, non-request-cached
anon user IDs are made with save=False. But 71% of all calls are served
from the request cache, and 99.7% of the misses are served from the DB.
save=False only appear to come from intermittent spikes as reports are
generated and are low in absolute number.

Also document usage/risk/rotation of secret in anonymous user ID
generation as indicated by `docs/decisions/0008-secret-key-usage.rst`
ADR on `SECRET_KEY` usage.

ref: ARCHBOM-1683
2021-02-08 19:16:05 +00:00
Feanil Patel
03d2d983ea Merge pull request #26392 from edx/feanil/rate_limit_anon_csv
Feanil/rate limit anon csv
2021-02-08 12:05:21 -05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
Feanil Patel
0221d6a081 feat: Add ratelimitng to the get_anon_ids api endpoint.
This endpoint can be computationally intensive and so we want to limit
the number of concurrent executions so that it doesn't overload the
server.
2021-02-04 14:03:15 -05:00
Awais Jibran
5a04fb66ff quality fixes 2021-01-06 22:08:50 +05:00
Awais Jibran
159031adc9 quality fixes 2021-01-06 20:23:16 +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
Jeremy Bowman
d19368525b DEPR-43 Remove most of the shoppingcart app (#24692)
Removed most of the deprecated shoppingcart app, leaving just enough to allow us to cleanly remove the related database tables later. Also removed the relevant Django settings that weren't in use elsewhere.
2020-10-14 14:24:52 -04:00
Ali-D-Akbar
a316c6dbf6 remove problem report and data download logs 2020-08-28 12:44:42 +05:00
Ahtisham Shahid
71191dd32b added log to problem report exception handler (#24856) 2020-08-27 18:51:04 +05:00
Ali-D-Akbar
ace525dd0c add logs in get_problem_responses 2020-08-25 17:19:19 +05:00
0x29a
921875b70b Add endpoint and background task for downloading of submission files 2020-08-22 01:38:25 +02:00
Kshitij Sobti
2eff127e8d Add support for generating problem response reports for multiple blocks, or filtered block types.
This change adds support for specifying multiple root blocks while generating
problem response reports. It also allows specifying a block type filter so that
only blocks of the filtered types will be included in the report.

Finally, this change also consistenly uses absolute path for the location in the
report instead of relative paths.
2020-08-18 22:28:05 +05:30
Diana Huang
1655ecd063 Remove final shoppingcart references from instructor. 2020-07-08 09:36:43 -04:00
Feanil Patel
ca85021187 DEPR-43 - Remove shopping cart from instructor analytics. 2020-07-07 16:38:32 -04:00
Nimisha Asthagiri
80ea0a61f0 instructor_task: remove shoppingcart (DEPR-43) 2020-06-29 10:28:26 -04:00
Michael Terry
d4506b73f4 AA-184: Fix extension dashboard for self-paced courses
- Have it load dates from edx-when, not just write to it. This
  fixes self-paced courses where edx-when is only place dates are
  kept.
- Have it read original date for a homework from edx-when when
  resetting a date. This fixes the message it gives the instructor
  about whether it was successfully reset.
- Have it recursively set a date, rather than assuming that dates
  are only ever set on the subsection layer. This fixes setting
  dates on self-paced courses (where dates are set all the way
  down) and just in case somebody somewhere edits the course xml
  to have a date where it's not expected.
2020-06-19 11:34:52 -04:00
Diana Huang
c7bd5a8a15 Remove more references to fix tests. 2020-06-09 13:06:44 -04:00
Diana Huang
a0f24bbb64 Remove shoppingcart references from instructor. 2020-06-09 13:06:44 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Dave St.Germain
7336ea91fe This refactors instructor dashboard access to use Bridgekeeper permissions and allows the Data Researcher course/org role to access only the data downloads tab of the dashboard.
TNL-7176
2020-04-22 11:06:08 -04:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Manjinder Singh
cea795b02e Added new auth class (#23018)
* Added new auth class

- Created new class called OAuth2AuthenticationAllowInactiveUser, which replaces old class with same name
- Renames previous  OAuth2AuthenticationAllowInactiveUser to  OAuth2AuthenticationAllowInactiveUserDeprecated
- Replaced all imports of  OAuth2AuthenticationAllowInactiveUser to call deprecated class instead
- testing new class in discussion(added flag based on django setting)
2020-02-06 10:37:27 -05:00
Dave St.Germain
3d82ce18f9 Check for data download permission in report endpoints 2020-01-27 13:55:18 -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
Daniel Clemente Laboreo
a9476ea50e Add last_login and date_joined to the student profile export 2019-11-25 19:58:05 +01:00
Awais Qureshi
3bea5b5d24 BOM-1005
Fixing encoding issue.
2019-11-01 18:41:44 +05:00
Awais Qureshi
5c8db66021 BOM-841
Python3 fix.
2019-09-30 13:47:50 +05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Diana Huang
e80265bb9a Remove shoppingcart pdf generation.
DEPR-40
2019-09-25 09:07:09 -04:00
Awais Qureshi
a0e4e94e31 BOM-482
Fixing python3
2019-09-20 20:18:18 +05:00
Ayub khan
8e71206312 BOM-96
-fixes all issues
2019-09-02 13:30:33 +05:00