Commit Graph

602 Commits

Author SHA1 Message Date
Sagirov Evgeniy
42adcaaf4d FC-0001: Remove Persistent Course Grades Flags (#30978)
* feat: revert Fix certificate generation without persistent grades

* feat: Remove Persistent Course Grades Flags

* test: update tests
2022-09-14 14:00:01 -04:00
Mubbshar Anwar
2980265764 Revert "feat: Pass segment properties (#30742)" (#30918)
This reverts commit b76d5c2a66.
2022-08-30 12:11:25 +05:00
Mubbshar Anwar
b76d5c2a66 feat: Pass segment properties (#30742)
- For enrollment email pass extra segment event properties.
VAN-999
2022-08-29 15:36:24 +05:00
Jansen Kantor
eec0e4a562 temp: add additional logging to debug problem score issue (#30850)
* temp: add additional logging to debug problem score issue

* fixup! temp: add additional logging to debug problem score issue
2022-08-12 13:46:30 -04:00
Justin Hynes
10014d79be feat: Add a little bit more detail to REVOKED (scheduled) bulk email tasks
[MICROBA-1901]
- Update the task_output for (scheduled) bulk emails to include a _little_ more info when they are REVOKED.
2022-07-29 12:06:45 -04:00
Muhammad Soban Javed
d053bba952 Revert "Revert "refactor: move common/lib/capa/capa to xmodule/capa" (#30762)"
This reverts commit 4463ee751d.
2022-07-27 15:36:08 +05:00
Muhammad Soban Javed
4463ee751d Revert "refactor: move common/lib/capa/capa to xmodule/capa" (#30762) 2022-07-21 18:22:15 +05:00
Soban Javed
9eba9f983a refactor!: move common/lib/capa/capa to xmodule/capa
As part of dissolving our sub-projects in edx-platform, we are moving this package under the xmodule directory.
We have fixed all the occurences of import of this package and also fixed all documents related references.
This might break your platform if you have any reference of `import capa` or `from capa import` in your codebase or in any Xblock.

Ref: https://openedx.atlassian.net/browse/BOM-2582
2022-07-19 12:20:04 +05:00
Muhammad Umar Khan
a389a9ff10 Revert "Revert "refactor: move xmodule folder to root"" 2022-06-20 18:20:06 +05:00
Muhammad Umar Khan
d890f06507 Revert "refactor: move xmodule folder to root" 2022-06-20 16:03:48 +05:00
M Umar Khan
a91df0c40f refactor: move xmodule folder to root
- Moving xmodule folder to root as we're dissolving sub-projects of common folder in edx-platform
    - More info: https://openedx.atlassian.net/browse/BOM-2579
- -e common/lib/xmodule has been removed from the requirements as xmodule has itself become the part of edx-platform and not being installed through requirements
- The test files common/lib/xmodule/test_files/ have been removed as they are not being used anymore
2022-06-20 14:33:45 +05:00
Zaman Afzal
ec36d3a949 fix: revert Add Learner pathway progress update signal (#30598) 2022-06-16 01:59:40 +05:00
Zaman Afzal
6c6dabaa3c Feat: Add Learner pathway progress update signal (#30547)
* feat: Add Learner pathway progress update signal
2022-06-15 00:58:22 +05:00
Justin Hynes
d7ae3181b6 fix: fix issue with incorrect bulk email schedules
[MICROBA-1835]
* The DateTime string received from the Comms MFE was already in UTC so there is no need to convert the schedule to UTC on the backend.
2022-06-01 15:49:57 -04:00
Justin Hynes
8026f74e80 feat: Add management command for processing scheduled instructor tasks
[MICROBA-1512]
* Adds a new management command to the `instructor_task` app that will be used to process scheduled tasks ready for execution by Celery.
2022-05-20 12:50:27 -04:00
Justin Hynes
068eecff91 Merge pull request #30408 from openedx/jhynes/microba-1510_update-email-api
feat: MICROBA-1510; add support for updating course email content and schedules
2022-05-19 14:10:54 -04:00
Justin Hynes
79c53f1002 feat: MICROBA-1510; add support for updating course email content and schedules
[MICROBA-1510]
- Add support for updating an instructor task schedule date via REST API
- Add support for updating the contents of a scheduled course email via REST API
2022-05-19 13:42:58 -04:00
Justin Hynes
bfd75013a1 chore: update instructor task names to use constants
* Update various instructor task logic to use constants over strings when referring to instructor task names
2022-05-17 11:52:35 -04:00
Eugene Dyudyunov
655e4a344f refactor!: update CourseWaffleFlag (#30351)
BREAKING: get rid of the LegacyWaffle-based CourseWaffleFlag.
Both CourseWaffleFlag and FutureCourseWaffleFlag now use the modern
WaffleFlag as parent class. FutureCourseWaffleFlag left to support ORA
transition to modern waffle.

Switch to the ORA version which supporting new Waffles.
2022-05-10 15:08:59 -04:00
Justin Hynes
8f2eb38220 Merge pull request #30342 from openedx/jhynes/microba-1510_rest-apis
feat: add new REST APIs to support scheduled bulk email
2022-05-09 09:41:44 -04:00
Justin Hynes
351d9e6759 feat: add new REST API to support scheduled bulk email
[MICROBA-1510]

* update InstructorTaskSchedule model delete behavior from CASCADE to DO_NOTHING.
* add utility function supporting cancellation of scheduled tasks to the instructor_task app
* add utility function to determine if a user has staff or instructor level access to a course to the student app
* adds a REST API for supporting retrieval and cancellation of scheduled bulk email tasks
* add unit tests for new functionality in the student app
* add unit tests for the new functionality in the bulk_email app
* remove use of CourseEmail object directly in another related test file
* add unit tests for the new REST API views.
2022-05-05 14:26:35 -04:00
Eugene Dyudyunov
8bd43207ca refactor!: switch from LegacyWaffle* to modern waffles (#30330)
This is a first stage for removing the LegacyWaffle* classes.

LegacyWaffleFlag usage replaced with WaffleFlag;
LegacyWaffleSwitche usage replaced with WaffleSwitch;
New CourseWaffleFlag added to the temporary module __future__ as FutureCourseWaffleFlag;
Updated all the imports to use CourseWaffleFlag from the __future__ module;

BREAKING CHANGE: A number of toggle related constants (e.g. ENABLE_ACCESSIBILITY_POLICY_PAGE)
changed types. They were strings, and are now toggle instances (e.g. WaffleSwitch). Although the entire
refactor should be self-contained in edx-platform, if any plugins or dependencies were directly
using these constants, they will break. If this is the case, try to find a better publicized way of
exposing those toggles.
2022-05-05 12:03:10 -04:00
Simon Chen
fcb29a6834 feat: introduce new setting to control IDV requirements for certificates (#30318)
Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2022-04-28 11:10:04 -04:00
Justin Hynes
1435b619b4 Merge pull request #30271 from openedx/jhynes/microba-1507_process-scheduled-tasks
feat: add support for processing scheduled instructor tasks
2022-04-20 09:14:31 -04:00
Justin Hynes
bec97653b5 feat: add support for processing scheduled instructor tasks
[MICROBA-1507]

* adds new functionality for retrieving and submitting scheduled tasks to Celery
* add an InstructorTaskSchedule factory for unit testing
* adds unit tests for processing scheduled tasks
2022-04-19 15:29:27 -04:00
Justin Hynes
d1aa1734dd docs: add ADRs describing approach for the scheduled instructor tasks implementation
[MICROBA-1696]

* Introduce an ADR with details on the proposed approach to scheduled instructor tasks to support scheduled bulk email
* Introduce an ADR with details on how scheduled instructor tasks will be processed
2022-04-19 08:23:43 -04:00
Justin Hynes
f2582c4e9e Merge pull request #30192 from openedx/jhynes/microba-1507_scheduled-tasks
feat: update existing functions to support scheduled email tasks
2022-04-12 08:26:31 -04:00
Justin Hynes
e826abc0e8 feat: update existing functions to support scheduled email tasks
[MICROBA-1507]

* Adds support to the bulk course email tool to extract a schedule and timezone from a `send_email` request.
* Submits the task for scheduling when needed.
2022-04-07 13:35:31 -04:00
Usama Sadiq
80f9f1de7a Fix quality failures with pylint 2.13.5 (#30197)
* build: update pylint-checks ci workflow
* fix: fix quality failures with new pylint version
* chore: remove pylint constraint
* chore: Updating Python Requirements (#30196)
Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2022-04-07 13:59:44 +05:00
Justin Hynes
31d3fcc01a feat: add models for scheduled instructor tasks
[MICROBA-1508]
- Adds the InstructorTaskSchedule model
- Adds the HistoricalInstructorTaskSchedule model
- Adds utility function used to create a InstructorTaskSchedule instance
- Adds a public `create_course_email` Python API function to the bulk_email app that can be imported and used in external apps
- Adds a new `test_api_helper.py` test file (with tests for the new `schedule_task` function) to the instructor_task app
- Adds a new `test_api.py` test file (with tests for the new `create_course_email` function to the bulk_email app
2022-03-25 14:34:37 -04:00
Keith Grootboom
2280420785 fix: problem_grade_report task parent dir being discarded.
When running the problem_grade_report task the upload_parent_dir
argument should be used to place the task output in the
specified directory.
2022-03-24 10:08:06 +01:00
Michael Terry
a162140492 fix: have progress MFE API recalculate visible course grade
Previously, the course grade returned would be the stored grade,
which is calculated for all content, not just the visible grades.
(Some grades are not yet released to the learner.)

This fix recalculates the overall grade before sending to the MFE,
so that it doesn't have to recompute it itself (without all the
particular logic that the platform uses when grading).

AA-1217
2022-03-11 15:11:05 -05:00
Braden MacDonald
dcb7ef8821 feat: Read course indexes from MySQL, not MongoDB (#29184)
Description
This is a follow up to #29058 and #29413. This is the next step in moving part of the modulestore data (the course indexes / "active versions" table) from MongoDB to MySQL.

There are four steps planned in moving course index data to MySQL:

Step 1: create the tables in MySQL, start writing to MySQL + MongoDB  done
Step 2: migrate all remaining courses to MySQL  done
Step 3: switch reads from MongoDB to MySQL (this PR)
Step 4 (much later, once we know this is working well): stop writing to MongoDB altogether.
Supporting information
OpenCraft Jira ticket: MNG-2557

Status
 Tested with a large Open edX instance is in progress.

Testing instructions
Try making changes in Studio and verify that they work fine.

Deadline
None
2022-03-09 10:21:09 -05:00
Bianca Severino
af81b3a609 chore: replace integrity signature flag with django setting 2022-02-15 09:57:00 -05:00
Michael Terry
cb1bb7fa64 test: switch default test store to the split store
It's long past time that the default test modulestore was Split,
instead of Old Mongo. This commit switches the default store and
fixes some tests that now fail:
- Tests that didn't expect MFE to be enabled (because we don't
  enable MFE for Old Mongo) - opt out of MFE for those
- Tests that hardcoded old key string formats
- Lots of other random little differences

In many places, I didn't spend much time trying to figure out how to
properly fix the test, and instead just set the modulestore to Old
Mongo.

For those tests that I didn't spend time investigating, I've set
the modulestore to TEST_DATA_MONGO_AMNESTY_MODULESTORE - search for
that string to find further work.
2022-02-04 14:32:50 -05:00
Julia Eskew
0eb0f99d00 feat: Add org-level waffle overrides to allow a waffle flag to be overridden for all
courses in a particular organization, without needing to make a separate course-level
waffle override for each individual course for an organization.
2022-01-28 08:00:18 -05:00
Jawayria
d0fbde8973 chore: Applied lint-amnesty on lms/djangoapps (#29395) 2021-12-21 13:36:50 +05:00
Jillian Vogel
2ef69d513f refactor: removes xqueue_callback_url_prefix argument
from the lms get_module_for_descriptor and related methods.

This prefix was previously inferred from the request's base URL and
passed through several methods to reach the XQueueService creation.
But the request base URL always matches the LMS_ROOT_URL (or the preview
URL), so this change simply uses that setting instead.
2021-12-20 15:41:42 +01:00
Justin Hynes
df71aebdcf fix: [MICROBA-1594] fix cert generation logic for eligible modes that don't require IDV
[MICROBA-1594]

* Update course certificate generation logic when ID verification fails to check if the enrollment mode requires IDV.

This change fixes an issue where Honor certificates could not be generated in an Open edX installation unless a manual IDV override was added for the student.
2021-12-01 14:12:56 -05:00
M. Zulqarnain
95dbcaa323 feat: Django codemods on LMS (4) (#28854) 2021-11-19 15:10:58 +05:00
M. Zulqarnain
b84b862cc0 feat: Django codemods on LMS (3) (#28853) 2021-11-16 18:27:21 +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
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
Andy Shultz
7e3ef93a63 feat: make IDV optional for cert generation
IDV is on its way to retirement, so it's not going to be necessary for cert
generation forever.

Introduces a function to combine the honor code flag with IDV to tell
cert generation if it should care about a missing verification.

Various tests expanded to cover the retired case. The additional calls
in test_task_helper.py are caused by one call to fetch course
overrides which finds none, and that forces one check of the
background flag per student, 71 + 1 + 5 = 77.

MST-854
2021-10-22 14:46:07 -04:00
Usama Sadiq
9ee8df0980 fix: Remove pylint constraint and fix warnings (#28646) 2021-10-20 23:00:13 +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
Usama Sadiq
023f4144ab fix: fix new pylint warnings (#28725) 2021-09-23 17:54:15 +05:00
Awais Qureshi
eb0a66c2bd chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-30 22:13:13 +05:00
Awais Qureshi
bdb1e61b82 chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-27 23:35:00 +05:00