Commit Graph

245 Commits

Author SHA1 Message Date
Justin Hynes
f509bceac2 fix: setup context for emitting event to segment if desired (#36692)
If we wish this event to be sent to Segment through the event-tracking lib, we must ensure that the context includes at least the `user_id` field in the context dict.
2025-05-09 10:54:37 -04:00
Justin Hynes
46c9b3a193 fix: add error handling for potential issues calculating course progress (#36660)
* fix: add error handling for potential issues calculating course progress

Realized there is potential in a few places for exceptions to be thrown. I'm adding some more error handling in the course progress task and function to handle potential issues.
2025-05-05 14:00:12 -04:00
Justin Hynes
919615635e feat: optionally emit course completion analytics when a learner enters the courseware (#36507)
This PR attempts to improve the ability to collect analytics about learner's progress
in their courses. Currently, the only place we regularly calculate course progress is
when a learner visits the "Progress" tab in the courseware.

Now, _optionally_, when a learner visits the home page of their course, we will enqueue
a Celery task that will calculate their progress and emit a tracking event.

This event is gated by use of the COURSE_HOME_SEND_COURSE_PROGRESS_ANALYTICS_FOR_STUDENT
waffle flag.
2025-04-29 13:46:09 -04:00
Edward Zarecor
49a69f5042 feat: allow return dates for not started courses for mobile, PR #36297
feat: allow return dates for not started courses for mobile
2025-04-22 13:28:38 -04:00
Kyrylo Kholodenko
b2c57adf12 feat: allow return dates for not started courses for mobile 2025-04-18 14:08:35 +03:00
Feanil Patel
1829eb7d71 feat!: Remove the course sock and related APIs.
DEPR: https://github.com/openedx/edx-platform/issues/36429

This change removes the course_sock and related API data.  The UI it
removes is on the Legacy Courseware pages which have also been replaced
and have their own [deprecation ticket](https://github.com/openedx/edx-platform/issues/35803)

Before this can be merged, we will need to update the
frontend-app-learning MFE to no longer consume the
`can_show_upgrade_sock` attribute.

BREAKING CHANGE: CourseHomeMetadata, ProgressTab, OutlineTab and
VerifiedMode APIs will no longer have a `can_show_upgrade_sock`
attribute.
2025-04-07 10:29:39 -04:00
Agrendalath
8b7a771dc4 fix: remove incorrect key type when filtering inaccessible blocks
Returning the list with a 'completion' string was added in 9bc0f85. However,
the `get_accessible_sequences` method expects a list of dicts with an 'id' key.
2025-01-23 17:53:36 +05:30
0x29a
69216e5560 test: has_course_author_access correctness 2024-11-29 00:39:58 +05:30
0x29a
dd814c3910 docs: explain why specifying 'cms' service 2024-11-29 00:39:58 +05:30
0x29a
ac9861fd73 feat: add has_course_author_access to CourseHomeMetadataView response 2024-11-29 00:39:58 +05:30
Brian Mesick
e478975105 chore: Add missing PII annotations, update safelist
PII Annotations are very out of date, this commit adds most that were
missing in edx-platform, and some additional annotations to the
safelist. It is not comprehensive, several other upstream Open edX
packages also need to be updated. It also does not include removing
annotations that have been moved upstream, or been removed entirely.
Those are separate follow-on tasks.
2024-11-05 12:58:36 -05:00
Kristin Aoki
92c8949af5 feat: add studio_access attribute to metadata (#35444)
* feat: add studio_access attribute to metadata

* fix: styling errors

* fix: remove redunant return
2024-09-06 19:16:44 +00:00
Juliana Kang
40ddfeb3b8 feat: Add override on percentage config to the First Purchase Discount (#35167)
REV-4098
2024-07-23 15:43:34 -04:00
Juliana Kang
a19697786f feat: Add First Purchase Discount override (#35143)
REV-4098
2024-07-22 14:01:07 -04:00
Emad Rad
c27d55a253 chore: typos fixed 2024-05-25 18:05:28 +03:30
Ivan Niedielnitsev
699614d892 feat: include units when calculating completion percentage (#34816)
This is an enhancement to the API used for the courseware navigation
sidebar.
2024-05-24 12:59:09 -04:00
Kyle McCormick
11626148d9 refactor: switch from mock to unittest.mock (#34844)
As of Python 3.3, the 3rd-party `mock` package has been subsumed into the
standard `unittest.mock` package. Refactoring tests to use the latter will
allow us to drop `mock` as a dependency, which is currently coming in
transitively through requirements/edx/paver.in.

We don't actually drop the `mock` dependency in this PR. That will happen
naturally in:

* https://github.com/openedx/edx-platform/pull/34830
2024-05-22 13:52:24 -04:00
Saad Yousaf
45cd459dde feat: add flag for showing/hiding new discussion sidebar view on course home page. (#34561)
Co-authored-by: Saad Yousaf <saad.yousaf@A006-01048.local>
2024-04-29 12:57:49 +05:00
Ivan Niedielnitsev
30836729b7 feat: Implement Sidebar Navigation [FC-0056] (#34457)
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.
2024-04-26 12:04:42 -04:00
Feanil Patel
ea55eca47e Merge pull request #33690 from Inferato/lytvynenko/bulk_email_checkbox_master
fix: course mode added to the metadata
2024-02-29 15:19:13 -05:00
Bryann Valderrama
4c0fba2063 feat: expose hide_from_toc field for course blocks in outline API (#33955)
These changes are part of the effort made to implement https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
2024-02-15 10:44:28 -04:00
salmannawaz
57b480b04f Update all edx-platform REST endpoints to support JWT Auth (#34152)
* chore: update API endpoints to support default JWT auth

The default DRF Auth classes were recently updated to allow for both JWT and Session auth by default. Any endpoint that overrides the AUTHENTICATION_CLASSES but has just session, just JWT or just both of those should be updated to remove the override.

Details in https://github.com/openedx/edx-platform/issues/33662
2024-02-13 10:46:58 -05:00
Syed Sajjad Hussain Shah
cb2a34e51f feat: logout other sessions on email change (#33846)
* feat: logout other sessions on email change

* fix: updated the approach for session invalidation

* fix: update and add tests

* fix: update tests with descriptive comments

* feat: add integration tests

* fix: store email in session update

* fix: add setting for tests

* fix: fix tests

* feat: Upgrade Python dependency edx-drf-extensions (#34135)

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: syedsajjadkazmii <syedsajjadkazmii@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: syedsajjadkazmii <syedsajjadkazmii@users.noreply.github.com>
2024-01-29 14:43:51 +05:00
Taras Lytvynenko
834562e5f8 fix: course mode added to the metadata 2023-11-10 01:04:49 +02:00
Rafay Ghafoor
b14396bbfb feat: Adds disable_progress_graph attribute to the returned course_metadata response
Currently, https://github.com/openedx/frontend-app-course-authoring/issues/517 faces an issue when the
progress graph toggle is enabled/disabled but the settings are not respected, the disable_progress_graph
attribute will allow the frontend-app-learning repo to use this attribute to respect the settings authored
from frontend-app-course-authoring and ultimately fix https://github.com/openedx/frontend-app-course-authoring/issues/517.
2023-10-11 20:39:16 +05:30
ABBOUD Moncef
9b44065ab0 fix: hide sequences & sections when access is restricted in units through cohorts (#33191)
This does two major things:

* Removes subsections from a student's course outline if the
  subsection's units are all restricted to a cohort that the student
  is not a part of (see CohortPartitionGroupsOutlineProcessor).
* Removes sections from the course outline if the user is not allowed
  to see any of its child subsections.
2023-09-19 10:05:02 -04:00
Lakshya Khatri
3acb1d8590 docs: annotate lms progress tab ui waffle flag (#33233) 2023-09-18 10:06:12 -04:00
Jansen Kantor
88b6f3894e fix: turn off atomic requests for course api get views (#33230)
* fix: turn off atomic requests for course api get views

* test: fix test
2023-09-14 10:40:28 -04:00
Jansen Kantor
7b91f8579f fix: return a 403 instead of a redirect from course_home_api api methods (#32210)
* fix: return 403 on course access error rather than redirect
2023-05-24 16:09:34 +00:00
Muhammad Adeel Tajamul
d8db64cf2a feat: hide discussion tab when disabled (#32195) 2023-05-16 05:17:06 +05:00
Pooja Kulkarni
a0d23b20f5 refactor: rename descriptor -> block within lms/djangoapps/course_api
Co-authored-by: Agrendalath <piotr@surowiec.it>
2023-04-26 17:10:53 +02:00
Ned Batchelder
12765a7a59 refactor(test): use @skip_unless_lms uniformly 2023-02-01 13:52:26 -08:00
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
0x29a
0df1411636 refactor: xmodule/course_module.py -> xmodule/course_block.py 2022-12-19 17:48:49 +01:00
Bernard Szabo
377edc2f4d feat: TNL-10136 Propagate changes from last PR 2022-12-13 17:19:41 -05:00
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
Hammad Ahmad Waqas
19c6bae60e Merge pull request #30920 from openedx/hammad/ENT-6111
feat: added support to check if active enterprise is same as EnterpriseCourseEnrollment object.
2022-09-07 11:55:56 +05:00
hammadahmadwaqas
02c799df61 feat: added support to check if active enterprise is same as EnterpriseCourseEnrollment object. 2022-09-07 11:24:33 +05:00
Mubbshar Anwar
22b378e605 feat: Pass segment properties (#30919)
- For new enrollment email pass extra segment event properties.
VAN-999
2022-09-05 16:55:46 +05: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
Syed Sajjad Hussain Shah
45d62226c1 fix: rename events and remove from_email property [VAN-1060] (#30911) 2022-08-29 14:59:13 +05:00
Zainab Amir
faf33bf32e feat: add optimizely experiment (#30880)
Added two events to measure optimizely experiment metrics:
- user_goal_setting_click
- user_start_course_click

VAN-1052
2022-08-23 15:33:54 +05:00
hammadahmadwaqas
7607303b79 feat: added support to check for DSC in course-home:course-metadata view. 2022-07-19 17:43:01 +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
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
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
Michael Terry
ea6b5b9e3c fix: guard access to course block children in outline tab data
In some cases the course blocks API was returning a dict without
a 'children' key, which was causing a traceback.

If the course blocks API has no children, that's IS a problem, but
still better than erroring out due to a KeyError.

AA-1267
2022-04-22 09:08:03 -04:00