Commit Graph

85 Commits

Author SHA1 Message Date
Maria Fernanda Magallanes Zubillaga
dcc795042b perf: change queryset to get_queryset in CourseEnrollmentAdmin 2023-01-18 11:29:13 -05:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00
Eugene Dyudyunov
b4fecd620b refactor: rename toggle_warnings to toggle_warning (#30458)
Rename toggle_warnings to toggle_warning for consistency with setting_warning.
2022-05-24 11:47:31 -04:00
Dillon Dumesnil
7b1fead04c feat: AA-1138: Adds ability to have Weekly Goal Celebration Modal in MFE
Adds celebrate_weekly_goal to the CourseEnrollmentCelebration and includes logic
for only returning True if the db field is true and the learner has hit their goal
this week. Adds ability to set to false via the API already used by the frontend.
Default db value is False, but all new enrollments after merge will be set to True.
2022-01-14 13:59:22 -05:00
Jawayria
59039597ab chore: Applied lint-amnesty on common/djangoapps/student 2021-12-13 20:55:40 +05:00
M. Zulqarnain
ba75bb6569 feat: django codemods changes for common folder (#28775) 2021-10-21 13:52:19 +05:00
Simon Chen
38944b836b fix: Create a better admin UI for PendingNameChange model (#28888)
The current admin UI for the PendingNameChange model has no useful info and is not performant on edit form. This change make the view and edit of the model easier in django admin

Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2021-09-30 11:34:59 -04:00
Matthew Piatetsky
8978bc26e1 feat: add admin for the User Celebration Model 2021-05-27 15:19:24 -04:00
Awais Qureshi
094573e901 BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:17:22 +05:00
Jawayria
8086ca75f2 Applied pylint-amnesty to student 2021-02-03 15:29:53 +05:00
Luis Moreno
a1664d2fd8 feat: Move student.courseenrollment_admin from LegacyWaffleSwitch t a WaffleSwitch and add annotations 2021-01-29 09:31:02 -04:00
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01: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
Dillon Dumesnil
6b16fcd9b3 AA-393: Update Next Section Logic
Inside content_highlights.py, we had code to calculate due dates
for when there isn't graded content, but we could only reach that
code path if the user had an assignment with a due date at the
target date. Now we will check for all learners who could be in
range of having an update and let the code in content_highlights.py
decide if a highlight should be sent
2020-10-30 15:02:03 -04:00
Régis Behmo
307457a255 Simplify hack to obtain waffle module names
Instead of going up the stacktrace to find the module names of waffle
flags and switches, we manually pass the module __name__ whenever the
flag is created. This is similar to `logging.getLogger(__name__)`
standard behaviour.

As the waffle classes are used outside of edx-platform, we make the new
module_name argument an optional keyword argument. This will change once
we pull waffle_utils outside of edx-platform.

Note that the module name is normally only required to view the list of
existing waffle flags and switches. The module name should not be
necessary to verify if a flag is enabled. Thus, maybe it would make
sense to create a `add` class methor similar to:

    class WaffleFlag:
        @classmethod
        def add(cls, namespace, flag, module):
            instance = cls(namespace, flag)
            cls._class_instances.add((instance, module))
2020-09-14 09:30:24 +02:00
adeelehsan
f2e989183c Config model added to upload csv
PROD-1911
2020-07-21 16:19:31 +05:00
Michael Terry
450072582e AA-137: Support courseware celebrations
- Add a new CourseEnrollmentCelebration model, which ties a
  course enrollment to some booleans about progress celebrations
- Add serialization of the new model to the existing courseware_api
  app's existing course info view
- Add new API in courseware_api to update a celebration model
2020-06-16 15:19:21 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Feanil Patel
e4798e49d4 Limit the last_name field to 30 chars.
We don't use this field in edx-platform since we rely on UserProfile
instead.  But we need to do this to prevent accidental incorrect use of
this field.  Django adds a migration between 1.11 and 2.2 to increase
the length of this field that we are opting to skip.  This change
enforces the old limit.
2020-04-06 11:11:35 -04:00
Nimisha Asthagiri
9c60bd6386 Django2: student admin views permission fix 2020-04-02 19:26:40 -04:00
adeelehsan
2131ebf03d Configuration model added for account recover command 2020-03-17 19:43:53 +05:00
Troy Sankey
d428f7530d Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""
This reverts commit e6f58b6d4c.

This is our third (3rd!) attempt to deploy stage 2 of this column rename.
2020-03-04 14:53:47 -05:00
Troy Sankey
e6f58b6d4c Revert "Rename values in SiteConfiguration (2/3) attempt #2" 2020-02-27 13:24:55 -05:00
Troy Sankey
c422dec083 Revert "Revert "Rename values in SiteConfiguration (2/3)""
This reverts commit b85aa4b3fb.
2020-02-26 12:54:24 -05:00
Troy Sankey
b85aa4b3fb Revert "Rename values in SiteConfiguration (2/3)" 2020-02-26 11:23:56 -05:00
Julia Eskew
3541643dd5 Rename values in SiteConfiguration (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-02-25 13:54:02 -05:00
Samuel Walladge
39de23c666 Add flag to enable password change form in admin
This was previously disabled because changing another user's password is
both not usually recommended and bypasses password policy. Here, we add
a feature flag (`ENABLE_CHANGE_USER_PASSWORD_ADMIN`) to allow
re-enabling this password change form. This allows continued use of this
functionality by clients that require it.
2020-02-21 11:22:10 +10:30
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
hasnain-naveed
cda72e9071 ENT-2460 | Added a model for whitelist emails for authentication. 2019-11-15 11:56:44 +05:00
adeelehsan
7908808911 Configuration model added for bulk unenroll command
Users information will be available in model as csvfile

Prod-655
2019-10-03 16:33:13 +05:00
Josue Balandrano Coronel
0e85af8a98 Update CourseEnrollment Admin ModelForm to correct edit and create
student enrollments. We no longer need to parse the course key into an
opaque key since the opaque key class can already handle strings and the
parsing happens there. We also need to specify which course enrollment
are we editing or else the reference is lost when saving the edits.
2019-05-18 17:24:13 +02:00
Jeremy Bowman
47516dbead Run python-modernize on student/*.py (#20411) 2019-05-06 14:50:42 -04:00
Josue Balandrano Coronel
78f4ccb50a Expose LoginFailure model to Django's Admin UI to allow admin users
unlock student accounts that have been locked out for excessive login
failures. This change will allow to quickly unlock student accounts when
time is of the essence (e.g. Timed exams).
2019-03-22 10:22:01 -05:00
Julia Eskew
48073300e7 Merge pull request #19106 from open-craft/clemente/fix-courseenrollment-admin-querydict
Fix error when saving CourseEnrollment in admin
2019-01-28 11:14:04 -05:00
Daniel Clemente Laboreo
e0b0c375be Fix error when saving CourseEnrollment in admin 2019-01-28 14:42:41 +02:00
Saleem Latif
bd411de12d Add recovery email to account settings page 2018-12-10 17:59:19 +05:00
Diana Huang
0fb8f08d2e Override admin templates to remove links that allow admin users to change
passwords.

LEARNER-4928
2018-09-18 13:43:30 -04:00
John Hensley
aeec52a9ae Improve CourseEnrollment admin search presentation
When searching CourseEnrollments in the admin, list the enrollments
whose usernames were an exact match first.
2018-08-02 10:42:15 +09:30
Jillian Vogel
c5e90464e9 Address PR review:
* uses openedx waffle_utils instead of straight waffle
* adds student.STUDENT_WAFFLE_NAMESPACE
* improves comment

Also changed the waffle switch to use _ instead of . to respect current conventions.
2018-07-26 13:30:35 +09:30
Jillian Vogel
7f0bbedba1 Adds a waffle switch which gates access to the CourseEnrollmentAdmin views 2018-07-26 13:30:35 +09:30
Dmitry Gamanenko
df9dec9b88 Fix "admin/auth/user/add "username" missing field.
Add test for PR `fix_username_missing_field`

Update test case. Remove blank line whitespace.
2018-04-05 16:22:18 +03:00
Joseph Mulloy
e8d95c1c73 Disable course enrollments admin page OPS-2943 2018-03-26 11:40:16 -04:00
John Eskew
27edca3c5e Replace all clean_course_id form methods with common method. 2018-01-25 11:38:46 -05:00
Albert St. Aubin
3661e1acdf Updated the CourseEnrollment Admin form to correctly handle Course
[LEARNER-3672]

Updated the CourseEnrollment Admin form to convert the Course Strings to
CourseKey or OpaqueKey values as expected.
2018-01-19 13:42:18 -05:00
Sven Marnach
02ddf4d321 Merge pull request #16166 from open-craft/smarnach/filter-course-enrollment-allowed
Add search box to CourseEnrollmentAllowed admin interface.
2017-12-11 13:57:24 +01:00
Sven Marnach
17194ae060 Add search box to CourseEnrollmentAllowed admin interface. 2017-10-04 20:31:40 +02:00
Nico van Niekerk
f2d51639ba FIX: course enrollment search, FIX: hidden tabs on instructor dashboard 2017-09-18 09:34:46 +02:00
bmedx
48e6e552f2 PLAT-1633: Upgrade django-ratelimit-backend to 1.1.1 2017-08-07 15:34:21 -04:00
Clinton Blackburn
835cc0871c Removed usage of LogoutViewConfiguration
This model will soon be deleted.

LEARNER-2042
2017-07-27 11:29:43 -04:00