Commit Graph

19803 Commits

Author SHA1 Message Date
Simon Chen
91f36d348d fix: remove ProctoredExamSoftwareSecureReview.video_url column on edx-proctoring (#29169)
Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2021-10-29 13:45:20 -04:00
Simon Chen
841f4ff001 fix: remove ProctoredExamSoftwareSecureReview.video_url from proctoring library (#29167)
Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2021-10-29 10:18:53 -04:00
julianajlk
c98cdbd1f7 feat: Add Track Selection error handling (#28941)
REV-2355
2021-10-29 10:02:41 -04:00
Awais Jibran
5f97bc60cf test: adds discussion API permissions test cases (#29135) 2021-10-28 14:54:32 +05:00
Kshitij Sobti
79cd0b1ef8 feat: Adds discussions settings for new discusions experience [BD-38] [TNL-8621] [BB-4854] (#29131)
* feat: Adds discussions settings for new discusions experience
This commit adds new discussions settings for the new discussions experience. These are stored in the course so they can be a part of course import/export flow.
These are also added to the discussions configuraiton API to allow MFEs to update the settings.
The discussions API is currently available via LMS, however that means it cannot save changes to the modulestore. This also adds the API to the studio config so it can now also be accessed from studio and be used to save course settings.

* fix: tests
2021-10-28 11:56:17 +05:00
kenclary
13818b9630 Merge pull request #29138 from edx/coursegraph-fix-neo4j-dump
fix: default for CertificatesDisplayBehaviors is enum string value, not enum.
2021-10-27 17:31:22 -04:00
edX Transifex Bot
c13cf4cca1 geoip2: update maxmind geolite country database 2021-10-28 02:03:37 +05:00
Ken Clary
bfd09236a2 fix: default for CertificatesDisplayBehaviors is enum string value, not enum.
This should correct a large number of errors encountered when trying
to dump courses to neo4j.

TNL-8386
2021-10-27 14:59:36 -04:00
connorhaugh
b01e773d2b feat: cache course index queries (#29107)
* feat: store split modulestore's course indexes in Django/MySQL

Course outline generation is calling active_versions hundreds or even thousands of times on course_publish. In practice, the handling of a block requires a fetch of the course index. That requires a call to the active_versions table for each touching of a block. In larger courses, that can mean 1000s of calls to the db to retrieve them. A quick solution to this problem is to use a request cache, so we don't have to query the slow db every time and memoize the relevant data
[An example run can be seen here.](https://one.newrelic.com/launcher/nr1-core.explorer?platform[filters]=IihuYW1lIGxpa2UgJ3Byb2QtZWR4LWVkeGFwcCcgb3IgaWQgPSAncHJvZC1lZHgtZWR4YXBwJyBvciBkb21haW5JZCA9ICdwcm9kLWVkeC1lZHhhcHAnKSBhbmQgKG5hbWUgbGlrZSAnbG1zJyBvciBpZCA9ICdsbXMnIG9yIGRvbWFpbklkID0gJ2xtcycpIg==&platform[accountId]=88178&platform[timeRange][begin_time]=1626715880701&platform[timeRange][end_time]=1627320680701&pane=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMudHJhbnNhY3Rpb25zIiwiZW50aXR5R3VpZCI6Ik9EZ3hOemg4UVZCTmZFRlFVRXhKUTBGVVNVOU9mRFk1TVRNM05EUTROQSIsInNlbGVjdGVkU2VyaWVzIjoiZjAzYjNmNzY5OTQ0MjlmOTFhYWQ4MDBkNTEwZTU5MDM5OWNjMzNhMSIsImRyaWxsZG93biI6eyJ0cmFuc2FjdGlvbk5hbWUiOiJPdGhlclRyYW5zYWN0aW9uL0NlbGVyeS9jbXMuZGphbmdvYXBwcy5jb250ZW50c3RvcmUudGFza3MudXBkYXRlX291dGxpbmVfZnJvbV9tb2R1bGVzdG9yZV90YXNrIn19&cards[0]=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMudHJhbnNhY3Rpb24tdHJhY2UiLCJ0cmFjZUlkIjoiY2I2OGNkMDktZWI5Yi0xMWViLWJkY2QtMDI0MmFjMTEwMDBlXzI1MjU0MV8zMTgzMTMiLCJlbnRpdHlHdWlkIjoiT0RneE56aDhRVkJOZkVGUVVFeEpRMEZVU1U5T2ZEWTVNVE0zTkRRNE5BIn0=&sidebars[0]=eyJuZXJkbGV0SWQiOiJucjEtY29yZS5hY3Rpb25zIiwic2VsZWN0ZWROZXJkbGV0Ijp7Im5lcmRsZXRJZCI6ImFwbS1uZXJkbGV0cy50cmFuc2FjdGlvbnMifSwiZW50aXR5R3VpZCI6Ik9EZ3hOemg4UVZCTmZFRlFVRXhKUTBGVVNVOU9mRFk1TVRNM05EUTROQSJ9&state=d9946155-ea53-cb11-c1c0-cc873d6c7d39)

Useful information to include:
In theory, this should provide a minor performance boost to authors and learners, and be noticeable in the above function trace, once live on prod. Note, that in several places the cache must be invalidated, as to prevent a stale cache.


Co-authored-by: Braden MacDonald <braden@opencraft.com>
2021-10-27 13:53:10 -04:00
David Ormsbee
5d0132305d Revert "feat: Adds discussions settings for new discusions experience (#28749)"
This reverts commit bb0c03123c.
2021-10-27 10:40:12 -04:00
Kshitij Sobti
bb0c03123c feat: Adds discussions settings for new discusions experience (#28749)
This commit adds new discussions settings for the new discussions experience. These are stored in the course so they can be a part of course import/export flow.
These are also added to the discussions configuraiton API to allow MFEs to update the settings.
The discussions API is currently available via LMS, however that means it cannot save changes to the modulestore. This also adds the API to the studio config so it can now also be accessed from studio and be used to save course settings.
2021-10-27 15:41:27 +05:00
Braden MacDonald
6c85668099 feat: write split modulestore's course indexes to Django/MySQL
Split modulestore persists data in three MongoDB "collections": course_index (list of courses and the current version of each), structure (outline of the courses, and some XBlock fields), and definition (other XBlock fields). While "structure" and "definition" data can get very large, which is one of the reasons MongoDB was chosen for modulestore, the course index data is very small.

This commit starts writing course indexes (active_versions) to both MySQL and Mongo, but continues to read from MongoDB only.

By moving course index data to MySQL / a django model, we get these advantages:
* Full history of changes to the course index data is now preserved
* Includes a django admin view to inspect the list of courses and libraries
* It's much easier to "reset" a corrupted course to a known working state, by using the simple-history revert tools from the django admin.
* The remaining MongoDB collections (structure and definition) are essentially just used as key-value stores of large JSON data structures. This paves the way for future changes that allow migrating courses one at a time from MongoDB to S3, and thus eliminating any use of MongoDB by split modulestore, simplifying the stack.
2021-10-26 10:06:52 -07:00
M. Zulqarnain
9833134fae Post Django 3.2 Cleanup (#29069)
* chore: Post Django 3.2 Cleanup
2021-10-22 13:55:16 +05:00
Andrew Shultz
f79e18b442 Merge pull request #29076 from edx/ashultz0/mst-853
feat: leave IDV out of proctoring requirements mail if honorcode
2021-10-21 11:02:38 -04:00
Usama Sadiq
95427251dc fix: fixed pylint warnings 2021-10-21 09:54:22 -04:00
Kyle McCormick
9bf266f717 fix: add missing __init__.py files 2021-10-21 09:54:22 -04:00
Justin Hynes
99ceec8647 Merge pull request #29077 from edx/jhynes/microba-1520_redirectv2
feat: Add support for course dashboard redirect for notices app
2021-10-21 07:45:18 -04:00
M. Zulqarnain
ba75bb6569 feat: django codemods changes for common folder (#28775) 2021-10-21 13:52:19 +05:00
edX Transifex Bot
7e17f7113a geoip2: update maxmind geolite country database 2021-10-21 02:03:25 +05:00
Justin Hynes
ae18a96090 feat: Add support for course dashboard redirect for notices app
[MICROBA-1520]
- Update course dashboard to check its context for unack'd notices from the notices app. If so, redirect the learner to the first unack'd notice.

(reintroduces earlier changes that were reverted)
2021-10-20 15:05:26 -04:00
Andy Shultz
5635782f86 feat: leave IDV out of proctoring requirements mail if honorcode
MST-853
2021-10-20 14:32:50 -04:00
Usama Sadiq
9ee8df0980 fix: Remove pylint constraint and fix warnings (#28646) 2021-10-20 23:00:13 +05:00
Justin Hynes
4854af6336 Merge pull request #29072 from edx/jhynes/revert-redirect
Revert "feat: Add support for course dashboard redirect for notices app"
2021-10-20 11:29:58 -04:00
Long Lin
34418a2667 fix: check enterprise_enabled in is_enterprise_learner 2021-10-20 10:49:30 -04:00
Justin Hynes
f640727e1d Revert "feat: Add support for course dashboard redirect for notices app"
This reverts commit 3611a8c150.
2021-10-20 10:48:25 -04:00
Justin Hynes
d245c0d123 Merge pull request #29017 from edx/jhynes/microba-1520_b2c-redirect
feat: Add support for course dashboard redirect for notices app
2021-10-20 08:22:08 -04:00
Usama Sadiq
ab4c14afe3 fix: fix pylint warnings (#29049) 2021-10-20 16:28:18 +05:00
brianhw
b3b3ef98b2 feat: add courserun_key property to GA event transformer. (#28761)
The GA transformer adds the context.course_id property of a tracking
log event to the event transmitted automatically to Segment in the
"label" property, so GA can use it.  This adds it also to the
"courserun_key" property, so that regular users of Segment events can
also query it in a more consistently-named property.  However, it does
so only if it is a valid CourseKey.

For DENG-997.

Add CourseKey parsing.
2021-10-19 16:40:30 -04:00
Justin Hynes
3611a8c150 feat: Add support for course dashboard redirect for notices app
[MICROBA-1520]
- Update course dashboard to check its context for unack'd notices from the notices app. If so, redirect the learner to the first unack'd notice.
2021-10-19 15:31:24 -04:00
Matt Hughes
f4974aebd5 fix(program-portals): prevent resume course links from 404ing (#27046)
* fix(program-portals): prevent resume course links from 404ing

From time to time course teams will delete a problem in an active
course. When this happens and that particular problem is the last
completed subsection for a learner, some naive attempts to provide a
"continue course" that takes the learner back to where they left off
may result in 404s. This checks whether a learner would be able to
access the block returned from completion data before we try to create
a link to that part of the course structure to hand to that learner.
It's used on the Master's program learner portal pages.

JIRA:EDUCATOR-5313

Co-authored-by: Zach Hancock <zhancock@edx.org>
2021-10-18 11:12:21 -04:00
julianajlk
4b2161e591 temp: Add logs for CourseMode selection errors (#28964)
REV-2355
2021-10-18 10:41:55 -04:00
Felipe Montoya
2100537e1f Merge pull request #27795 from eduNEXT/eric/codejail_rest_service
Optionally run Codejail in a external service using REST API.
2021-10-15 09:36:00 -05:00
Eric Herrera
fe6882819a fix: Address more PR comments
Address @felipemonotoya recommendations related to add versioning to safe_exec_remote functions.
2021-10-15 08:19:48 -05:00
Felipe Montoya
f12ad2f4df Merge pull request #27157 from eduNEXT/fmo/initial_hook_framework_docs
[BD-32] Hooks framework documentation
2021-10-14 10:39:29 -05:00
Eric Herrera
fc7104cde5 fix: Address PR comments
Address fixes recommended by @timmc-edx.
2021-10-14 08:11:40 -05:00
Eric Herrera
d672d309e8 fix: Improve and fix codejail service integration
Address recommendations and fixes discussed in PR.
Use similar structure to notes app.
Fix errors detected in tests.
2021-10-14 08:11:40 -05:00
Eric Herrera
3a736eefa2 feat: Codejail as external service (optional)
Add codejail service settings (endpoint and feature flag).
Add conditional to allow running codejail using a REST API service when flag is enabled.
2021-10-14 08:11:40 -05:00
edX Transifex Bot
28234f2e9b geoip2: update maxmind geolite country database 2021-10-14 02:09:26 +05:00
Felipe Montoya
678c159cf8 docs: adding the first version of documentation for open edx events
Includes:
- general documentation
- links to individual events definitions and location
- adding examples to events docs
- adding annotations at the trigger location
2021-10-13 15:28:24 -05:00
David Ormsbee
ae124bd554 Revert "feat: store split modulestore's course indexes in Django/MySQL"
This reverts commit 96e5ff8dce.
2021-10-07 15:07:42 -04:00
Braden MacDonald
96e5ff8dce feat: store split modulestore's course indexes in Django/MySQL
Split modulestore persists data in three MongoDB "collections": course_index (list of courses and the current version of each), structure (outline of the courses, and some XBlock fields), and definition (other XBlock fields). While "structure" and "definition" data can get very large, which is one of the reasons MongoDB was chosen for modulestore, the course index data is very small.

By moving course index data to MySQL / a django model, we get these advantages:
* Full history of changes to the course index data is now preserved
* Includes a django admin view to inspect the list of courses and libraries
* It's much easier to "reset" a corrupted course to a known working state, by using the simple-history revert tools from the django admin.
* The remaining MongoDB collections (structure and definition) are essentially just used as key-value stores of large JSON data structures. This paves the way for future changes that allow migrating courses one at a time from MongoDB to S3, and thus eliminating any use of MongoDB by split modulestore, simplifying the stack.
2021-10-07 10:59:47 -04:00
edX Transifex Bot
8943e12dc3 geoip2: update maxmind geolite country database 2021-10-07 02:19:25 +05:00
Aarif
7d2cc016ec fix: added type annotations to fix mypy failure in CI (#28933) 2021-10-05 17:04:11 +05:00
Awais Qureshi
55c69c5e5b chore: disable pylint warning. 2021-10-05 14:08:03 +05:00
Kshitij Sobti
9e787a09bc chore: remove dependency on rest_condition (#28663)
rest-condition has not been updated for a while, and with DRF 3.9 it is no longer needed since the ability to combine Permission classes using boolean operators is now provided by DRF directly.
2021-10-04 15:38:17 -04:00
ha-D
d3bc4601ae feat: Add course-wide custom scripts
Imlements OEP-15 by adding two fields to the course settings:
- Course-wide Custom JS
- Course-wide Custom CSS
The resources defined in these fields will be rendered in all course pages.

Rebase b6cb629849..0578e1c4c6 onto b6cb629849:
- Add course-wide resources to API for MFE use
- Revert "Add course-wide resources to API for MFE use" reverts commit 53648dcf0afe3cd171c9dc2eb5e56b871b2bcfb2

Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
2021-10-04 11:24:45 -07:00
Albert (AJ) St. Aubin
24548dd093 fix: Hide Request Cert button on courses with no Cert config 2021-10-04 07:01:26 -04:00
Agrendalath
4b8421dfd8 fix: handle invalid source library version on course import
Importing a course with an invalid source library version (e.g. created on
another instance) should not make the import fail.
2021-09-30 10:19:56 -07:00
Simon Chen
38944b836b fix: Create a better admin UI for PendingNameChange model (#28888)
The current admin UI for the PendingNameChange model has no useful info and is not performant on edit form. This change make the view and edit of the model easier in django admin

Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2021-09-30 11:34:59 -04:00
David Ormsbee
deaf80f346 revert: "[BD-13] Let ModuleSystem use UserService" (#28857)
This caused a regression where anonymous_id values were not as expected.
Reverting for now, with investigation to follow.
2021-09-27 15:42:35 -04:00