msingh
7e26fa3823
Fixing quility test
2019-06-12 10:42:48 -04:00
Ned Batchelder
39c7a2db7c
Revert "Use drf-yasg for Open API documentation"
2019-06-11 16:05:00 -04:00
tanyaxp
a7bc22eb9c
Remove the course name from the enroll button. ( #20635 )
...
Remove the course name from the enroll button.
Replace the course name and change the button text to ‘Enroll Now’. The course name appears above this button.
Use case: The Threat of Nuclear Terrorism course team would prefer "Enroll Now” instead of "Enroll in Nuclear Terrorism" because of various interpretations of what "enrolling in nuclear terrorism" could mean.
2019-06-11 15:59:22 -04:00
msingh
f441a262cd
INCR-482: ran python modernization and isort
2019-06-11 15:20:37 -04:00
Ned Batchelder
756dd88691
Merge pull request #20393 from edx/nedbat/drf-yasg
...
Use drf-yasg for Open API documentation
2019-06-11 13:58:13 -04:00
edx-pipeline-bot
de5d25eccc
Merge pull request #20794 from edx/private_to_public_55dd3e1
...
Mergeback PR from private to public.
2019-06-11 19:17:13 +05:00
Christie Rice
4aba1b21a1
REVEM-372 Remove add_audit_deadline and deprecated_metadata waffle flags ( #20769 )
2019-06-11 09:05:06 -04:00
Ned Batchelder
8774ff1f9b
Use ref_name to disambiguate serializers that drf-yasg would otherwise assume are the same.
2019-06-10 15:27:39 -04:00
Ned Batchelder
4a1154a7ca
Give a safer buffer for clearing the rate limiting
...
The rate limiter counts requests in a 5-minute window. To be sure we
aren't hitting edge cases, make the future requests 6 minutes plus 1
second in the future.
2019-06-10 15:27:39 -04:00
Ned Batchelder
64c47856dd
DRF 3.7.4 changed how you delegate to another view, so don't
...
The error in the test was:
```
AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`.
```
The (controversial) incompatible change was in 3.7.4: https://github.com/encode/django-rest-framework/pull/5618
I'll look into whether there's another way to address it.
<details>
<summary>Full error report</summary>
```
AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`.
Stacktrace
self = <lms.djangoapps.discussion_api.tests.test_views.CommentViewSetListTest testMethod=test_profile_image_request_for_null_endorsed_by>
def test_profile_image_request_for_null_endorsed_by(self):
"""
Tests if 'endorsed' is True but 'endorsed_by' is null, the api does not crash.
This is the case for some old/stale data in prod/stage environments.
"""
self.register_get_user_response(self.user)
thread = self.make_minimal_cs_thread({
"thread_type": "question",
"endorsed_responses": [make_minimal_cs_comment({
"id": "endorsed_comment",
"user_id": self.user.id,
"username": self.user.username,
"endorsed": True,
})],
"non_endorsed_resp_total": 0,
})
self.register_get_thread_response(thread)
self.create_profile_image(self.user, get_profile_image_storage())
response = self.client.get(self.url, {
"thread_id": thread["id"],
"endorsed": True,
> "requested_fields": "profile_image",
})
lms/djangoapps/discussion_api/tests/test_views.py:1446:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:291: in get
response = super(APIClient, self).get(path, data=data, **extra)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:208: in get
return self.generic('GET', path, **r)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:237: in generic
method, path, data, content_type, secure, **extra)
../venvs/edxapp/local/lib/python2.7/site-packages/django/test/client.py:416: in generic
return self.request(**r)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:288: in request
return super(APIClient, self).request(**kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:240: in request
request = super(APIRequestFactory, self).request(**kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/django/test/client.py:501: in request
six.reraise(*exc_info)
../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/exception.py:41: in inner
response = get_response(request)
../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:249: in _legacy_get_response
response = self._get_response(request)
../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:187: in _get_response
response = self.process_exception_by_middleware(e, request)
../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:185: in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py:185: in inner
return func(*args, **kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py:58: in wrapped_view
return view_func(*args, **kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:95: in view
return self.dispatch(request, *args, **kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:494: in dispatch
response = self.handle_exception(exc)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:491: in dispatch
response = handler(request, *args, **kwargs)
lms/djangoapps/discussion_api/views.py:505: in list
form.cleaned_data["requested_fields"],
lms/djangoapps/discussion_api/api.py:659: in get_comment_list
results = _serialize_discussion_entities(request, context, responses, requested_fields, DiscussionEntity.comment)
lms/djangoapps/discussion_api/api.py:468: in _serialize_discussion_entities
request, results, usernames, discussion_entity_type, include_profile_image
lms/djangoapps/discussion_api/api.py:413: in _add_additional_response_fields
username_profile_dict = _get_user_profile_dict(request, usernames=','.join(usernames))
lms/djangoapps/discussion_api/api.py:350: in _get_user_profile_dict
user_profile_details = AccountViewSet.as_view({'get': 'list'})(request).data
../venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py:58: in wrapped_view
return view_func(*args, **kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:95: in view
return self.dispatch(request, *args, **kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:477: in dispatch
request = self.initialize_request(request, *args, **kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:118: in initialize_request
request = super(ViewSetMixin, self).initialize_request(request, *args, **kwargs)
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:381: in initialize_request
parser_context=parser_context
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rest_framework.request.Request object at 0x7f597c773890>
request = <rest_framework.request.Request object at 0x7f597fa20f90>
parsers = [<openedx.core.lib.api.parsers.MergePatchParser object at 0x7f59810c32d0>]
authenticators = [<edx_rest_framework_extensions.auth.jwt.authentication.JwtAuthentication object at 0x7f597c713690>, <openedx.core.lib...rest_framework_extensions.auth.session.authentication.SessionAuthenticationAllowInactiveUser object at 0x7f597c773390>]
negotiator = <rest_framework.negotiation.DefaultContentNegotiation object at 0x7f597fa20410>
parser_context = {'args': (), 'kwargs': {}, 'view': <openedx.core.djangoapps.user_api.accounts.views.AccountViewSet object at 0x7f597c7846d0>}
def __init__(self, request, parsers=None, authenticators=None,
negotiator=None, parser_context=None):
assert isinstance(request, HttpRequest), (
'The `request` argument must be an instance of '
'`django.http.HttpRequest`, not `{}.{}`.'
> .format(request.__class__.__module__, request.__class__.__name__)
)
E AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`.
../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/request.py:159: AssertionError
```
</details>
2019-06-10 15:27:39 -04:00
Ned Batchelder
7359ca4fb2
Is this right? It fixes two tests
2019-06-10 15:27:39 -04:00
Ned Batchelder
9257f68fd8
The default TIME_ZONE should be UTC
...
In production, we use UTC as the time zone. DRF 3.7.7 now puts all
times in the currently set timezone where it used to use UTC. By
setting TIME_ZONE to UTC, we keep the same results we used to get.
In a few places, we had to change the expected test results to be UTC.
2019-06-10 15:27:39 -04:00
Ned Batchelder
5985480409
Add drf-yasg
...
* Install drf-yasg
* Add drf-yasg settings and urls
* Pin drf to make drf-yasg work
* Adjust config-models version to be compatible
* Remove django-rest-swagger (the old way)
2019-06-10 15:27:38 -04:00
Andytr1
765559c708
Merge pull request #20758 from edx/andytr1/grades_simple_history
...
Adding simple history to track grade changes. Educator-4347
2019-06-10 12:39:54 -04:00
Dave St.Germain
23ab20a6fd
Prevent import failure on CMS
2019-06-10 10:49:06 -04:00
David Ormsbee
01e1f23f51
Merge pull request #20158 from cthai18/fix/create-account-text
...
Change button text for creating account
2019-06-07 17:36:32 -04:00
atesker
a914faf11c
Adding simple history to track grade changes. Educator-4347
...
added migration
Adding simple history to track grade changes. Educator-4347
Adding migration file
Adding simple history to track grade changes. Educator-4347
Adding migration file
Adding simple history to track grade changes. Educator-4347
Adding migration file
Re-adding lms.djangoapps reference to see if it will fix the build issues
Re-adding lms.djangoapps reference to see if it will fix the build issues
2019-06-07 16:32:56 -04:00
Farhanah Sheets
2186b1a40b
Merge pull request #20777 from edx/fsheets/about-page-message
...
Add in messaging for 403 errors on about pages & update error color for a11y
2019-06-07 15:18:06 -04:00
Matthew Piatetsky
aba836b517
Merge pull request #20674 from edx/REVEM-354
...
add discount banner to track selection and discount price to upgrade button
2019-06-07 11:35:34 -04:00
Farhanah Sheets
6bd3f2ff51
Add in messaging for 403 error cases on about pages and update error color for a11y
2019-06-07 11:22:52 -04:00
Thomas Tracy
f0ecc938ef
Add IdentityServer3 Backend ( #20275 )
...
* Add IdentityServer3 Backend
This adds a backend for users who want to use IdentityServer3 as their
SSO provider. It can be used with the OAuth2ProviderConfig in django
admin to point to an external provider.
2019-06-07 09:38:46 -04:00
Josue Balandrano Coronel
df14f5cdf6
[BB-1132] Decrease NAME_MIN_LENGTH to 1
2019-06-06 22:52:00 +02:00
jansenk
e5c3084e8c
return 422 on bad input
2019-06-06 15:39:46 -04:00
Chester Thai
134c8be2d0
Change button text for creating account
...
Changed button text from "Register through edX" to "Create an Account" on Register with Institution/Campus Credentials page, so we don't have the hardcoded name edX for different organizations.
2019-06-05 15:18:45 -07:00
Matthew Piatetsky
ce5b976f5e
update local currency code
2019-06-05 15:46:16 -04:00
Dave St.Germain
4b84d630de
Merge pull request #20719 from edx/dcs/grade-support
...
API support for bulk grade import/export
2019-06-05 14:46:15 -04:00
jansenk
cf32f5bcf9
allow orgs w/o idp configured to enroll students in a program
2019-06-05 12:55:54 -04:00
Christie Rice
b5d07783b9
REVMI-234 Include user id in jwt sent to ecommerce ( #20743 )
...
* REVMI-234 Include user id in jwt sent to ecommerce
* Reorder params
2019-06-05 10:27:23 -04:00
jansenk
095c420378
check curriculum rather than courses for program course membership
2019-06-04 14:06:00 -04:00
Matthew Piatetsky
ad77392f8d
add discount banner to track selection
2019-06-03 14:18:17 -04:00
Dave St.Germain
cb5ec5a65d
Grade api support for bulk grading
2019-06-03 13:53:30 -04:00
Alex Dusenbery
e5fd43264d
EDUCATOR-4307 | Don't bother with celery to run expire waiting enrollments command.
2019-06-03 13:08:59 -04:00
David Ormsbee
12d893862c
Merge pull request #20632 from tanyaxp/progress-certificates-title
...
Remove the word "Student" from the progress title.
2019-06-03 10:33:48 -04:00
Kyle McCormick
c487b9a384
Change 'withdrawn' status to 'canceled' in program_enrollments
...
This makes the LMS program_enrollments API compatible with the
Registrar programs API, as specified in the Master's partner
integration guide.
EDUCATOR-4389
2019-06-03 10:16:19 -04:00
Noraiz Anwar
55dd3e18bb
Merge pull request #153 from edx/noraiz/PROD-169
...
rate limit requests for password reset emails
2019-06-03 11:39:59 +05:00
alangsto
4a1346b068
INCR-265 Run python-modernize on lms/djangoapps/courseware/management and lms/djangoapps/courseware/tests ( #20716 )
...
* updated files according to INCR-265
* fixed docstring and line-length problems from quality test
* Revert "fixed docstring and line-length problems from quality test"
This reverts commit d050f55a4ecfaa38f46b80ec4bb85ff399a79a8c.
* fixed errors reported in quality report
* had error, fixed it
* reversed change
* fixed over/under indentation, and added line to import.py that Ned had suggested
* tried disabling pylint for this line
* testing new email
* testing email in different window
* re-added symlink and docstring
2019-05-31 14:07:18 -04:00
Ned Batchelder
f72b1d56de
Merge pull request #20639 from edx/nedbat/welcome-message
...
Some trademark improvements to the default home page
2019-05-31 12:39:41 -04:00
Dave St.Germain
a2ca6f96d0
API support for bulk grade import/export
2019-05-31 09:28:44 -04:00
David Joy
6327b00575
Merge pull request #20683 from caesar2164/cleanup-bootstrap-footer
...
Make platform bootstrap footer match other footer
2019-05-30 14:55:50 -04:00
Feanil Patel
be1d0197ee
Merge pull request #20724 from edx/feanil/fix_test_repo_reference
...
Use our fork of this repo instead of the mitocw one.
2019-05-30 14:53:58 -04:00
Feanil Patel
9ebcf758df
Use our fork of this repo instead of the mitocw one.
2019-05-30 13:43:04 -04:00
Dave St.Germain
49b5b88a30
Bumped edx-when
2019-05-30 10:48:38 -04:00
Giulio Gratta
7819a2d5d7
Mark alt text for translation
2019-05-30 07:40:23 -07:00
Giulio Gratta
dddfac8380
Make platform bootstrap footer match other footer
...
Changes:
- Add logo back
- Fix up spacing
- Change font sizes and color
2019-05-30 07:40:23 -07:00
Nimisha Asthagiri
407438970b
Merge pull request #20709 from edx/bom/certificates-readme
...
README for certificates
2019-05-29 15:33:03 -04:00
Nimisha Asthagiri
a8e3624d9f
Merge pull request #20711 from edx/bom/commerce-readme
...
README for commerce and shoppingcart
2019-05-29 14:12:03 -04:00
Nimisha Asthagiri
54bf50e429
Merge pull request #20707 from edx/depr/microsites-static-template-view
...
Remove microsites from static_template_view
2019-05-29 14:11:38 -04:00
Natalia Berdnikov
8d41aa2ea9
Merge pull request #20687 from eduNEXT/lmm/proctored_translation
...
Mark missing string for internationalization
2019-05-29 12:57:14 -04:00
Nimisha Asthagiri
ad608bea67
Merge pull request #20706 from edx/depr/microsites-shopping-cart
...
Remove microsites from shoppingcart
2019-05-29 11:00:40 -04:00
Nimisha Asthagiri
c0c17601c0
Merge pull request #20705 from edx/depr/microsites-certificates
...
Remove microsites from certificates
2019-05-29 10:58:24 -04:00