Commit Graph

24151 Commits

Author SHA1 Message Date
Shahbaz Shabbir
ee6f3164c3 feat: add course enrollment email task (#31241) 2022-11-18 17:25:52 +05:00
SaadYousaf
c0631c320e fix: legacy coverage and add missing properties for reported events 2022-11-17 13:03:47 +05:00
0x29a
010ecb354a refactor: remove lms/djangoapps/debug/management directory
It contained only one management command, "dump_xml_courses", which
didn't work since the late 2015.
2022-11-16 13:08:22 +01:00
0x29a
d6c6a44ed5 refactor: remove prefer_xmodules
This function is no longer needed as all XModules have been converted to XBlocks.

XBLOCK_SELECT_FUNCTION Django setting is removed too, as it could take only `prefer_xmodules` or `default_select` values.
2022-11-16 13:08:22 +01:00
Zainab Amir
9f5596c0af feat: remove testing logs (#31297) 2022-11-16 14:00:15 +05:00
Alejandro Cardenas
bfd212b6d8 [FC-005] feat: add necessary models for Openedx survey report (#31183)
* feat: add survey_report djangoapp
* feat: add survey report cli command and query methods
* fix: add init file
* refactor: change model fields
* refactor: rename application file and rename methods
* refactor: add is_active to get course enrollments
* refactor: rename method to get active users
* refactor: remove fields useless
* test: rename mocks in command tests
* test: update test name
* docs: add README file
* docs: add selection criteria to get unique courses
* docs: update README
* test: remove useless mocks and use default modulestore
* docs: change command error message
* docs: add docs decisions
* docs: Update openedx/features/survey_report/management/commands/generate_report.py
* docs: add fields descriptions
* docs: add logs for each query
* style: add blank lines
* refactor: rename variables and add a constant for weeks
* refactor: add constant MIN_ENROLLS_ACTIVE_COURSE


Co-authored-by: henrrypg <henrry.pulgarin@edunext.co>
Co-authored-by: David Ormsbee <dave@tcril.org>
Co-authored-by: Maria Grimaldi <maria.grimaldi@edunext.co>
2022-11-15 17:47:21 -05:00
Piotr Surowiec
f419d6b194 feat: deprecate track_function and publish in ModuleSystem [BD-13] (#30046)
* feat: delete `track_function` from ModuleSystem

* feat: delete `publish` argument from ModuleSystem
2022-11-15 10:46:24 -05:00
Nathan Sprenkle
5aea84f1df fix: learner home anon user status fix (#31291)
* fix: add missing permission/auth classes to init

* fix: add missing permission class

Django was complaining about adding JWT auth without the
NotJwtRestrictedApplication class which it would add automatically. Add
the class to remove that warning.

* style: use black / isort to fix import ordering
2022-11-14 14:48:10 -05:00
Mehak Nasir
b6ee28310e feat: added not responded filter for fetch thread list api (#31275) 2022-11-11 14:56:01 +05:00
Mubbshar Anwar
994a359f20 revert: revert redesign enrollment email (#31272)
- revert changes of redesign course enrollment email PR.

VAN-1157
2022-11-10 12:10:43 +05:00
Syed Sajjad Hussain Shah
e76e0c4a07 fix: remove hotjar event code [VAN-1074] (#31269) 2022-11-09 14:31:35 +05:00
Zainab Amir
4b5f4f1eff feat: add serializer for recommendations api (#31270) 2022-11-08 17:05:28 -05:00
Jansen Kantor
c281f32595 fix: allow inactive users access to the teams dashboard and api (#31266)
* fix: allow inactive users access to the teams dashboard and api

* style: quality
2022-11-08 15:31:42 -05:00
Jeff Cohen
ff0c1d57da fix: only create one StudentModuleHistory record per request (#31262)
When a student submits a problem answer, the state is stored in a
StudentModule record containing answer, score, correctness, etc. The
record, though, is updated in multiple steps within the single request
(first the grade is updated, then the state is updated separately).
Each partial save would trigger a separate StudentModuleHistory record
to be stored resulting in duplicate and inaccurate historical records.

This solution uses the RequestCache to track within a request thread
which StudentModules are updated and a single corresponding
StudentModuleHistory id. If multiple update actions occur within the
request cycle, then modify the history record that was already
generated to ensure that each submission only results in one
StudentModuleHistory record.

This issue and its solution were discussed in:

  https://discuss.openedx.org/t/extra-history-record-stored-on-each-problem-submission/8081
2022-11-08 10:32:08 -05:00
Jeff Cohen
f03b141f05 fix: do not clear request cache when running eager Celery tasks (#31261)
Clearing the RequestCache was intended to address memory leaks in the
celery workers. Celery worker processes will process many tasks before
they are terminated. RequestCache cleanup typically happens in the
RequestCacheMiddleware class, and middleware never executes for celery.
To get around that issue, the CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION
setting was created to clear the RequestCache after every task was
successfully completed.

This works fine when celery is running as a separate process, as it's
set up to do in production. But during development, the
CELERY_ALWAYS_EAGER setting variable is set to True, meaning that
celery tasks are run in the same thread as the Django Request. This is
meant to make debugging easier, as task failures run as part of the
request cycle and will raise exceptions that are visible to the
browser.

However, celery tasks are triggered from many different actions. That
means that the RequestCache was being cleared many times during the
course of processing a request. This led to behavior that was
potentially slower, but also incorrect–the RequestCache was getting
flushed in a way that wouldn't happen in any deployed environment
because celery would be running in separate processes there. This came
up when trying to fix an issue around extra history records being
created during problem submissions:

  https://discuss.openedx.org/t/extra-history-record-stored-on-each-problem-submission/8081

Furthermore, it's not necessary to prevent RequestCache memory leaks
when running in CELERY_AWLAYS_EAGER mode in development because the
middleware cleanup happens automatically–as everything is running as
part of the request/response cycle.

There are times in which we may want to run celery eagerly and still
clear the cache, such as testing. I have set
CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION = False in all dev and test
environments that already have CELERY_ALWAYS_EAGER = True. The unit
test that specifically tests whether the request cache is getting
cleared upon completion of a celery task then overrides
CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION = True even though
CELERY_ALWAYS_EAGER = True for the sake of that specific testing
purpose.
2022-11-07 11:48:39 -05:00
Zainab Amir
6a89635aa4 feat: update recommendations api (#31259)
- updated status codes
- for control group return general recommendations

VAN-1154
2022-11-07 15:20:01 +05:00
Muhammad Adeel Tajamul
06ac5ed4b0 feat: added sort by recent activity for activity stats api (#31252)
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
2022-11-07 11:15:01 +05:00
Jenkins
23f49f4607 chore(i18n): update translations 2022-11-06 15:58:01 -05:00
Zia Fazal
1fd80d5f83 Merge pull request #30589 from openedx/ziafazal/fix-broken-hidden-content-transformer
fix: Fixed broken HiddenContentTransformer when course pacing is self_pace
2022-11-04 10:04:04 +05:00
Nathan Sprenkle
5e7432129f feat: implement missing audit access expired check (#31249) 2022-11-03 13:24:59 -04:00
Jansen Kantor
3adf5eb929 fix: remove unused url from backend response (#31244) 2022-11-03 09:57:17 -04:00
zia.fazal@arbisoft.com
400296ba78 fix: Fixed broken HiddenContentTransformer when course pacing is self_paced. see commit 1ebe0e6 too 2022-11-03 18:44:39 +05:00
Muhammad Adeel Tajamul
1a25a5d3fd feat: added post filters in learners tab api (#31191)
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
2022-11-03 16:53:50 +05:00
Zia Fazal
503f576678 Merge pull request #30823 from openedx/ziafazal/fix-broken-hidden-content-transformer-a
fix: Fixed broken HiddenContentTransformer when course pacing is self_paced
2022-11-03 12:06:46 +05:00
Nathan Sprenkle
178f1541d7 refactor: learner home cleanup (#31240)
* refactor: remove dev logging

* style: run black

* refactor: move masquerade check into utils

* style: remove unnecessary assignment

* style: update dependency orderings

* refactor: add function tracing for perf testing

* refactor: move grade data fetching out of serializer

This allows us to separately profile the collection of grade data

* fix: add missing requires_context metadata

* refactor: split out serialization for profiling
2022-11-02 14:55:03 -04:00
Nathan Sprenkle
bfe6494e9d fix: get audit expiration from correct data source (#31238) 2022-11-01 13:40:02 -04:00
SaadYousaf
17df3d4e17 feat: add discussion reported and unreported events 2022-11-01 15:57:13 +05:00
edx-transifex-bot
4b7eef2ea4 chore(i18n): update translations (#31231)
Co-authored-by: Jenkins <sre+jenkins@edx.org>
Co-authored-by: Tim McCormack <tmccormack@edx.org>
2022-10-31 15:55:09 +00:00
Syed Sajjad Hussain Shah
02568f94dc feat: create new waffle flag for learner home recommendations [VAN-1138] (#31225) 2022-10-31 10:58:02 +05:00
Sagirov Eugeniy
8f88422c4a test: prepare tests for removing support for children in Old Mongo 2022-10-28 11:43:20 -04:00
SaadYousaf
f6870f7ae7 refactor: remove todo to add tracking for reported content email notification 2022-10-28 19:10:58 +05:00
Nathan Sprenkle
64403a4c16 refactor: course resume URL speed enhancements (#31222)
* refactor: remove resume url checks for performance

Existing "get resume urls" loads the course structure to verify the last
completed block actually exists. This is a potentially very expensive
operation, especially for users with many enrollments. This isn't a huge
issue since Learning MFE already has a fallback behavior for this case.

* refactor: remove now-unnecessary serializer check

Old behavior passed an empty string for missing resume URL and
serializer would cast to None. Instead, update simply passes through
None for missing resume url

* style: update dependency ordering

* style: run black on some more files
2022-10-27 16:10:50 -04:00
alangsto
1d21277192 feat: update docker production log settings (#31217) 2022-10-27 14:06:25 -04:00
Nathan Sprenkle
98678536d6 feat: add timers / logs for for profiling learner home (#31210)
* feat: added timer func for profiling learner home

Also involved proxying some imported functions to be able to time.
2022-10-27 10:16:01 -04:00
Usama Sadiq
4734f9f16e fix: bump pylint version (#31084) 2022-10-27 12:19:09 +05:00
Varsha Menon
c4b2c49ab6 feat: show exam info in course outline 2022-10-26 14:28:27 +00:00
Nathan Sprenkle
32733e43cc temp: added debug logging to init view (#31204)
Also involved reordering some code into more logical groupings.
2022-10-25 16:21:48 -04:00
Sagirov Eugeniy
3f3d0d25d8 feat!: Remove inheritance-related code from Old Mongo 2022-10-24 11:58:44 -04:00
Jenkins
d4fab3baaf chore(i18n): update translations 2022-10-24 10:44:58 -04:00
Jansen Kantor
4cd92ec12b fix: remove psudosessioncourseserializer as we now have access to courseoverviews (#31187) 2022-10-21 10:08:14 -04:00
muhammad-ammar
33e822aaff chore: upgrade edx-enterprise to 3.58.0
Add a new endpoint to generate a signed token for plotly analytics.
2022-10-21 15:47:43 +05:00
Kristin Aoki
c20aa28c2f fix: video captions skip to end and skip to start 2022-10-20 11:58:17 -04:00
Leangseu Kim
602fef2954 feat: add rollout waffle flag for leaner_home_mfe
Create flag learner_home_mfe.enabled

chore: update requested change
2022-10-20 10:54:02 -04:00
Jenkins
02e739d3df chore(i18n): update translations 2022-10-19 12:50:43 -04:00
Nathan Sprenkle
53b9f4a3a1 feat: learner home social share settings (#31147)
* feat: add social share settings

* docs: add social share settings to mock

* feat: add social brand

* test: added tests for social share settings

Co-authored-by: jansenk <jkantor@edx.org>
2022-10-19 10:11:38 -04:00
SaadYousaf
c79c41e0a3 fix: filter out discussion topics that have not started yet for instructor paced courses 2022-10-13 23:15:46 +05:00
Ahtisham Shahid
c2696c07fc fix: updated topic sorting for discussions MFE (#31124)
* fix: updated topic sorting for discussions MFE

* feat: updated topic sorting test case
2022-10-13 15:09:19 +05:00
Sagirov Evgeniy
265ddc426e feat!: raise 404 for old mongo course pages (#31125)
LMS Courseware access to Old Mongo courses was already removed in
fc8601de (https://github.com/openedx/edx-platform/pull/30172). This
commit makes direct links to the other tabs (progress, instructor
dashboard, discussion, static tabs) fail with a 404 error on Old
Mongo courses.

Upcoming work to remove parent/child relationships from the Old
Mongo Modulestore would have broken these pages anyway.
2022-10-12 10:44:04 -04:00
Demid
062a760242 feat: add "count_flagged" query param to the learner thread endpoint (#31048) 2022-10-12 16:41:06 +05:00
Muhammad Adeel Tajamul
c758291ebd fix: removed switch experience bar from legacy (#31138)
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
2022-10-12 12:00:32 +05:00