Commit Graph

102 Commits

Author SHA1 Message Date
jawad khan
5025a3ffd9 feat!: remove "Text Me the App" page from web app because of security concern
Someone at edx was able to quickly send a few texts to himself using the tool.
Each text came from a different number and there was no message about the ability to unsubscribe or stop.
This could potentially be used to spam users as well as potentially result in charges to edX for high volume.

page url https://courses.edx.org/text-me-the-app
LEARNER-8286
2021-03-30 23:38:24 +05:00
Awais Qureshi
275e0c7527 refactor: remove unused imports. 2021-03-19 15:30:01 +05:00
Awais Qureshi
094573e901 BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:17:22 +05:00
Jawayria
9e768785d0 Merge pull request #26499 from edx/jawayria/bom-2351-2
BOM-2351: Removed unused imports from common/djangoapps/student
2021-02-26 16:59:21 +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
Jawayria
caebb910f0 BOM-2351: Removed unused imports from common/djangoapps/student 2021-02-22 13:59:32 +05:00
Aarif
802ae6343b replaced unittest assertions pytest assertions (#26527) 2021-02-18 18:08:52 +05:00
Jawayria
8086ca75f2 Applied pylint-amnesty to student 2021-02-03 15:29:53 +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
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Régis Behmo
2307dff4c9 Deprecate WaffleFlag.override method
This allows us to get rid of waffle_utils' custom WaffleFlag method.
2020-11-03 19:25:37 +01: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
Albert (AJ) St. Aubin
e91c837173 Added Python API and renamed rest_api folder
[MICROBA-281]
2020-06-04 12:44:06 -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
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Feanil Patel
7a52a25132 Fix tests that were creating Enrollments via a course_id.
We now either pass in the relevant courseoverview or when creating the
enrollement we use the factory which automatically creates the relevant
CourseOverview object for testing purposes.
2020-04-06 09:37:36 -04: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
uzairr
b99aeda628 Add additional check for grade display on course banner.
PROD-1142
2020-01-30 15:34:46 +05:00
hunytalk
73aae081c3 Remove null, blank from start field in Schedules 2020-01-22 18:10:33 +05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Zainab Amir
3e426ccecc Suppress grade on dashboard (#22471)
Learners should not be able to view final grade before course end
date.Suppress the grade achieved so far till course end date on
dashboard.

PROD-701
2019-12-12 17:22:58 +05:00
Braden MacDonald
5fc73468b3 Change completion API to work with any learning context 2019-10-22 14:04:31 -04:00
Nimisha Asthagiri
d6d9a17e67 student app: python-3 upgrade 2019-09-30 08:44:54 -04:00
aarif
54cb483fc0 python 3 fixes 2019-09-23 15:30:18 +05:00
Awais Qureshi
63ff4c147c BOM-637
Fixing python3
2019-09-20 15:19:05 +05:00
David Ormsbee
9a1385585f Convert response bytes to str before JSON parsing. (#21375)
Convert response bytes to str before JSON parsing.
2019-08-19 11:01:55 -04:00
David Ormsbee
0f51b58f75 Remove user cookie reset on Student Dashboard.
The enrollmentStatusHash cookie value was created in commit f0030334
as an optimization, in order to determine whether the marketing site
needs to refresh the list of a student's enrolled courses with a
call to the LMS. To ensure that this value was kept up to date,
commit d7a7bcc1 reset the user's cookies every time they go to the
learner dashboard page (which used to be the next page loaded after
you enrolled in a course). This didn't just reset the
enrollmentStatusHash though -- it recalculated all the cookie
values, as if you had just logged in.

A number of things have changed since then:

1. Enrolling in a course now goes to that course's info/navigation
   page, rather than going to the student dashboard.
2. It doesn't appear that the value of enrollmentStatusHash is
   actually being examined anywhere -- it's set in a cookie on the
   LMS and read/written by the edX marketing front end code, but
   the value is never looked at to make any decisions.
3. The introduction of add_email_marketing_cookies (which triggers
   off of the CREATE_LOGON_COOKIE signal) has made cookie resets
   far more expensive, as there is a blocking call to Sailthru if
   you have that enabled in EmailMarketingConfiguration (which
   edx.org does). This can add over two seconds to the server
   processing time for the student dashboard at certain times of
   day.

Given this, I'm removing both the call to resetting the cookie on
the student dashboard page, as well as setting the value for
enrollmentStatusHash.
2019-07-21 20:16:19 -04:00
adeelehsan
2d369490dd Flag added to load limited courses on Dashboard
Dashboard is set to load 250 courses instead of
all the courses. A flag is also added to change
the number the courses to load.

PROD-204
2019-06-28 22:51:41 +05:00
Calen Pennington
390122ec93 Make CourseOverviewFactory create new courses every time (unless otherwise specified) 2019-06-25 12:04:59 -04:00
Michael Roytman
b33b8e8897 introduce Python API for BulkEmail Djangoapp 2019-05-21 09:22:08 -04:00
Cameron Cairns
6363090144 Addresses INCR-195 - runs modernise /student/tests (#20419) 2019-05-07 15:44:49 -04:00
Matthew Piatetsky
dac0eec385 handle incorrectly set schedules 2019-03-11 16:46:29 -04:00
Nimisha Asthagiri
c7c8e856cd Check and update login status with all login-related cookies 2018-12-17 13:03:32 -05:00
Calen Pennington
31047260cc Switch ContentTypeGatingConfig.enabled_as_of and CourseDurationLimitConfig.enabled_as_of to datetimes 2018-11-30 10:02:53 -05:00
Bill Filler
7b684106ba Don't allow audit-only courses to expire 2018-11-26 14:28:50 -05:00
Calen Pennington
0cb48dfe1c Add StackedConfigurationModels for managing content_type_gating and course_duration_limits 2018-11-21 12:18:10 -05:00
Matthew Piatetsky
9037999bd2 add content gating waffle flag 2018-10-22 20:49:08 -04:00
Matthew Piatetsky
3c47d19a52 add redirect behavior when accessing expired course and add tests 2018-10-17 21:37:28 -04:00
Calen Pennington
969728874b Merge pull request #19065 from cpennington/access-control-messaging
Access control messaging
2018-10-12 11:21:34 -04:00
Calen Pennington
5af7fffced Remove unnecessary mocking of CourseKey.from_string in tests 2018-10-11 09:54:12 -04:00
Calen Pennington
ae41ac446e Allow AccessResponse messages to appear on the student dashboard 2018-10-11 09:54:12 -04:00
Robert Raposa
027c53e61e Add ability to redirect to subdomain for logout.
ARCH-241
2018-10-03 12:13:14 -04:00
Nimisha Asthagiri
b7deedfb36 Refactor Login Cookies 2018-09-25 09:12:08 -04:00
Nimisha Asthagiri
8cf44283c9 Consolidate user login and authentication code 2018-09-15 03:21:39 -04:00
Gregory Martin
0b7dbeb520 Update entitlement ordering in dash 2018-07-20 16:38:43 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Jillian Vogel
306b49c36d Adds EMPTY_DASHBOARD_MESSAGE Site Configuration flag
When set, displays the configured text/markup under "You are not enrolled in any courses yet."

Adjusts left/right padding on .empty-dashboard-message to keep our extra message from hitting the sides.

(cherry picked from commit e417c5f8c2)
2018-05-18 09:33:09 +09:30
Jillian Vogel
d489ffe7ad Adds HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED
Site Configuration and feature flag

When set, it hides the Courses list on the Learner Dashboard page if the
learner has not yet activated their account.

(cherry picked from commit 22ee400b15)
2018-05-18 09:33:02 +09:30