Commit Graph

18841 Commits

Author SHA1 Message Date
Feanil Patel
9f42b5edfe BOM-939 Update pickle procotol version.
Updating to the current highest number instead of making it the default
which is highest know by the language.  This is beacuse when we update
between python versions if there is a new proctocol version, we don't
want that to cause cache thrashing as we try to load things from the
various caches.  We can get into a situation where new machines pickle
things with a newer versions of the procotocl, put them in the cache and
then break older machines that don't know about the new protocol
version.
2020-02-06 16:55:18 -05:00
Manjinder Singh
cea795b02e Added new auth class (#23018)
* Added new auth class

- Created new class called OAuth2AuthenticationAllowInactiveUser, which replaces old class with same name
- Renames previous  OAuth2AuthenticationAllowInactiveUser to  OAuth2AuthenticationAllowInactiveUserDeprecated
- Replaced all imports of  OAuth2AuthenticationAllowInactiveUser to call deprecated class instead
- testing new class in discussion(added flag based on django setting)
2020-02-06 10:37:27 -05:00
Calen Pennington
b1d5ad8dcb Merge pull request #23024 from cpennington/fix-edx-when-date-ingest
Correctly wire in signal the new course_date_signals app so that it a…
2020-02-06 09:56:08 -05:00
Jeremy Bowman
e38a100418 Fix most frequent deprecation warnings (#23023)
Fixed the most frequently occurring deprecation warnings, which were causing over half of the 34,140 deprecation warnings raised during the unit tests:

* `Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release` - most of these were due to a single mis-configured resource path with a leading slash.
* `count is deprecated. Use Collection.count_documents instead.` - I added a handful of simple workarounds for this pymongo deprecation that shouldn't increase the query counts

Also did some cleanup of unused code in pavelib after the recent split of the new `i18n_compilejs` command from `i18n_dummy`. (This had caused a diff-quality failure on the first commit.)
2020-02-06 09:27:53 -05:00
Calen Pennington
4901dde748 Clean up pylint errors to get diff-quality to pass 2020-02-06 09:18:30 -05:00
iamsobanjaved
82dd040382 fixed deprecated django-filter features 2020-02-06 18:32:36 +05:00
Diana Huang
1f45181c14 Remove ENABLE_SQL_TRACKING_LOGS and all associated code. 2020-02-05 14:42:33 -05:00
Diana Huang
742868c2da Remove the tracking django backend and the TrackingLog tables. 2020-02-04 14:24:56 -05:00
Robert Raposa
a49ff5a0ce Merge pull request #23013 from edx/robrap/add-jwt-auth-for-third-party-auth
add jwt auth to third-party auth endpoint
2020-02-04 10:47:36 -05:00
Silvio Tomatis
99bdb23375 Add xblock.v1 and xmodule.v1 entrypoints for NonStaffErrorDescriptor
If an error occurs while rendering an xmodule, the LMS chokes with the
following error if accessed by a non admin user.

In the admin user case the existing line that registers ErrorDescriptor
ensures that everything works. But for the non admin case we need this
additional directive.

Traceback (most recent call last):
  File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 153, in get
    return self.render(request)
  File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 217, in render
    return render_to_response('courseware/courseware.html', self._create_courseware_context(request))
  File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 468, in _create_courseware_context
    courseware_context['fragment'] = self.section.render(self.view, section_context)
  File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
    frag = view_fn(context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 262, in student_view
    return self._student_or_public_view(context, prereq_met, prereq_meta_info, banner_text)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 343, in _student_or_public_view
    items = self._render_student_view_for_items(context, display_items, fragment, view) if prereq_met else []
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 485, in _render_student_view_for_items
    rendered_item = item.render(view, context)
  File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
    frag = view_fn(context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 118, in student_view
    return self._student_or_public_view(context, STUDENT_VIEW)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 85, in _student_or_public_view
    rendered_child = child.render(view, child_block_context)
  File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
    frag = view_fn(context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/library_content_module.py", line 314, in student_view
    rendered_child = displayable.render(STUDENT_VIEW, child_context)
  File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 835, in render
    updated_frag = self.wrap_xblock(block, view_name, frag, context)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1287, in wrap_xblock
    frag = wrapper(block, view, frag, context)
  File "/openedx/edx-platform/openedx/core/lib/xblock_utils/__init__.py", line 155, in wrap_xblock
    add_webpack_to_fragment(frag, class_name)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/util/xmodule_django.py", line 28, in add_webpack_to_fragment
    for chunk in webpack_loader.utils.get_files(bundle_name, extension, config):
  File "/usr/local/lib/python2.7/site-packages/webpack_loader/utils.py", line 31, in get_files
    return list(_get_bundle(bundle_name, extension, config))
  File "/usr/local/lib/python2.7/site-packages/webpack_loader/utils.py", line 23, in _get_bundle
    bundle = get_loader(config).get_bundle(bundle_name)
  File "/usr/local/lib/python2.7/site-packages/webpack_loader/loader.py", line 83, in get_bundle
    raise WebpackBundleLookupError('Cannot resolve bundle {0}.'.format(bundle_name))
WebpackBundleLookupError: Cannot resolve bundle NonStaffErrorModule.
2020-02-04 16:12:57 +01:00
Robert Raposa
28206e4c45 add jwt auth to third-party auth endpoint
BOM-897
2020-02-04 10:02:04 -05:00
Awais Jibran
bcb2038843 Fix CAPA Problems 2020-02-04 17:51:18 +05:00
Dave St.Germain
5528adccb1 Include bookmark info in sequence metadata. 2020-02-03 13:54:03 -05:00
Zainab Amir
4b458099cf Add unique_together to CourseEntitlement (#22948)
Add unique_together on course_uuid and order_number to avoid
duplicate records

PROD-1064
2020-02-03 13:21:44 +05:00
edX cache uploader bot
36f75865c8 Updating Bokchoy testing database cache (#22995) 2020-01-31 13:26:01 -05:00
Dave St.Germain
42adb72aa5 Merge pull request #22336 from edx/dcs/data-researcher
Add new role for course data researcher
2020-01-31 10:07:27 -05:00
Uzair Rasheed
76052ee9ba Merge pull request #22921 from edx/PROD-1142/add-check-for-grade-display
Add additional check for grade display on course banner.
2020-01-31 15:25:39 +05:00
Awais Jibran
2f98463c35 Merge pull request #22939 from edx/aj/fix-grade-reports
Generate Grade Report for Verified Learners by Default
2020-01-31 12:47:18 +05:00
George Babey
aced705091 Merge pull request #22983 from edx/gbabey/bulk-update-emails
Adds management command for bulk updating email addresses
2020-01-30 21:46:43 -05:00
George Babey
efdbe1f3b1 Adds management command for bulk updating email addresses
This PR adds a management command that will update the email address
of the given accounts provided through a CSV file.

This is necessary internally at edX to update a number of internal accounts
which are using sibling email addresses and would be locked out after we
enforce SSO.
2020-01-30 21:11:04 -05:00
Manjinder Singh
eb694528e7 Adding metrics to oauth2authentication class (#22970)
Currently, we are working on removing the rest_framework_auth library from edx-platform. For this push, we need to remove the oauth2Authentication class. This PR creates a new class oauth2AuthenticationDeprecated that adds additional new relic metrics. The metrics would allow us to see how often this class is used and its success rate. The hope is that this information will help us with transitioning to a different authentication class.
2020-01-30 09:13:51 -05:00
Aarif
97d327feeb BOM-1121
Old style mixin compatibility with django2.2
2020-01-30 16:36:02 +05:00
uzairr
b99aeda628 Add additional check for grade display on course banner.
PROD-1142
2020-01-30 15:34:46 +05:00
edX cache uploader bot
d5d7de9a06 Updating Bokchoy testing database cache (#22971) 2020-01-29 11:03:13 -05:00
Awais Jibran
d7d258cd36 Generate grade report for verified learnes by default 2020-01-28 14:04:02 +05:00
Dave St.Germain
6a5a620325 Add a data researcher role for everyone who is currently staff or instructor. 2020-01-27 14:15:41 -05:00
Dave St.Germain
3d82ce18f9 Check for data download permission in report endpoints 2020-01-27 13:55:18 -05:00
Dave St.Germain
8b815b802b Added new role for course data researcher. 2020-01-27 13:55:18 -05:00
edX cache uploader bot
41bc3106e9 Updating Bokchoy testing database cache (#22951) 2020-01-27 12:32:07 -05:00
adeelehsan
4799f40d88 Merge pull request #22916 from edx/aehsan/prod-799/remove_order_history_from_dashboard
Order history removed from dashboard
2020-01-27 15:00:46 +05:00
Waheed Ahmed
2d04b7980a Fix already earned honor PDF certificates.
Learner who have already earned PDF honor certificates in old courses
are unable to see the certificate links on dashboard and course progress
pages since `course.cert_html_view_enabled` is deprecated and default to
True for all courses.

PROD-60
2020-01-27 14:17:18 +05:00
Adam Butterworth
48d20e338b fix: video fullscreen must not assume resizer exists (#22935)
Otherwise it fails to go fullscreen before playback
2020-01-24 14:59:49 -05:00
edX cache uploader bot
811d45c1ae Updating Bokchoy testing database cache (#22933) 2020-01-24 14:30:24 -05:00
Adam Butterworth
f0aa3daa87 Use Fullscreen API for video XBlock full screen mode (#22896)
[TNL-7051] Clicking a video XBlock's fullscreen button now takes the video fullscreen instead of full window.

Gracefully fallback to full window if fullscreen apis are absent
2020-01-24 09:48:41 -05:00
DawoudSheraz
63d1b2bc9c modify URL generation in tinymce editor 2020-01-24 11:57:01 +05:00
adeelehsan
7f11afafdc Order history removed from dashboard
PROD-799
2020-01-23 17:10:12 +05:00
edX cache uploader bot
42d69d0e70 Updating Bokchoy testing database cache (#22917) 2020-01-22 11:51:17 -05:00
hunytalk
73aae081c3 Remove null, blank from start field in Schedules 2020-01-22 18:10:33 +05:00
David Ormsbee
0800f5f226 Merge pull request #22837 from open-craft/youtube-metadata-new-runtime
Add way to get YouTube metadata that doesn't require a session cookie
2020-01-17 11:02:05 -05:00
Adam Butterworth
ca1dfbce70 fix: fragment include directive should include files in themes if they exist (#22880) 2020-01-17 09:00:03 -05:00
Braden MacDonald
c7d5efb796 Add way to get YouTube metadata that doesn't require a session cookie
The Video Player XBlock will sometimes make API calls to /couses/yt_video_metadata, a REST API endpoint that in turn loads video metadata from YouTube using the configured settings.YOUTUBE_API_KEY.

However, in the Blockstore-based XBlock runtime, we are running XBlocks in a secure sandbox, and the user's browser cannot pass session cookies when calling REST API endpoints. So currently, the video XBlock tries to request YouTube metadata from that API endpoint, but it fails if run within such a sandbox.

The existing API also doesn't work for anonymous users (users who are allowed to see video XBlocks but who have not logged in to an LMS user account).

This commit updates the Video XBlock so that it can use a handler to load the data from YouTube instead of a generic REST API. This works well in the new runtime, because it has code to support calling handlers within the sandbox, including by anonymous users.

I also fixed a bug where on a default devstack, the endpoint will try calling YouTube using PUT_YOUR_API_KEY_HERE as an API key, and get a "bad request" error from YouTube.

The code could be re-organized by moving things around, but I've left everything as-is for now to keep the diff as small as possible.
2020-01-16 13:25:16 -08:00
edX cache uploader bot
c596a533e6 Updating Bokchoy testing database cache (#22878) 2020-01-16 15:15:10 -05:00
Calen Pennington
9c5f1271cf Merge pull request #22865 from cpennington/dont-delete-course-overviews
Dont delete course overviews
2020-01-16 13:57:13 -05:00
Calen Pennington
be5ca3dedd Add a test that shows that CourseModes aren't deleted when CourseOverview versions are updated 2020-01-16 12:07:27 -05:00
Diana Huang
ad33e0e573 Merge pull request #22876 from edx/testeng/bokchoy_auto_cache_update_e00340173c2d18e4052a08fe465230530b2d3202
Bokchoy Testing DB Cache update
2020-01-16 11:28:37 -05:00
brianhw
aac1071f42 Merge pull request #22867 from edx/brian/DE-1824-step3
Update edx-val from 1.2.0 to 1.2.1
2020-01-16 09:41:16 -05:00
edX cache uploader bot
ad631f4d32 Updating Bokchoy testing database cache 2020-01-16 08:54:48 -05:00
Awais Qureshi
391c4aecb6 Merge pull request #22674 from edx/awais786/BOM-1126
BOM-1126
2020-01-16 10:44:21 +05:00
Brian Wilson
d290904213 Update edx-val from 1.2.0 to 1.2.1
This is step 3 of DE-1824.

Also update:
* six 1.13.0 => 1.14.0
* edx-django-utils 2.0.2 => 2.0.3
* skip test that checks all model changes have migrations.  (We defer
  this to step 4.)
2020-01-15 16:02:28 -05:00
Calen Pennington
675b8c0d71 CourseOverviews may be deleted, but we don't want to delete related objects 2020-01-15 15:23:51 -05:00