Commit Graph

181 Commits

Author SHA1 Message Date
andrey-canon
3eab7ea27f feat: add site-aware unit test 2025-01-23 18:23:49 -05:00
andrey-canon
fd74df3857 feat: filter by current site organizations 2025-01-21 16:21:38 -05:00
KyryloKireiev
e868888f54 refactor: [AXM-549] Use course keys instead ids 2024-10-30 17:55:31 +02:00
KyryloKireiev
bc71be4811 feat: [AXM-549] Add query limit to User Enrollments 2024-10-24 13:15:36 +03:00
KyryloKireiev
bf073fb68c refactor: [AXM-549] Change enrollments status API field name 2024-10-17 18:06:03 +03:00
KyryloKireiev
1eec8b80e4 fix: [AXM-549] Use more efficient query 2024-10-08 17:47:43 +03:00
Glib Glugovskiy
4b4fa5f162 Merge branch 'master' into kireiev/AXM-549/feat/upstream_PR_active_inactive_courses_API 2024-08-05 20:27:17 +03:00
Kyrylo Kireiev
53174178f3 feat: [FC-0047] Extend mobile API with course progress and primary courses on dashboard view (#34848)
* feat: [AXM-24] Update structure for course enrollments API (#2515)
---------
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)
---------
Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>

* feat: [AXM-297] Add progress to assignments in BlocksInfoInCourseView API (#2546)
---------
Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>
2024-07-10 20:07:41 +05:00
KyryloKireiev
1a7f55b01e refactor: [AXM-549] Refactor UserEnrollmentsStatus API 2024-06-21 19:37:02 +03:00
KyryloKireiev
e474abda4f style: [AXM-549] Remove unused import 2024-06-21 19:37:02 +03:00
KyryloKireiev
bd8b35d0d8 fix: [AXM-549] Added missing import 2024-06-21 19:37:02 +03:00
Kyrylo Kireiev
0d0503a716 feat: [AXM-200] Implement user's enrolments status API (#2530)
* feat: [AXM-24] Update structure for course enrollments API (#2515)

* feat: [AXM-24] Update structure for course enrollments API

* style: [AXM-24] Improve code style

* fix: [AXM-24] Fix student's latest enrollment filter

* feat: [AXM-47] Add course_status field to primary object (#2517)

* feat: [AXM-40] add courses progress to enrollment endpoint (#2519)

* fix: workaround for staticcollection introduced in e40a01c

* feat: [AXM-40] add courses progress to enrollment endpoint

* refactor: [AXM-40] add caching to improve performance

* refactor: [AXM-40] add progress only for primary course

* refactor: [AXM-40] refactor enrollment caching optimization

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)

* feat: [AXM-53] add assertions for primary course

* test: [AXM-53] fix tests

* style: [AXM-53] change future_assignment default value to None

* refactor: [AXM-53] add some optimization for assignments collecting

* feat: [AXM-200] Implement user's enrolments status API

* style: [AXM-200] Improve code style

* refactor: [AXM-200] Divide get method into smaller methods

---------

Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
2024-06-21 19:37:02 +03:00
jawad khan
79d692dc92 feat: Add course price in mobile enrollment api (#34255)
* feat: Add course price in mobile enrollment api
2024-02-19 20:49:33 +05:00
Muhammad Adeel Tajamul
cf6a629ee7 fix: discussion tab should be None if discussion tab is disabled (#33861) 2023-12-11 15:06:37 +05:00
Glib Glugovskiy
3da85a994e fix: remove trailing whitespace failing quality check 2023-11-20 23:08:56 +02:00
Glib Glugovskiy
95fcb124dd docs: add docstring for the paginator property override 2023-11-20 22:40:28 +02:00
KyryloKireiev
ee4b92ca10 feat: [AXIM-6] Add DefaultPagination for UserCourseEnrollmentsList v3 2023-11-20 22:40:28 +02:00
Moeez Zahid
7ae64a5eb4 refactor: Add logging to mobile_api app (#33064) 2023-08-23 16:20:20 +05:00
Pooja Kulkarni
c452fb3204 refactor: rename descriptor -> block within lms/djangoapps/mobile_api
Co-authored-by: Agrendalath <piotr@surowiec.it>
2023-04-26 17:10:54 +02:00
Moeez Zahid
c8af0f607f Enable In-App purchases on edx-mobile app (#31512)
* feat: added mobile skus in course mode

* fix: changed api

---------

Co-authored-by: jawad-khan <jawadkhan444@gmail.com>
Co-authored-by: Robert Raposa <rraposa@edx.org>
2023-02-10 16:16:37 +05:00
0x29a
fd191db332 refactor: rename module (or item) -> block within remaining lms
Also, removed `_iter_scorable_xmodules` method from `lms/djangoapps/grades/transformer.py` file.
2023-01-30 18:15:23 +01:00
0x29a
9d8375ff99 refactor: rename module -> block within lms/djangoapps/courseware
Also, removed unused `_has_access_xmodule` methid from `lms/djangoapps/courseware/access.py`.
2023-01-30 18:15:22 +01:00
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
0x29a
83396ffb07 refactor: convert course_module term to course_block 2022-12-19 17:48:49 +01:00
0x29a
0df1411636 refactor: xmodule/course_module.py -> xmodule/course_block.py 2022-12-19 17:48:49 +01:00
Agrendalath
4141fbfda9 test: fix TestCourseStatusGET
This test stopped throwing the `TransactionManagementError` once we added the
`site_configuration.get_value()` call to the language preferences middleware.
2022-12-08 13:49:20 +01:00
jawad khan
4f74d8a16a feat: added mobile configs in enrollments api (#31036)
* feat: added mobile configs in enrollments api

Mobile team needs some cnfigs after user has logged in, enrollment api seems to be the best place
to put this data. They can change these flags or values from admin side.
LEARNER-9039
2022-09-26 14:27:23 +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
Jawayria
0d63afe840 chore: Applied lint-amnesty on lms/djangoapps (#29394) 2021-12-21 13:36:39 +05:00
M. Zulqarnain
b84b862cc0 feat: Django codemods on LMS (3) (#28853) 2021-11-16 18:27:21 +05:00
jawad khan
ad2f92767b fix: fixed atmoic block error in course_status_info
* fix: fixed atmoic block error in course_status_info

We are getting "An error occurred in the current transaction. You cant execute queries until the end of the atomic block."
error in get course status info on both versions i.e. 0.5 and 1. I was unable to reproduce it locally. But by looking
in django documentation and some other online helps I concluded that it might be because of some db intefrity error
that we didnt handle properly and now the cursor is broken for this transaction. Therefore i am making it non atomic
transaction. Since its a get request we can make transactions run independentantly.

LEARNER-8267
2021-06-17 07:26:11 +05:00
Christie Rice
97f6d0fce8 test: Remove external tests that exercise the internal certificates code. Update tests in preparation for enabling V2 of course certificates globally. (#27881)
MICROBA-1082
2021-06-08 15:29:05 -04:00
Albert (AJ) St. Aubin
c37e88fdbf refactor: Move CertificateStatuses to data.py file per OEP-49
[MICROBA-678]

To allow access to CertificateStatuses constants in other Django apps we are moving the
CertificateStatuses enum to data.py per OEP-49.
2021-06-08 08:56:21 -04:00
Usama Sadiq
3ff951940d refactor: pyupgrade second iteration 2021-05-03 14:55:37 +05:00
Michael Terry
74887aa216 feat: turn on schedule creation by default
This commit removes several waffle toggles that have been enabled
on edx.org for years. It's time to remove the rollout gating for
these features and enable them by default.

This doesn't directly change any behavior. But it does create new
database objects by default now and allows for enabling other
schedule based features more easily.

Specifically, the following toggles were affected.

schedules.create_schedules_for_course
- Waffle flag removed as always-enabled
- We now always create a schedule when an enrollment is created

schedules.send_updates_for_course
- Waffle flag removed as always-enabled
- Course update emails are sent as long as the ScheduleConfig
  allows it.
- This is not a change in default behavior, because ScheduleConfig
  is off by default.

dynamic_pacing.studio_course_update
- Waffle switch removed as always-enabled
- Course teams can now always edit course updates directly in Studio

ScheduleConfig.create_schedules
ScheduleConfig.hold_back_ratio
- Model fields for rolling out the schedules feature
- Schedules are now always created
- This commit only removes references to these fields, they still
  exist in the database. A future commit will remove them entirely

This commit also adds a new has_highlights field to CourseOverview.
This is used to cache whether a course has highlights, used to
decide which course update email behavior they get. Previously every
enrollment had to dig into the modulestore to determine that.
2021-02-23 12:34:02 -05:00
usamasadiq
dc36d0bfe8 Ran pyupgrade on lms/djangoapps
Ran pyupgrade on lms/djangoapps/mailing
Ran pyupgrade on lms/djangoapps/mobile_api
Ran pyupgrade on lms/djangoapps/monitoring
2021-02-19 17:47:37 +05:00
Aarif
87fbbc7f3b replaced unittest assertions pytest assertions (#26547) 2021-02-19 12:36:28 +05:00
Awais Qureshi
07599e930c BOM-2284
Apply pylint-amnesty.
2021-02-02 11:37:56 +05:00
jawad khan
cb6f348959 LEARNER-8194
LEARNER-8194
Added self paced in mobile api enrolment api
2021-01-28 13:49:05 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
jawad khan
04640bde1e Get last visited block id as user staus with version v1 (#25498)
Get last visited block id as user staus with version v1
VAN-85
2020-11-06 21:57:03 +05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Michael Terry
a4bd5a7ec9 AA-197: Provide cert upgrade info to learning MFE
Specifically, pass the MFE the audit access expiration date and
let it know when the upgrade deadline has passed, by not passing
any verified mode information along.
2020-10-27 09:05:12 -04:00
uzairr
fb9ba90efe PROD-1236: Do not expose user id with certificate URL. 2020-07-17 22:59:34 +05:00
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04:00
Calen Pennington
fc21a337aa Use a fixed time for course duration limits, so that schedule extensions don't extend FBE duration limits 2020-05-26 16:29:28 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Abdul Hannan
fa6633ba4e DO NOT MERGE - NEED FAKE - Rename start in schedule 5/5 (#22392)
* Remove start field in Schedules

Co-authored-by: hunytalk <ahannan@edx.org>
Co-authored-by: Cory Lee <cory@edx.org>
2020-03-12 15:40:19 -04:00
julianajlk
f46458fbfe Add dynamic_upgrade_deadline date to mobile API (#22953)
REV-1092
2020-01-28 15:24:50 -05:00
hunytalk
73aae081c3 Remove null, blank from start field in Schedules 2020-01-22 18:10:33 +05:00