Commit Graph

19 Commits

Author SHA1 Message Date
Ahtisham Shahid
62718f2ed3 fix: removed redundant unit update from task (#33017) 2023-08-16 19:33:13 +05:00
Muhammad Adeel Tajamul
4e5d3f9210 fix: update discussion enabled if true (#33008) 2023-08-15 14:27:15 +05:00
Muhammad Adeel Tajamul
a7f9770cc1 fix: set isPublish as True when creating topics in incontext discussion (#32953) 2023-08-10 13:23:08 +05:00
Ahtisham Shahid
fae6ece427 fix: added check for empty list in discussions settings task (#32105)
* fix: added check for empty list in discussions settings task
2023-04-25 12:44:26 +05:00
Ahtisham Shahid
bbcd3124a6 fix: added delay of 30sec to update_discussions_settings_from_course_task (#32038)
* fix: added delay of 30sec to update_discussions_settings_from_course_task

* fix: resolved linter issues
2023-04-07 15:09:04 +05:00
Ahtisham Shahid
0815d7a0cd fix: skip update_discussions_settings_from_course_task if rerun is not completed (#32036) 2023-04-06 18:30:45 +00:00
Ahtisham Shahid
906744e86b fix: added delay in topic creation task (#32008) 2023-03-30 14:57:31 +05:00
Ahtisham Shahid
87eedbc6c6 fix: resolved issue with topic creation in rerun (#31993) 2023-03-29 14:16:53 +05:00
Ahtisham Shahid
2bb71390e5 fix: resolved discussions data issue in course re-run (#31953)
* fix: resolved disucssions data issue in corse re-run

* fix: resolved linter issues

* refactor: added comment in task
2023-03-24 11:49:43 +05:00
Ahtisham Shahid
33dc8e1f21 feat: added user messages and backed now uses discussion_enabled flag (#31716)
* refactor: simplified tasks.py for discussions

* fix: do not create a topic for the unpublished unit

* feat: added user messages and backed now uses discussion_enabled flag

* fix: update default for discussion_enabled flag

* feat: removed redundant tests and fixes
2023-02-22 12:41:02 +05:00
Kshitij Sobti
de0b132f10 fix: delay creation of course topics after course publish (#31307)
When running in a sharded MongoDB setup it's possible that querying the
modulestore right after the course publish signal will not return the
latest data.

This commit adds a delay similar to the one used in other places in the
codebase for a similar reason.
2022-11-18 16:49:29 +05:00
Kshitij Sobti
4fc9eb8324 fix: Change approach to processing course topics (#31200)
Course topics are now created by traversing the entire course structure from top to bottom instead of starting at the sequential level and then moving up or down as needed.

This also introduces a lot of debug logs to pontetially find the reason why under some circumstances new units don't get processed and end up without a discussions topic.
2022-11-01 14:31:27 +05:00
Kshitij Sobti
346257dadf fix: discussion topic links not created in some cases (#31032)
This commit attempts to fix cases where dicussion topic links aren't created
during a provider change.

It does so by eliminating areas where there could be desynchronisation between
the configuration the course configuration in Mogo and the discussion config
in MySQL.

The topic creation code now uses the database version of the config which is
more recent.
2022-09-29 17:16:03 +05:00
Kshitij Sobti
a923cfc32e feat: Add mechanism to migrate discussion blocks to discussion flag (#30931)
The new mechanism for marking that a unit has discussions is to use the
discussion_enabled flag instead of adding a discussion block. This change
adds code that is run during the course rerun process to mark any existing
units that have a discussion block as discussible using the new mechanism.
It doesn't touch the existing discussion blocks.

If the new discussions configuration experience is globally enabled, this
will also switch from the legacy provider to the new provider. It analyses
the course for any discussion blocks that have been added to graded
subsections, and if that is the case, it also automatically enables
discussions in graded subsections (which are otherwise disabled for new
courses by default).
2022-09-19 16:56:50 +05:00
Kshitij Sobti
6ebc9b3888 feat: Track additional discussion context for better deletion handling (#30140)
Tracks a discussion topics' section and subsection in a new context field so that we have access to that information when the topic's section/subsection/unit has been deleted. This is then used when a topic is deleted to append the section and subsection name to the topic title.

ADR: https://github.com/openedx/edx-platform/pull/29928
2022-09-13 16:01:25 +05:00
Kshitij Sobti
3cd3c60b59 feat: enable unit-level control over discussions by default (#30903)
This PR changes the default behaviour of the discussions experience by making the previous "unit-level
visibility" the default mechanism for configuring discussions.

Prior to this PR, under the new discussions configuration experience, all units would automatically get
assigned a discussion topic and have discussions enabled for them (other than units in graded or exam
subsections). However, if authors wanted they could enabled a custom visibility mode which would allow
toggling discussions on or off on a per-unit level.

This PR makes this custom visibility mode the standard behaviour (and eventually, only behaviour)
and enables discussion for all units by default. This replicates the behaviour that already existed,
however, now gives authors control over disabling discussions for individual units by default.

It also removes the ability to disable discussions for all units (while still keeping course-wide
discussions) enabled.
2022-09-07 16:41:17 +05:00
Juan David Buitrago
860dfde5b2 refactor: modified the imports to use openedx-events library (#29930)
* refactor: modified the imports to use openedx-events library

* chore: upgrade openedx-events to latest version

* fix: ran isort to avoid style errors

Co-authored-by: Maria Grimaldi <maria.grimaldi@edunext.co>
2022-03-07 19:42:13 +05:00
Kshitij Sobti
2758301c31 feat: Discussion Topics API v2 [BD-38] [TNL-9332] [BB-5189] (#29530)
* feat: New API for discussion topics

Creates a new API for discussion topics that uses auto-crated discussion topic links for the new discussion provider.

* squash!: refresh migration
2022-01-31 15:57:49 +05:00
Kshitij Sobti
285e2c4f29 feat: Adds a new discussion topic configuration mechanism [BD-38] [TNL-8623] [BB-4968] (#29082)
* feat: Adds a new discussion topic configuration mechanism

The new discussion configuration system links discussion topics directly to the course structure. This change adds a new task that sends a discussion update signal if there are any changes to the course. This signal includes all the context needed to update the configuration of the course.

The handler for this new event will create a new entry for each unit that needs a topic in the database. In the future this will be used to see the topics in the course.

* fix: add support for marking a provider as supporting LTI

* fix: review feedback
2021-11-12 19:08:43 +05:00