We've long rolled out the
`COURSEWARE_COURSE_NOT_STARTED_ENTERPRISE_LEARNER_ERROR` setting toggle so
it should be safe to remove.
I'm completely at a loss as to why course access checks are not
returning the `course_not_started_enterprise_learner` error code when it
should, but it does in stage/local, so this PR is grasping at straws.
ENT-8766
This commit addresses to the need to add an API for Sidebar Navigation
that returns the course structure with sections, subsections, and
**units**, according to user access rules. (Previous outline requests
only went down to subsections.)
To improve the performance of the API, we cache the course structure
for a user, which makes it much easier to calculate the block structure
for the user at each request. However, there may be cases when this
caching can lead to an overflow of the cache storage in high-loaded LMS
with large courses, so the corresponding flag
"courseware.disable_navigation_sidebar_blocks_caching" was added so
that this caching can be disabled.
* feat: Add EnrollmentsService in XBlockRuntime and block renderer
These changes give ability to use `EnrollmentsService` in XBlocks
Add `get_active_enrollments_by_course_and_user` method to `EnrollmentsService` which can be used to get active enrollment of user for a give course
During the process of generatinng report for problem responses,
there are two places where N + 1 query problem exist. In both
cases, `StudentModule` objects are fetched and looped over where
`student.username` field for each object is accessed. This result
in a seperate database call to get the username for each student
response.
This problem is fixed by creating a join to fetch the related
table in the original query using `select_related`. In a test
conducted on report having 5000 `StudentModule` objects, the
number of queries for the request reduced from 8363 to 29. The
total time taken for the task reduced from 23764 ms to 7394 ms.
Web scrapers do annoying stuff like visit urls they shouldn't know about and cause xblock handlers to break.
I tested this by:
Making sure video transcripts worked as normal while logged in
making sure that I got no 500s in my logs while attempting to view it logged out.
Normally, the course API would return an access error_code of
`course_not_started` if the course has not started yet. This change
breaks that up into two codes:
* if the course has not started:
* return error_code=`course_not_started_enterprise_learner` if the
learner is enrolled as a subsidized enterprise learner.
* else, return error_code=`course_not_started`.
This supports a change to the frontend which will interpret
`course_not_started_enterprise_learner` differently and trigger a
redirect to the enterprise (B2B) learner dashboard instead of the B2C
dashboard.
ENT-8078
Normally, the course API would return an access error_code of
`course_not_started` if the course has not started yet. This change
breaks that up into two codes:
* if the course has not started:
* return error_code=`course_not_started_enterprise_learner` if the
learner is enrolled as a subsidized enterprise learner.
* else, return error_code=`course_not_started`.
This supports a change to the frontend which will interpret
`course_not_started_enterprise_learner` differently and trigger a
redirect to the enterprise (B2B) learner dashboard instead of the B2C
dashboard.
ENT-8078
Datadog was removed 6+ years ago but some settings and related keys got
left behind. Get rid of them since we don't need them and also to
prevent people from assuming it's okay to hardcode datadog settings into
our codebase.
This flag was introduced to gate the rollout of moving the UI component for proctoring settings into the pages and resources view and was never cleaned up. At this point we should always be linking the the new page for proctoring settings.
This retrieves user preferences for edxnotes visibility by:
1. Adding a `bind_course_for_student` method to course overview model.
2. Using a bound XBlock in the `toggle_notes.html` template.
The previously used unbound course instance was returning a default value.
This commit leaves behind just enough Old Mongo (DraftModulestore)
functionality to allow read-only access to static assets and the
root CourseBlock. It removes:
* create/update operations
* child/parent traversal
* inheritance related code
It also removes or converts tests for this functionality.
The ability to read from the root CourseBlock was maintained for
backwards compatibility, since top-level course settings are often
stored here, and this is used by various parts of the codebase,
like displaying dashboards and re-building CourseOverview models.
Any attempt to read the contents of a course by getting the
CourseBlock's children will return an empty list (i.e. it will look
empty).
This commit does _not_ delete content on MongoDB or run any sort of
data migration or cleanup.
* feat: ora date config reflected in dates tab
* docs: update docstrings
* style: quality
* feat: Upgrade Python dependency ora2 (#33119)
temp upgrade so tests pass
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
Co-authored-by: jansenk <jansenk@users.noreply.github.com>
* fix: unbound variable
* fix: don't show dates for steps with no concept of due
* feat: Upgrade Python dependency ora2 (#33176)
bump to ora version to include ora date config changes
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
Co-authored-by: jansenk <jansenk@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jansenk <jansenk@users.noreply.github.com>