Skip to content

Commit

Permalink
Merge branch 'master' into tecoholic/handle-enrollment-for-invite-onl…
Browse files Browse the repository at this point in the history
…y-courses
  • Loading branch information
tecoholic authored Jul 5, 2023
2 parents df830ee + 76a2634 commit d4b2e1b
Show file tree
Hide file tree
Showing 36 changed files with 3,029 additions and 2,179 deletions.
42 changes: 39 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,42 @@ Unreleased
----------
feat: enable enrolling leaners to invite_only courses via manage learners view

=======
[3.68.1]
--------
fix: pick first object from CourseDetails

[3.68.0]
--------
feat: add more metadata into `EnterpriseCourseEnrollmentView`

[3.67.7]
--------
feat: marking orphaned content audits when catalogs are deleted

[3.67.6]
--------
chore: fixing doc string linter errors

[3.67.5]
--------
chore: better formatting of the enterprise api views

[3.67.4]
--------
feat: add button to update customer modified time

[3.67.3]
--------
feat: adding managent command to clear error state

[3.67.2]
--------
fix: fixing name of table used by model fetching method

[3.67.1]
--------
chore: more orphaned content transmission logging

[3.67.0]
--------
Expand Down Expand Up @@ -75,7 +111,7 @@ fix: making sure unenrollment is saved while revoking fulfillment

[3.65.0]
--------
feat: new enterprise endpoint to surface filterable unenrolled subsidized enrollments
feat: new enterprise endpoint to surface filterable unenrolled subsidized enrollments

[3.64.1]
--------
Expand All @@ -84,10 +120,10 @@ fix: Reverted course_run_url for Executive Education courses
[3.64.0]
--------
feat: Updated course_run_url for Executive Education courses

[3.63.0]
--------
feat: Hooking enterprise enrollments up to platform signals to write unenrollment records.
feat: Hooking enterprise enrollments up to platform signals to write unenrollment records.
New field `unenrolled` on enterprise enrollments to track enrollment status, defaults to `None`.

