Commit Graph

5781 Commits

Author SHA1 Message Date
David Ormsbee
2d60224125 Merge pull request #28571 from open-craft/jill/bd-13-render_template
feat!: [BD-13] Deprecate ModuleSystem.render_template
2021-11-09 12:20:59 -05:00
Jillian Vogel
457f959356 refactor: deprecates ModuleSystem.render_template
in favor of the added MakoSystem render_template method.

Related changes:
* Adds the MakoService to the StudioEditModuleRuntime,
  PreviewModuleSystem, LmsModuleSystem, and XBlockRuntime
* MakoService constructor takes a `namespace_prefix` string, so that the
  CMS PreviewModuleSystem can render to LMS templates, without needing
  the special render_from_lms helper method.
* ModuleSystem.render_template becomes a read-only property, so the
  constructor calls and test module systems are updated accordingly.
* Adds tests for the MakoService and module system shims.
2021-11-09 14:03:50 +10:30
Andy Shultz
6884361bce feat: only show IDV panel until honor code replaces it
the integrity flag is a course waffle flag so until it's on for
everyone this will not be triggered - that's OK and expected

MST-1153
2021-11-08 14:52:13 -05:00
Simon Chen
bcf093c1f6 feat: disable idv on dashboard course listing (#29276)
There are messages on each course card on learner dashboard that displays action panels to prompt learners to do IDV. With honor code signature feature on, those panel message should be disabled

Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2021-11-08 13:36:40 -05:00
David Ormsbee
15eca3ba59 Merge pull request #29190 from open-craft/jill/BD-13-user-service-fix
[FAL-2457] Let ModuleSystem use UserService
2021-11-08 09:18:10 -05:00
SaadYousaf
abdc46793f fix: add cache to forum role lookup 2021-11-04 00:24:29 +05:00
connorhaugh
b8d49e77cc Revert "feat: Add a data migration to copy all course index data into MySQL"
This reverts commit 43bc683d80.
2021-11-03 13:53:21 -04:00
Braden MacDonald
43bc683d80 feat: Add a data migration to copy all course index data into MySQL 2021-11-03 10:26:03 -04:00
Jillian Vogel
a14f7e5953 fix: do not modify the django user object when creating a XBlockDjangoUserService
This user object is shared between invocations, and so the
anonymous_user_id gets altered for different types of blocks.
2021-11-02 20:42:21 +10:30
Jillian Vogel
cf1064616c refactor: deprecate ModuleSystem user attributes in favor of user service
The following ModuleSystem attributes are deprecated by this change, and should be pulled directly from the user service instead:

* anonymous_student_id
* seed
* user_id
* user_is_staff

Related changes:

* Removes the `user` and `anonymous_student_id` parameters from the ModuleService constructor.
* Stores anonymous_user_id in XBlockDjangoUserService's opt_attr
* Pulls out constants used by DjangoXBlockUserService opt_attr so they can be used in the platform code.
* LmsModuleSystem uses the user service created in wrapper function for runtime.publish to avoid requiring the user
  service to be "needed" by all XBlocks.
* LmsModuleSystem no longer checks for instances of XModuleDescriptor when deciding what kind of anonymous_user_id to
  provide:  all XModules are XBlocks, so this check is unnecessary.
* XBlockRuntime returns a user service when requested
* Adds tests for deprecated ModuleSystem attributes and changes to XBlockDjangoUserService.

(cherry picked from commit c41e7fb93a)
2021-11-02 18:24:06 +10:30
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
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
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
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
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
Albert (AJ) St. Aubin
24548dd093 fix: Hide Request Cert button on courses with no Cert config 2021-10-04 07:01:26 -04: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
Awais Qureshi
e3c83bd86f Merge pull request #28827 from edx/django32/BOM-2846-issue
fix: Added durable argument to transaction.atomic.
2021-09-27 18:33:45 +05:00
Phillip Shiu
1d78705c86 fix: enterprise user check fails for courses without verified track (#28839) 2021-09-24 15:35:02 -04:00
David Ormsbee
3827f4c90d Merge pull request #28440 from open-craft/jill/BD-13-user-service
[BD-13] Let ModuleSystem use UserService
2021-09-24 09:26:43 -04:00
Awais Qureshi
ca8f964399 Update db.py 2021-09-23 20:01:08 +05:00
Awais Qureshi
70e594e63f fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 18:00:42 +05:00
Usama Sadiq
484cd536e2 fix: Fixed new pylint warnings (#28724) 2021-09-23 17:54:04 +05:00
Awais Qureshi
129a27314f fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 17:15:08 +05:00
Awais Qureshi
5772b89f54 fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 15:38:58 +05:00
Awais Qureshi
cb0a56fb0d fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 15:24:43 +05:00
Awais Qureshi
bae25765a6 fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 15:21:43 +05:00