Commit Graph

102 Commits

Author SHA1 Message Date
Muhammad Adeel Tajamul
f8bf592483 fix: added course_id in email sent event (#35422) 2024-09-05 15:01:43 +05: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
Awais Qureshi
4da29d914d chore: adding migrations related with django-history. (#32935) 2023-08-08 16:04:06 +05:00
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
Andy Shultz
f2f71516bc fix: when making a hasty exit from goals, make sure to get the log out 2022-12-20 09:22:48 -05:00
Andy Shultz
646c5c7fbd fix: mail goals during the whole day, not just the morning
Goal mail jobs can easily take 4 hours to run and sometimes
fail. Restricting the allowable mail window to three morning hours
only means many goal mails will be missed.

Extend the window to the whole day so that mails are actually sent. It
will still prefer to send mail in the morning because that is the
first time it could encounter the goal and it will mark it as sent
afterwards.
2022-12-13 15:42:12 -05:00
Andy Shultz
0de55deff5 fix: intial chatty goals is a bit too chatty
it takes 20-30s to run through 1000 goals so this logs too often to
read in splunk. Every 10000 will be every few minutes.
2022-12-07 09:40:39 -05:00
Andy Shultz
08ead3ba01 fix: course goals email command logs more progress info 2022-12-06 10:56:25 -05:00
Andy Shultz
85ca6ad5ec fix: catch even base exceptions when exiting
prior exception catch is not triggering in cases where the job blows up,
there is one more level of exception available to catch and print
2022-12-05 10:41:17 -05:00
Andy Shultz
5ff9b73da3 fix: wrap course goals email handle to report on errors
currently this is failing many runs but the exception information is
lost at some higher level. Report on it immediately.
2022-11-30 10:55:02 -05:00
Andy Shultz
686b586ab1 fix: after failing to get course, stop trying to make a course message
we were failing to get the course and then going on to try course.field
which would generate a worse exception

also wraps the email send in an exception absorb because a single email
can fail to send for infinitely many boring reasons
2022-11-18 15:56:38 -05:00
Michael Terry
ce5f1bb343 feat!: drop legacy course home view and related code
This was the "outline tab" view of the course. Preceded by the
course info view, succeeded by the MFE outline tab.

In addition to the course home view itself, this drops related
features:
- Legacy version of Course Goals (MFE has a newer implementation)
- Course home in-course search (MFE has no search)

The old course info view and course about views survive for now.

This also drops a few now-unused feature toggles:
- course_experience.latest_update
- course_experience.show_upgrade_msg_on_course_home
- course_experience.upgrade_deadline_message
- course_home.course_home_use_legacy_frontend

With this change, just the progress and courseware tabs are still
supported in legacy form, if you opt-in with waffle flags. The
outline and dates tabs are offered only by the MFE.

AA-798

(This is identical to previous commit be5c1a6, just reintroduced
now that the e2e tests have been fixed)
2022-04-14 15:18:31 -04:00
Michael Terry
a515c2e992 Revert "Drop legacy outline tab in favor of the MFE's version" 2022-04-14 14:16:29 -04:00
Michael Terry
be5c1a64d5 feat!: drop legacy course home view and related code
This was the "outline tab" view of the course. Preceded by the
course info view, succeeded by the MFE outline tab.

In addition to the course home view itself, this drops related
features:
- Legacy version of Course Goals (MFE has a newer implementation)
- Course home in-course search (MFE has no search)

The old course info view and course about views survive for now.

This also drops a few now-unused feature toggles:
- course_experience.latest_update
- course_experience.show_upgrade_msg_on_course_home
- course_experience.upgrade_deadline_message
- course_home.course_home_use_legacy_frontend

With this change, just the progress and courseware tabs are still
supported in legacy form, if you opt-in with waffle flags. The
outline and dates tabs are offered only by the MFE.

AA-798
2022-04-14 09:12:01 -04: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
Chris Deery
dddcadb706 feat: [AA-922] remove deprecated Goals backend (#29705)
* feat: [AA-922] remove deprecated Goals backend

While the new Weekly Learning Goals were being rolled out, the previous goal setting feature still existed behind a waffle flag.
The Weekly Learning Goals now become the one and only learning goal feature.

This change does not remove the old goals feature from the legacy backend, and therefore it does not remove any of the data that was used by the old goals feature.
The goals are now driven by the single pre-existing Waffle flag ENABLE_COURSE_GOALS

 - Removed COURSE_GOALS_NUMBER_OF_DAYS_GOALS waffle flag, replacing it where needed with the existing ENABLE_COURSE_GOALS

 - modified the API to remove the old goal_options, keeping the redundant weekly_learning_goal_enabled flag

 - updated tests

 - refactor tests to fit 50 line limit in lint
2022-01-11 09:02:03 -05:00
Matthew Piatetsky
f6c8a32213 fix: add some whitespace fixes for goal reminder email on apple mobile mail (#29708) 2022-01-05 09:46:35 -05:00
Jawayria
826fc33274 chore: Applied lint-amnesty on lms/djangoapps/{certificates, course_goals} 2021-12-17 16:16:51 +05:00
Matt Hughes
a92f372a3e fix: redirect behavior to learner-specific progress pages
JIRA:AU-375
2021-12-13 15:52:00 -05:00
Matthew Piatetsky
5321d05b48 feat: add adr for weekly learning goals (#29543) 2021-12-09 13:02:41 -05:00
Matthew Piatetsky
bda0062206 fix: some visual fixes the goal reminder email for outlook (#29337) 2021-11-16 14:49:03 -05:00
Matthew Piatetsky
943ed55421 fix: Miscellaneous goal email fixes (#29323) 2021-11-15 19:20:45 -05:00
Matthew Piatetsky
22cb639919 feat: Update ace email header to match braze email header (#29310) 2021-11-15 10:44:41 -05:00
Matthew Piatetsky
d0d03f26eb fix: Miscellaneous css fixes (#29309) 2021-11-12 13:53:00 -05:00
M. Zulqarnain
d9a91d4c38 BOM-2781: Django codemods on LMS (2) (#28852)
* feat: Django codemods on LMS (2)
2021-11-11 17:52:57 +05:00
Matthew Piatetsky
5dbfae83fc fix: Miscellaneous styling fixes for mobile (#29294)
* fix: Miscellaneous styling fixes for mobile

* fix: Add px fallback since outlook doesn't support rem
2021-11-10 16:47:55 -05:00
Ned Batchelder
d9dd10dc97 style: code cleanups from Steven Burch (#29292)
* chore: update deprecated import from collections

* chore: remove outdated imports from markdown library

as it hasn't been supported since 2.0.3 and we're on 3.x.
This was deprecated at least as early as 2012!

* docs: add docstring and remove lint-amnesty to markdown plugin

* chore: remove deprecated etree import

* style: remove unnecessary-comprehension for sets

* style: resolve a number of amnestied pylint complaints

Co-authored-by: stvn <stvn@mit.edu>
2021-11-10 07:11:57 -08:00
Matthew Piatetsky
4822faccc4 [AA-910] Miscellaneous UI fixes and fixed unsubscribe link (#29288)
* fix: use pngs for the goal reminder email banner and remove redundant unsubscribe link

* fix: update

* fix: Miscellaneous UI fixes and fixed unsubscribe link
2021-11-09 13:56:12 -05:00
Matthew Piatetsky
3c0d824701 fix: use pngs for the goal reminder email banner and remove redundant unsubscribe link from the email (#29215)
* fix: use pngs for the goal reminder email banner and remove redundant unsubscribe link

* fix: update
2021-11-09 09:24:58 -05:00
Matthew Piatetsky
4583b639e6 fix: change svg to png and other email fixes (#29145) 2021-10-29 15:12:36 -04:00
Matthew Piatetsky
1a8d322e71 fix: make goal reminder email transactional (#29134) 2021-10-29 14:30:30 -04:00
AsadAzam
2b14c3157b Revert "Revert "feat: Add support for returning thread counts for all topics in a course [BD-38] [TNL-8724] [BB-4927] (#29062)" (#29087)" (#29152)
This reverts commit ed74db1daf.
2021-10-29 16:20:48 +05:00
Matthew Piatetsky
ec7205e679 fix: update goal reminder email urls (#29133) 2021-10-27 13:49:28 -04:00
Matthew Piatetsky
f7050bfa3b feat: make use of more reasonable timezone when recording user activity (#29075) 2021-10-26 13:42:39 -04:00
Awais Jibran
ed74db1daf Revert "feat: Add support for returning thread counts for all topics in a course [BD-38] [TNL-8724] [BB-4927] (#29062)" (#29087)
This reverts commit a2f04fb78b.
2021-10-22 17:21:44 +05:00
Kshitij Sobti
a2f04fb78b feat: Add support for returning thread counts for all topics in a course [BD-38] [TNL-8724] [BB-4927] (#29062)
* feat: Add support for returning thread counts for all topics in a course

In the new discussions experience the thread counts for questions and discussions are displayed in the UI.
This uses a new cs_comments_service API to fetch that data and embed it in the topic listing.

* fix: apply review feedback fixes
2021-10-22 11:22:05 +05:00
Matthew Piatetsky
e0d2cda697 fix: ensure goal reminder command respects flag cofiguration of individual users (#29071) 2021-10-20 15:03:38 -04:00
Matthew Piatetsky
d73d267761 fix: pluralize times per week and increase width of unsubscribe element (#28978) 2021-10-07 17:08:43 -04:00
Matthew Piatetsky
4f47fc3141 fix: font family for goal reminder email (#28976) 2021-10-07 10:33:38 -04:00
Matthew Piatetsky
449d5c7a2d feat: only email users about their goal in the morning in their timezone (#28922) 2021-10-06 15:02:03 -04:00
Matthew Piatetsky
8be9fb6b51 feat: Allow updating goals reminder field without providing the days_per_week field (#28881) 2021-09-30 12:01:02 -04:00
Matthew Piatetsky
caec8f6f29 [AA-909] Create goal reminder email (#28822)
* feat: Create goal reminder email in ace

* creating email
2021-09-30 11:53:14 -04:00
Matthew Piatetsky
ae618151a9 fix: Remove debugging flag that is no longer necessary and refactor 2021-09-29 15:05:14 -04:00
Michael Terry
1133854a59 Merge pull request #28783 from edx/mikix/goal-reminder-email-aa-908
Add goal reminder email management command
2021-09-20 15:18:18 -04:00
Michael Terry
ce39f52680 chore: add tests for new goal reminder email management command 2021-09-20 14:32:06 -04:00
Matthew Piatetsky
3200851563 start addressing comments 2021-09-20 13:08:12 -04:00
Matthew Piatetsky
bf6e135762 feat: Populate the course goals user activity table when a user visits course-specific pages 2021-09-16 12:30:36 -04:00
Dillon Dumesnil
659283d0fd feat: AA-908: Add goal reminder email management command 2021-09-15 17:44:28 -04:00
Maria Grimaldi
2ee52ea96c refactor: replace some create_user with UserFactory to avoid non-existent profile errors 2021-08-24 15:49:21 -04:00
Michael Terry
2176dd7890 feat: allow unsubcribing from a course goal with just a token
* Add unsubscribe_token uuid field to CourseGoal model
* Add endpoint to unsubcribe from just a token (no login needed)
* Add admin page for the course_goals djangoapp
* Add get_course_overview_or_404 utility method
* Clean up URL handling in course_home_api

AA-907
2021-08-23 12:07:32 -04:00