Commit Graph

9629 Commits

Author SHA1 Message Date
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
Usama Sadiq
9ee8df0980 fix: Remove pylint constraint and fix warnings (#28646) 2021-10-20 23:00:13 +05:00
Usama Sadiq
ab4c14afe3 fix: fix pylint warnings (#29049) 2021-10-20 16:28:18 +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
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
Kshitij Sobti
3e05e0f49b feat: add support for enabling/disabling the wiki app (#28889)
Currently the wiki app can't be enabled or configured. This change allows enabling/disabling the wiki app which effectively hides/shows the wiki tab.
2021-10-07 11:04:03 +05:00
Soban Javed
44ddbdf925 fix: use cookies for storing language instead of session
- Fixed LANGUAGE_COOKIE settings name to LANGUAGE_COOKIE_NAME beacuse later is recognised by django
- Added test to verify cookies use in dark lang middleware
- Fixing Django 3.0 tests
2021-10-04 21:00:29 +05:00
Awais Qureshi
fa959f1ed9 Merge pull request #28810 from edx/removing-cors-headers-checks
chore: `django-cor-headers` post deployment cleanup.
2021-10-04 17:12:47 +05:00
Awais Jibran
872de99acc fix: textbooks should be enabled if course has any textbooks enabled. (#28887)
fix: proctoring settings to show pop up modal
fix: custom pages to be "disabled" by defualt
fix: only build lagacy link when app sends any link
2021-10-01 16:26:14 +05:00
Gábor Boros
0935b5c51f feat: adds CELERY_BROKER_TRANSPORT_OPTIONS (#28849)
which can be configured from the lms/studio environment

refactor: raise ImproperlyConfigured on TypeError
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>

Co-authored-by: Jillian Vogel <jill@opencraft.com>
2021-09-30 14:30:28 -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
Zia Fazal
c15c5380a3 Merge pull request #28790 from edly-io/ERTE-88
Remove event routing backends from edx-platform
2021-09-30 18:44:14 +05:00
RehanAziz
f6f45eab50 ERTE-88 Remove event routing backends from edx-platform 2021-09-28 17:24:52 +05:00
Usama Sadiq
eaf2e68d2a build: Use DeploymentMonitoringMiddleware in settings (#28850) 2021-09-28 15:31:26 +05: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
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
Usama Sadiq
484cd536e2 fix: Fixed new pylint warnings (#28724) 2021-09-23 17:54:04 +05:00
Jillian Vogel
c41e7fb93a 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.
2021-09-23 11:41:43 +09:30
Awais Qureshi
780ff09ce3 chore: django-cor-headers post deployment cleanup.
CORS_ORIGIN_WHITELIST configs already updated with schemes so no need for other list.
2021-09-21 20:01:32 +05:00
sarina
0c74d347f7 fix: abstract edX-specific strings 2021-09-19 14:01:20 -04:00
Tim McCormack
dbb473f490 refactor: Studio OAuth cleanup, part 1 (#28760)
- Update migration instructions
    - Changes regarding redirect URLs and cookie domain are to permit the
      site to run on multiple domains.
- Set LOGIN_URL in common so that it can be unset in environment overrides

This bypasses the "redirect to LMS" login/signup code, but does not yet
remove it; removal is covered by DEPR-166 so that this remains a
configuration-only change for now.

There should have no user-visible effect.

ref: ARCHBOM-1890
2021-09-16 16:16:45 +00:00