Commit Graph

6980 Commits

Author SHA1 Message Date
salman2013
42ca0ddec4 chore: remove bok choy settings 2023-09-27 10:58:37 +05:00
Muhammad Adeel Tajamul
8c9232ace9 feat: updated notification admin (#33320) 2023-09-25 11:14:32 +05:00
Emily Rosario-Aquin
be9a97a617 Merge branch 'master' into ea/ent-7453 2023-09-21 14:04:28 -05:00
Rômulo Penido
e45460a2ce refactor: Move content_tagging django app so that CMS-only tests run (#33259) 2023-09-21 12:01:20 -07:00
Emily Aquin
98721ec551 chore: remove lms_enroll_user_in_course 2023-09-21 18:18:35 +00:00
Dmytro
f81b64f415 fix: get registration fields from site configuration (#33165)
Co-authored-by: Edward Zarecor <ezarecor@tcril.org>
Co-authored-by: Zainab Amir <zainab.amir@arbisoft.com>
2023-09-21 13:57:30 +05:00
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
Rômulo Penido
3c3306ce85 feat: implement tag object rest api in cms (#33181) 2023-09-18 11:07:00 -07:00
Tim McCormack
25b18e83cd build: Add missing Celery task decorators, and add CI check for it (#33154) 2023-09-15 20:03:04 +00:00
María Fernanda Magallanes
76dbcdee6f feat: CourseEnrollmentAllowed API (#33059) 2023-09-15 11:43:59 -07:00
María Fernanda Magallanes
cddfc02fbc feat: add email support to the enrollment post and get methods (#33006) 2023-09-15 11:43:14 -07:00
Yusuf Musleh
0d15ca7240 fix: Escape CDATA special char on xblock serialize (#33239)
This fixes a bug in xblock serialization when trying to copy a
unit/component that contains an HTML xblock with the characters "]]>"
which is a special character in CDATA.
2023-09-15 08:58:23 -07:00
Tim McCormack
eeb35733bb fix: Update cors_csrf middleware for Django 4.0 (#33262)
Remove use of Django's `CSRF_COOKIE_USED`, which is no longer leaked
outside of the dynamic scope of the Django csrf middleware as of Django
4.0. Specifically, https://github.com/django/django/pull/14688 replaced
that META entry and a request attribute with a single META entry
`CSRF_COOKIE_NEEDS_UPDATE`, which is then set back to False once the CSRF
cookie is set by the middleware's process_response.

We'll send the cross-domain cookie if the decorator requests it and the
value is present, regardless of whether the same-domain cookie would have
been sent. (And we'll still *set* `CSRF_COOKIE_NEEDS_UPDATE` to ensure that
a cookie gets generated.)

See https://github.com/openedx/edx-platform/issues/33207
2023-09-15 14:34:25 +00:00
Kyle McCormick
265701c01d feat!: remove library_sourced block (#33257)
Originally, we planned to add support for V2 libraries and for static
(hand-selected) library block reference via new block type: library_sourced.

We have since decided that it would be better to add those capabilities
in-place to the existing library_content block. This will ease V1->V2
library migration and make adoption of the new features easier for current
library users. It will also avoid duplication of logic between two block types,
we we fear would be error-prone. For details, see this ADR:
 https://github.com/openedx/edx-platform/pull/33231

So, we are removing the library_sourced block.
This block has existed in edx-platform for a few years now, but was not
enabled by default and never officially supported. It was only usable via the
experimental V2 content library feature. Operators who added library_sourced
blocks to their course will now see them render as `HiddenBlock` instances, i.e.:

> ERROR: "library_sourced" is an unknown component type...

This should not impact other component types in such courses and should not
impact import/export.
2023-09-15 10:04:38 -04:00
Ahtisham Shahid
202e79093c fix: Integraty error in enrollments api (#33265) 2023-09-15 17:41:20 +05:00
Muhammad Adeel Tajamul
5fcad886cb fix: notification tray icon was not visible to non-verified users (#33247) 2023-09-15 16:14:24 +05:00
Ahtisham Shahid
6ff8e42bba fix: removed user object from logs (#33264) 2023-09-15 07:44:26 +00: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
Ahtisham Shahid
90ca72a34e chore: added log to track changes in user notification pref (#33237)
* chore: added log to track changes in user notification pref
2023-09-14 13:31:00 +05:00
Yusuf Musleh
ee1b6b8a6d fix: Copy/Paste unit with python_lib.zip (#33164)
This fixes the issue when pasting a copied unit that contains
python_lib.zip file into another course. The python_lib.zip file was not
being correctly copied over to the new course's Files & Uploads page.
2023-09-13 12:22:55 -07:00
Kristin Aoki
f9c1af775c feat: change problem default display name (#33240) 2023-09-13 11:08:48 -04:00
Irtaza Akram
4191a37303 fix: expected query count django 4.2 (#33235) 2023-09-13 13:05:40 +05:00
SaadYousaf
ca9b008a46 fix: fix notification generated event to include only users with preferences enabled. 2023-09-11 17:19:54 +05:00
Awais Qureshi
26bf329eb7 [django42] sha1 is removed in django42 version. (#33129)
* fix: fixing django42 issue. sha1 is removed in 42 version.
2023-09-11 15:30:42 +05:00
SaadYousaf
d4fbc3037c fix: make updates to notification related events 2023-09-11 11:49:40 +05:00
connorhaugh
e788143564 test: remove flaky libraries asset test (#33195) 2023-09-07 17:20:20 +00:00
Artur Gaspar
7da99848a7 fix: edxnotes visibility in courseware and courseware API (#33096)
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.
2023-09-07 17:59:51 +02:00
Muhammad Adeel Tajamul
e524af5c7c feat: added notification_expiry_days in notification count api (#33187) 2023-09-07 13:54:54 +05:00
Sagirov Evgeniy
c5d1807c81 feat!: remove most Old Mongo functionality (#31134)
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.
2023-09-06 10:01:31 -04:00
SaadYousaf
8742edbf7a fix: fix course_key param for generated notification event 2023-09-06 17:22:45 +05:00
Syed Sajjad Hussain Shah
377c0bf79b fix: registration extra fields response (#33183) 2023-09-06 13:56:03 +05:00
Tim McCormack
f39b01c4b1 fix: Add missing code-owner decorators for Celery (#33172) 2023-09-05 15:16:14 +00:00
Feanil Patel
9f5052315a Merge pull request #33156 from openedx/feanil/cleanup_some_warnings
fix: Don't set default_app_config.
2023-09-05 09:22:37 -04:00
Ahtisham Shahid
aec8fcd559 fix: use disabled as default for posting_restrictions (#33159) 2023-09-05 15:44:10 +05:00
SaadYousaf
afbd680a33 fix: move notification generation event within task 2023-09-05 13:48:17 +05:00
Feanil Patel
8691aa78e1 fix: Don't set default_app_config.
From the warning: Django now detects this configuration automatically.
You can remove default_app_config.

This also removes two warnings from shell startup.
2023-09-01 14:41:34 -04:00
Rômulo Penido
6e28ba329e feat: add language auto-tagging with feature flag (#32907) 2023-09-01 11:09:46 -07:00
Paulo Viadanna
26d8c2166d feat: implements SHOW_REGISTRATION_LINKS feature toggle
(cherry picked from commit 3025ab5fe6f6f53d6af5b36681355efafa37c74b)
2023-09-01 15:06:40 +02:00
SaadYousaf
376135ca73 fix: fix notification generated event, and add notification tray opened event 2023-09-01 14:32:51 +05:00
Muhammad Adeel Tajamul
96f7e9cd9a fix: handle new_comment notification edge case (#33088) 2023-08-31 16:33:20 +05:00
Muhammad Adeel Tajamul
c1b28c35f8 feat: make notification type info translateable (#33071) 2023-08-31 15:20:06 +05:00
Muhammad Adeel Tajamul
4efd54a3fd feat: added new_question_post and new_discussion_post notification (#33043) 2023-08-31 14:29:21 +05:00
Braden MacDonald
a013c08ae6 fix: incorrect type hints in a few places (#33104) 2023-08-28 10:34:08 -07:00
Kira Miller
776f4bf94e feat: adding unenrollments to event bus (#33085)
* feat: adding unenrollments to event bus

* fix: quality fixes

* fix: tweaks to pass tests

* fix: more tweaks for testing

---------

Co-authored-by: John Nagro <jnagro@edx.org>
2023-08-28 09:08:49 -06:00
Dmytro
fc90c852b2 fix: TypeError during student.send_activation_email task (#32623)
Co-authored-by: Edward Zarecor <ezarecor@tcril.org>
2023-08-28 11:21:07 +05:00
Rômulo Penido
ecc4a0d53d feat: add taxonomies for org api (#32871)
* feat: add taxonomies for org api

* chore: run CI

* feat: Add retrieve object_tags REST API (#577)

* chore: update requirements

---------

Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
2023-08-24 10:32:07 -07:00
irtazaakram
9562bdf5eb fix: requires_system_checks deprecation warning 2023-08-24 10:29:35 +05:00
Zainab Amir
45fd0b57cf feat: add user details to registration response (#33078) 2023-08-23 11:45:43 +05:00
Feanil Patel
5960840f51 Merge pull request #32496 from ManpraXSoftware/edx-depr31
feat: BLOCK_STRUCTURES_SETTINGS['PRUNING_ACTIVE'] toggle removed depr31
2023-08-22 12:58:02 -04:00
Eugene Dyudyunov
4340a832f7 Add the default enrollment start date on course creation (#30954)
* fix: main page course listing

The course is visible on the main page right after creation when the feature toggle `CREATE_COURSE_WITH_DEFAULT_ENROLLMENT_START_DATE` is on.

So anonymous users can see them and access the course about page
for the courses without valid data (e.g. they will see the default
course overview)

When courses list filtering is processed it checks the `see_exists`
permission for the anonymous user.
Actually, `see_exists` means `can_load` OR `can_enroll`.

`can_load` is False in our case because the course start in the future.

But `can_enroll` returns True because the course's enrollment_start
and enrollment_end dates are blank:
```
enrollment_start = courselike.enrollment_start or datetime.min.replace(tzinfo=UTC)
enrollment_end = courselike.enrollment_end or datetime.max.replace(tzinfo=UTC)
if enrollment_start < now < enrollment_end:
    debug("Allow: in enrollment period")
    return ACCESS_GRANTED
```

Set the enrollment_start the same as a course start by default
2023-08-22 10:42:19 -04:00