[3.62.7]
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Your project description goes here.
"""

__version__ = "3.67.0"
__version__ = "3.68.1"

default_app_config = "enterprise.apps.EnterpriseConfig"
14 changes: 7 additions & 7 deletions enterprise/api/throttles.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ def allow_request(self, request, view):
"""
Modify throttling for service users.
Updates throttling rate if the request is coming from the service user, and
defaults to UserRateThrottle's configured setting otherwise.
Updates throttling rate if the request is coming from the service user, and defaults to UserRateThrottle's
configured setting otherwise.
Updated throttling rate comes from `DEFAULT_THROTTLE_RATES` key in `REST_FRAMEWORK` setting. specific user
throttling is specified in `DEFAULT_THROTTLE_RATES` by it's corresponding key.
.. code-block::
Updated throttling rate comes from `DEFAULT_THROTTLE_RATES` key in `REST_FRAMEWORK`
setting. specific user throttling is specified in `DEFAULT_THROTTLE_RATES` by it's corresponding key
Example Setting:
REST_FRAMEWORK = {
...
'DEFAULT_THROTTLE_RATES': {
...
'service_user': '50/day',
'high_service_user': '2000/minute',
}
Expand Down
70 changes: 49 additions & 21 deletions enterprise/api/v1/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,90 +6,118 @@

from django.urls import re_path

from enterprise.api.v1 import views
from enterprise.api.v1.views import (
coupon_codes,
enterprise_catalog_query,
enterprise_course_enrollment,
enterprise_customer,
enterprise_customer_branding_configuration,
enterprise_customer_catalog,
enterprise_customer_invite_key,
enterprise_customer_reporting,
enterprise_customer_user,
enterprise_subsidy_fulfillment,
notifications,
pending_enterprise_customer_user,
plotly_auth,
)

router = DefaultRouter()
router.register("enterprise_catalogs", views.EnterpriseCustomerCatalogViewSet, 'enterprise-catalogs')
router.register("enterprise-course-enrollment", views.EnterpriseCourseEnrollmentViewSet, 'enterprise-course-enrollment')
router.register(
"enterprise-course-enrollment",
enterprise_course_enrollment.EnterpriseCourseEnrollmentViewSet,
'enterprise-course-enrollment',
)
router.register(
"licensed-enterprise-course-enrollment",
views.LicensedEnterpriseCourseEnrollmentViewSet,
enterprise_subsidy_fulfillment.LicensedEnterpriseCourseEnrollmentViewSet,
'licensed-enterprise-course-enrollment'
)
router.register("enterprise-customer", views.EnterpriseCustomerViewSet, 'enterprise-customer')
router.register("enterprise-learner", views.EnterpriseCustomerUserViewSet, 'enterprise-learner')
router.register("pending-enterprise-learner", views.PendingEnterpriseCustomerUserViewSet, 'pending-enterprise-learner')
router.register("enterprise-customer", enterprise_customer.EnterpriseCustomerViewSet, 'enterprise-customer')
router.register("enterprise-learner", enterprise_customer_user.EnterpriseCustomerUserViewSet, 'enterprise-learner')
router.register(
"pending-enterprise-learner",
pending_enterprise_customer_user.PendingEnterpriseCustomerUserViewSet,
'pending-enterprise-learner',
)
router.register(
"enterprise-customer-branding",
views.EnterpriseCustomerBrandingConfigurationViewSet,
enterprise_customer_branding_configuration.EnterpriseCustomerBrandingConfigurationViewSet,
'enterprise-customer-branding',
)
router.register(
"enterprise_customer_reporting",
views.EnterpriseCustomerReportingConfigurationViewSet,
enterprise_customer_reporting.EnterpriseCustomerReportingConfigurationViewSet,
'enterprise-customer-reporting',
)
router.register(
"enterprise-customer-invite-key",
views.EnterpriseCustomerInviteKeyViewSet,
enterprise_customer_invite_key.EnterpriseCustomerInviteKeyViewSet,
"enterprise-customer-invite-key"
)
router.register(
"enterprise_catalog_query",
views.EnterpriseCatalogQueryViewSet,
enterprise_catalog_query.EnterpriseCatalogQueryViewSet,
"enterprise_catalog_query"
)
router.register(
"enterprise_customer_catalog",
views.EnterpriseCustomerCatalogWriteViewSet,
enterprise_customer_catalog.EnterpriseCustomerCatalogWriteViewSet,
"enterprise_customer_catalog"
)
router.register(
"enterprise_catalogs", enterprise_customer_catalog.EnterpriseCustomerCatalogViewSet, 'enterprise-catalogs'
)


urlpatterns = [
re_path(
r'enterprise-subsidy-fulfillment/(?P<fulfillment_source_uuid>[A-Za-z0-9-]+)/?$',
views.EnterpriseSubsidyFulfillmentViewSet.as_view({'get': 'retrieve'}),
enterprise_subsidy_fulfillment.EnterpriseSubsidyFulfillmentViewSet.as_view({'get': 'retrieve'}),
name='enterprise-subsidy-fulfillment'
),
re_path(
r'enterprise-subsidy-fulfillment/(?P<fulfillment_source_uuid>[A-Za-z0-9-]+)/cancel-fulfillment?$',
views.EnterpriseSubsidyFulfillmentViewSet.as_view({'post': 'cancel_enrollment'}),
enterprise_subsidy_fulfillment.EnterpriseSubsidyFulfillmentViewSet.as_view({'post': 'cancel_enrollment'}),
name='enterprise-subsidy-fulfillment-cancel-enrollment'
),
re_path(
r'operator/enterprise-subsidy-fulfillment/unenrolled/?$',
views.EnterpriseSubsidyFulfillmentViewSet.as_view({'get': 'unenrolled'}),
enterprise_subsidy_fulfillment.EnterpriseSubsidyFulfillmentViewSet.as_view({'get': 'unenrolled'}),
name='enterprise-subsidy-fulfillment-unenrolled'
),
re_path(
r'^read_notification$',
views.NotificationReadView.as_view(),
notifications.NotificationReadView.as_view(),
name='read-notification'
),
re_path(
r'link_pending_enterprise_users/(?P<enterprise_uuid>[A-Za-z0-9-]+)/?$',
views.PendingEnterpriseCustomerUserEnterpriseAdminViewSet.as_view({'post': 'link_learners'}),
pending_enterprise_customer_user.PendingEnterpriseCustomerUserEnterpriseAdminViewSet.as_view(
{'post': 'link_learners'}
),
name='link-pending-enterprise-learner'
),
re_path(
r'^request_codes$',
views.CouponCodesView.as_view(),
coupon_codes.CouponCodesView.as_view(),
name='request-codes'
),
re_path(
r'^plotly_token/(?P<enterprise_uuid>[A-Za-z0-9-]+)$',
views.PlotlyAuthView.as_view(),
plotly_auth.PlotlyAuthView.as_view(),
name='plotly-token'
),
re_path(
r'^enterprise_report_types/(?P<enterprise_uuid>[A-Za-z0-9-]+)$',
views.EnterpriseCustomerReportTypesView.as_view(),
enterprise_customer_reporting.EnterpriseCustomerReportTypesView.as_view(),
name='enterprise-report-types'
),
re_path(
r'^enterprise-customer-branding/update-branding/(?P<enterprise_uuid>[A-Za-z0-9-]+)/$',
views.EnterpriseCustomerBrandingConfigurationViewSet.as_view({'patch': 'update_branding'}),
enterprise_customer_branding_configuration.EnterpriseCustomerBrandingConfigurationViewSet.as_view(
{'patch': 'update_branding'}
),
name='enterprise-customer-update-branding')
]

Expand Down
Loading

0 comments on commit d4b2e1b

Please sign in to comment.