Commit Graph

9650 Commits

Author SHA1 Message Date
edX requirements bot
bb20b17428 Python Requirements Update (#29516)
* chore: Updating Python Requirements

* fix: fix pylint issues

Co-authored-by: Mohammad Ahtasham ul Hassan <mohammad.ahtasham@arbisoft.com>
2021-12-08 14:13:27 +05:00
Zainab Amir
acf5add774 feat: add marketing email option on registration (#29397) 2021-12-07 17:16:28 +05:00
Abdurrehman
6c6cf0ad0b feat: external plugin integration in instructor dashboard (#29376)
* feat: external plugin integration fixes
2021-12-07 15:54:00 +05:00
Kshitij Sobti
9f4bc9900b feat: add discussions context to course blocks API (#29300)
Add a new course blocks transformer that adds discussion context for units.
2021-12-07 11:10:48 +05:00
edX Transifex Bot
ed73fd3b29 chore(i18n): update translations 2021-12-06 02:41:48 +05:00
Shafqat Farhan
84cba23c0b feat: VAN-666 - Reject new password that is detected as vulnerable on password reset 2021-12-03 19:19:21 +05:00
Ben Warzeski
2f4fedc237 feat: update min grade cutoff from 997 to 99 (#29475) 2021-12-01 10:29:29 -05:00
Jillian Vogel
ad5ad72273 [BD-13] Deprecate ModuleSystem.render_template (fixed) (#29354)
* 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.

(cherry picked from commit 457f959356)

* refactor: use MakoService.render_template to remove deprecation warnings

from block code.

(cherry picked from commit 8d62d337f5)

* refactor: use MakoService.render_template to remove deprecation warnings

from test code.

(cherry picked from commit 26b43465a4)

* test: Adds a test to verify the bug introduced by the previous changes

The AuthoringMixin is automatically added to all XBlocks (see
settings.XBLOCK_MIXINS), and AuthoringMixin.visibility_view expects the
"mako" service.

This test verifies the bug by testing the PureXBlock, which does not
require the "mako" service, and so fails when the visibility_view is
rendered.

* fix: AuthoringMixin needs mako service

which fixes the visibility_view for XBlocks which don't explicitly
require the mako service.

Also removes the unneeded class property _services_requested from
AuthoringMixin and StudioEditableBlock. This property is better provided
by the XBlockMixin class.
2021-11-29 14:42:52 -05:00
edX Transifex Bot
0a73ac9089 chore(i18n): update translations 2021-11-29 02:41:27 +05:00
Kshitij Sobti
c8bd924e23 feat: Add support for using the discussions MFE UI instead of existing UI [BD-38] [TNL-9228] (#29285)
* feat: Add support for using the discussions MFE UI instead of existing UI

Adds a new course waffle flag that when set along with the discussions MFE URL shows the discussions MFE UI instead of the regular UI.

* test: add tests

* squash!: more consistent url name
2021-11-23 14:56:25 +05:00
Uzair Rasheed
f74c0e51cb Merge pull request #29364 from edx/allow-login-if-email-opt-in-enabled
feat: allow login if email opt-in is enabled
2021-11-22 13:02:11 +05:00
Abdurrehman
25f1640c58 fix: ALLOW_PUBLIC_ACCOUNT_CREATION flag does not show/hide signup btn above footer (#29261) 2021-11-22 11:31:54 +05:00
Kshitij Sobti
e8e8f4acbe feat!: Change the way tabs are ordered [BD-38] [TNL-9174] [BB-5076] (#29262)
* feat!: Change the way tabs are ordered
The change imposes a new ordering for tabs based on their new priority. When reordering tabs, this ordering will be maintained.

* fix: Apply suggestions from code review

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>

* fix: review feedback

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
2021-11-22 11:17:30 +05:00
uzairr
f02fe4c203 feat: allow login if email opt-in is enabled
allow login to in-active users if email opt-in is enabled

Fixes: VAN-768
2021-11-22 10:53:33 +05:00
edX Transifex Bot
2e2701d82a chore(i18n): update translations 2021-11-22 02:41:48 +05:00
Ahtisham Shahid
78e115a05c fix: updated cache policy for import_status endpoint (#29342)
* fix: updated cache policy for import_status endpoint
2021-11-17 19:40:17 +05:00
Justin Lapierre
f6f3a79a15 Revert "[BD-13] Deprecate ModuleSystem.render_template" 2021-11-16 15:16:08 -05:00
Piotr Surowiec
4bf829dcbd fix: do not remove comments from XML during course import (#28557)
This is a follow-up to edx#1087, which reverted this change.
According to the PR comments, parsing strings with XML comments inside them was
causing errors. This does not seem to be the case anymore - these strings are
just hidden when the block is rendered, but they are not breaking XBlocks.
This also handles (ignores) the comments that could be added directly to the
LibraryContentBlock in the XML export by users.
2021-11-16 12:42:08 -05:00
Ahtisham Shahid
814efed637 feat: added logging in import status view (#29330)
* feat: added logging in import status view
2021-11-16 22:23:27 +05:00
Kaustav Banerjee
75919473f3 feat: Hide discussion block if non-legacy discussion provider is selected (#29259) 2021-11-16 11:43:06 +05:00
edX Transifex Bot
92cd9108b2 chore(i18n): update translations 2021-11-16 00:30:52 +05:00
Kshitij Sobti
285e2c4f29 feat: Adds a new discussion topic configuration mechanism [BD-38] [TNL-8623] [BB-4968] (#29082)
* feat: Adds a new discussion topic configuration mechanism

The new discussion configuration system links discussion topics directly to the course structure. This change adds a new task that sends a discussion update signal if there are any changes to the course. This signal includes all the context needed to update the configuration of the course.

The handler for this new event will create a new entry for each unit that needs a topic in the database. In the future this will be used to see the topics in the course.

* fix: add support for marking a provider as supporting LTI

* fix: review feedback
2021-11-12 19:08:43 +05:00
edX Transifex Bot
fe067bab16 chore(i18n): update translations 2021-11-10 21:10:54 +05:00
Ned Batchelder
d9dd10dc97 style: code cleanups from Steven Burch (#29292)
* chore: update deprecated import from collections

* chore: remove outdated imports from markdown library

as it hasn't been supported since 2.0.3 and we're on 3.x.
This was deprecated at least as early as 2012!

* docs: add docstring and remove lint-amnesty to markdown plugin

* chore: remove deprecated etree import

* style: remove unnecessary-comprehension for sets

* style: resolve a number of amnestied pylint complaints

Co-authored-by: stvn <stvn@mit.edu>
2021-11-10 07:11:57 -08:00
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
Matthew Piatetsky
3c0d824701 fix: use pngs for the goal reminder email banner and remove redundant unsubscribe link from the email (#29215)
* fix: use pngs for the goal reminder email banner and remove redundant unsubscribe link

* fix: update
2021-11-09 09:24:58 -05:00
Jillian Vogel
26b43465a4 refactor: use MakoService.render_template to remove deprecation warnings
from test code.
2021-11-09 14:03:54 +10:30
Jillian Vogel
8d62d337f5 refactor: use MakoService.render_template to remove deprecation warnings
from block code.
2021-11-09 14:03:54 +10:30
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
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
Farhaan Bukhsh
cfe75e95b9 feat: Add discussion_enabled for Unit (#28864)
For each unit discussion_enabled flag is added
so that each unit can be made discussable when needed.

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2021-11-08 16:17:07 +05:00
Ken Clary
81f7d10452 fix: correct path for dump_course_to_neo4j task, so it goes to correct celery queue.
TNL-8386
2021-11-05 14:37:33 -04:00
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
Binod Pant
60da5db4b6 feat: degreed2 integrated channels (#29183)
* feat: degreed2 integrated channels

ENT-2789

* feat:  New integrated channel via edx-enterprise

* fix: pull in edx-enterprise 3.33.1

fixes db_overrides check failure by renaming field `key` to `client_id`
2021-11-01 21:18:59 -04:00
Bianca Severino
1bb5685897 Merge pull request #29182 from edx/bseverino/hide-proctored-after-due
MST-980: Hide proctored exams after due by default
2021-11-01 14:39:23 -04:00
Bianca Severino
6f4811d7e7 fix: hide proctored exams after due by default 2021-11-01 13:18:40 -04:00
Ken Clary
109fbb9f7c fix: move coursegraph celery tasks to cms (from lms), and on a non-default, non-high-priority queue.
This is so that the lms default celery queue does not get backed up
when coursegraph is hosed (which is likely when coursegraph has been
redeployed and needs to get the full set of courses).

TNL-8386
2021-11-01 13:13:42 -04:00
Ken Clary
c783684a09 fix: move coursegraph celery tasks to cms (from lms), and on a non-default, non-high-priority queue.
This is so that the lms default celery queue does not get backed up
when coursegraph is hosed (which is likely when coursegraph has been
redeployed and needs to get the full set of courses).

TNL-8386
2021-11-01 10:05:22 -04:00
Waheed Ahmed
d5ab616ca8 feat: COPPA - remove primary/elementary option from education (#29147)
Remove `primary/elementary` option from education field if COPPA compliance
feature flag is enabled. Also, renamed the flag.

VAN-762
2021-10-28 14:12:53 +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
Agrendalath
e633cc9c24 feat: support adding custom editors to Studio
This:
1. Introduces a variable for the Course Outline view in Studio.
   A custom theme can override it to add new editors.
2. Exports a function for creating new editor modals.
   A custom theme can use it to create editors without adding boilerplate code.
3. Adds a pluggable override for XBlock fields that are passed to the Studio.
   Without this, custom editors in Studio cannot retrieve values of XBlock fields.
2021-10-27 13:35:19 -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
Max Sokolski
acd83d1c05 fix: use common default for LANGUAGE_COOKIE_NAME (#29096)
Changes:
- use default LANGUAGE_COOKIE_NAME value from common for cases when there is no
`LANGUAGE_COOKIE` and `LANGUAGE_COOKIE_NAME` in ENV_TOKENS
2021-10-25 14:22:00 -04:00
M. Zulqarnain
e54fb5f76e feat: New codemods on CMS (#28768) 2021-10-25 12:59:54 +05:00
Zainab Amir
6019971dd4 feat: put year of birth behind feature flag (#29007) 2021-10-22 12:17:06 +05:00
Tinuade Adeleke
706df06638 feat: updated pages to the new custom pages design (#28686)
made changes to pages template
refactored method to handle reordering of static tabs
refactored test for the refactored method
added link to the pages and resources MFE on the updated page
2021-10-21 20:06:22 +05: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