This code was originally located at:
./openedx/core/djangoapps/coursegraph
However, code makes more sense within the ./cms tree, because:
* it is responsible for publishing course content to an
external system, with is within the responsibilities of CMS, and
* is uses modulestore, which is discouraged for use in LMS
(see 0011-limit-modulestore-use-in-lms.rst).
So, we move the code to:
./cms/djangoapps/coursegraph
and uninstall coursegraph from LMS.
We do not expect this refactor to have any breaking downstream effects.
viewing in coursegraph for two reasons. First, the existing log message was misleading
as it implied that a course was being submitted to Neo4j even when it was being
skipped due to not changing since last being sent to Neo4j. Second, the new log
message was not distinctive enough for separate searching in Splunk - it will
now be distinctive enough for that search.
edx/edx-platform#24365 has changed the completion mode of these blocks.
Before Koa, it was sufficient to view the block to get a completion checkmark.
Since Koa, all children of the block must be completed.
This adds a toggle to change the completion behavior back to the previous one
so that the user experience can be consistent if needed.
XFF is just part of the chain; record the length of the whole chain instead
(which is always one larger).
Also include junk in one of the test values for realism.
TNL owns coursegraph and we've seen 7000+ courses be submitted for update weekly.
While log message exist for each course not submitted, no log message currently exists
for each submitted course. This commit adds logs for those submitted courses as well.
feat: [AA-1207] remove redundant Tabs fields from courseware API
Remove redundant fields from courseware API.
- number
- verified_mode
- original_User_is_staff
- is_staff
This is the backend work for https://github.com/openedx/frontend-app-learning/pull/873
Some registration tests can fail if run in a
particular order. This PR just adds a warning
so engineers don't mistakenly think they caused
an issue.
Also see VAN-900 for more details on how to
reproduce.
Add `edit_reason_code` field to both `Comments` and `Threads`, making it
editable for anyone who can also edit `raw_body`.
Add `close_reason_code` field to `Threads`, and make it editable by
anyone who can also edit `closed`.
Processing cookies at response time included cookies
that were temporary, like the JWT cookie that is
created by the server by combining the JWT header-payload
and JWT signature cookies. Since we are trying to monitor
the cookie header, we do not want to process this cookie.
However, since we want to include the user id in the logging
message, we delay the logging until response time.
Also, fixed docstring which mislabeled a custom attribute.
ARCHBOM-2055
Deprecates the following attributes from ModuleSystem:
* replace_urls
* replace_course_urls
* replace_jump_to_id_urls
A new ReplaceURLService is created as replacement with a unified replace_urls method
* Adds entrance exam information to the Course Overview object
* Enables hiding other tabs since the get_course_tab_list uses
a Course Overview
* Enables using the entrance exam helper functions to determine
if Entrance exams are being used in this course.
* Posts a message when Entrance Exam is passed to parent container for
usage in the Learning MFE
* Overrides the 'title' field of the courseware tab since the Learning MFE
uses that over the 'name' field.
In case of unusual cookie headers containing "Cookie ",
add custom attributes for monitoring:
- cookies.header.corrupt_count
- cookies.header.corrupt_key_count
See annotation documentation for more details.
Separately, updated to skip cookie log sampling for
0 size cookie header.
ARCHBOM-2055
Previously, course tabs would only be created once and never try to
update the default tabs again. This leads to an issue if you ever want
to add a new tab. With this command, you can now update the default tabs
for all existing courses and new courses will pick it up upon creation
when CourseTabList.initialize_default is called.
* feat: [AA-1207] remove redundant Tabs fields from courseware API
All the tab information now goes through the course home metadata tab fields. This field is redundant.
Contains a number of cookie monitoring changes.
Enhancements:
- Add sampling capability for cookie logging on headers
smaller than the threshold. For details, see
COOKIE_SAMPLING_REQUEST_COUNT.
- Add cookie header size to log message.
- Sort logged cookies starting with largest cookie.
- Move logging from Middleware request processing
to response processing to ensure the user id is
available for logging for authenticated calls.
- Added cookies.header.size.computed to check
if there are any large hidden duplicate cookies.
Can be compared against the cookies.header.size
custom attribute.
- Add delimiters into logs to make it simpler to parse
when the logging tools accidentally exports multiple
log lines together.
Removed:
- Legacy cookie capture code. This code was dangerous to
to enable and provided more limited insight than the
newer logging, so this was removed to simplify the code.
Other refactors:
- Switched Middleware to use new Django format, rather
than the Mixin.
- Moved tests to its own test class. Note: this
middleware is likely to move to a separate
library.
ARCHBOM-2055
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
* refactor: modified the imports to use openedx-events library
* chore: upgrade openedx-events to latest version
* fix: ran isort to avoid style errors
Co-authored-by: Maria Grimaldi <maria.grimaldi@edunext.co>
Discussion topic links don't contain enough useful information if the unit they
are linked to is deleted. This ADR proposes storing more information for each
discussion topic to overcome this limitation.
* feat: [AA-1206] remove redundant fields from API
Part of a larger effort to clean up the MFE BFF endpoints.
Remove the redundant fields username and course_access, both of which are also available in the course home metadata call.