Commit Graph

9063 Commits

Author SHA1 Message Date
Saad Yousaf
5263774838 Merge pull request #23660 from edx/saad/PROD-1404-logs-cleanup3
[PROD-1404] - fix getargspec() DeprecationWarning for inspect to cleanup logs.
2020-04-15 23:17:53 +05:00
SaadYousaf
d361634067 fix getargspec() DeprecationWarning for inspect. 2020-04-15 15:15:31 +05:00
SaadYousaf
9160d4aa9b address deprecation warning for cgi.escape for logs cleanup. 2020-04-15 15:14:00 +05:00
Waheed Ahmed
ec747e4c27 Fix some submission error message related bugs.
During another bug investigation I figured there are some
issues related to showing error messages to learners upon
submission.

PROD-1431
2020-04-10 17:01:56 +05:00
Tehreem Sadat
eef904bfef fix broken tests (#23680)
Tests were failing due to the "404 Error" Response from an API that fetches specific asset (video transcript data) from YouTube.

I have changed it by using a mocked API response instead of direct API call to the Youtube server.
2020-04-09 16:05:13 -04:00
Alan Zarembok
5371be1c60 Skip tests that are failing due to missing youtube content. 2020-04-09 11:05:10 -04:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Zachary Hancock
2cbc248a63 prevent empty string passing proctoring provider validation (#23610) 2020-04-06 09:45:10 -04:00
Jeremy Bowman
5c40a3729a Stop using deprecated assertions (#23579)
Replace some usage of deprecated assertions with non-deprecated equivalents.
2020-04-02 11:06:37 -04:00
Ali Akbar
358b181bdf Merge pull request #23481 from edx/aakbar/demandhint-static-link-fix
add static links re-write for demnadhint tag
2020-03-31 15:04:33 +05:00
Adam Butterworth
d53ab876e2 Fix public view of video xmodule (#23518)
TNL-7092 Properly include video javascripts for the video public view
2020-03-30 11:03:48 -04:00
Ned Batchelder
136003fcff Merge pull request #23015 from Abstract-Tech/fix/non-admin-error-descriptor
Add xblock.v1 and xmodule.v1 entrypoints for NonStaffErrorDescriptor
2020-03-27 17:43:16 -04:00
Ahtisham Shahid
42ccc5564c Merge pull request #23498 from edx/ahtisham/PROD-1232
Fixed \n escape issue in import-export
2020-03-27 18:39:29 +05:00
Ahtisham Shahid
f264e5dd03 fixed \n escape issue in import
updated test

updated test
2020-03-27 12:29:32 +05:00
asadazam93
fc3e63714e Fixed comparison mismatch 2020-03-26 14:11:31 +05:00
Waheed Ahmed
ccbd353201 Revert "Allow Block Structures Collect to work in Studio" 2020-03-26 13:22:10 +05:00
Ali-D-Akbar
3359928520 add static links re-write for demnadhint tag 2020-03-24 15:08:44 +05:00
Adeel Khan
5cbcd0e952 Reducing play button opacity to improve viewing experience.
This patch lowers the opacity for play button
enabling learners unhindered learning experience
when on video pause.

PROD_1231
2020-03-20 23:39:07 +05:00
Awais Jibran
9f74ea044b Fix DeprecationWarning 2020-03-19 14:23:46 +05:00
Awais Jibran
ebd6494af2 Merge pull request #23380 from edx/logs-cleanup
Remove unnecessary logs.
2020-03-12 16:38:54 +05:00
Awais Jibran
084b409662 Unnecessary logs. 2020-03-12 15:15:22 +05:00
Waheed Ahmed
f54b9a42e7 Disallow NaN value for speed key.
The VideoBlock `handle_ajax` is allowing NaN values for speed key
and causing videos to not load. Also added a data migration to fix
the data for learners.

PROD-1148
2020-03-11 18:45:49 +05:00
Ahtisham Shahid
ef40efae9b update added workaround for csv error 2020-03-09 17:35:12 +05:00
Ahtisham Shahid
4efcfca34a created logs to capture capa problem errors
Update logs

updated logger
2020-03-05 12:54:04 +05:00
Awais Jibran
44199c3f72 Workaround the error in find_question_label. (#23247)
* Workaround the error in find_question_label.

This is a temporary log, which will give us information and unblock the course team.
PROD-1326

* raise exception after logging it.
2020-03-04 17:55:35 +05:00
Michael Terry
b96efcf71b Merge pull request #23258 from edx/mikix/experiment-flag
Add ExperimentWaffleFlag
2020-03-03 15:01:16 -05:00
Michael Terry
e724a4bcb7 Add ExperimentWaffleFlag
This is a helpful class when running an experiment, to help
bucket users and keep track of which enrollments to consider
as part of the experiment.

AA-53
2020-03-03 14:39:02 -05:00
David Ormsbee
9d3f4985ed Allow Block Structures Collect to work in Studio
Block Structures were meant to be gathered using the LMS process,
as it's meant to be an optimized store for the LMS to use. But
there's an argument to be made for at least the Collect side of
the Collect + Transform could be a Studio concern, because it
explicitly needs to avoid user-awareness.

In either event, collect() was broken on devstack before this
commit because Studio's runtime does not permit handler_url
invocation on "thirdparty" XBlocks. Since VideoBlock is not
really third-party (and it's questionable whether there's any
benefit to making the distinction these days), I'm just making
this change to allow Studio to run collect() without error in
the Studio process. This will fix devstack, which does not
properly route these collect() calls to the LMS process (because
celery runs in-proc by default).
2020-03-03 10:52:46 -05:00
Alex Dusenbery
530cabd003 Remove the auth_source kwarg in connect_to_mongodb, since we're now relying on authsource (no underscore) and the pymongo Database init does not expect and will not tolerate an auth_source kwarg. 2020-03-02 15:20:50 -05:00
Luis Moreno
ae0c051e9e Use authsource instead of auth_source for compatibilities with pymongo 2020-03-02 13:31:07 -05:00
Awais Jibran
18e21f374e Merge pull request #23216 from edx/fix-capa-promot-error-mit
Workaround Error in find_question_label.
2020-02-27 17:07:14 +05:00
asadazam93
364e534cf8 Fixed duplicate asset on creating rerun 2020-02-27 15:50:01 +05:00
Awais Jibran
9032562cbd Fix Error in find_question_label. 2020-02-27 10:55:18 +05:00
Jeff LaJoie
fa3b1cd835 AA-6: Adds in dates tab and dates dashboard view to courseware 2020-02-25 10:48:45 -05:00
Luis Moreno
73c6a90bb3 Do not hide all the elements of the units with problems to anonymous users:
Right now the units of a public course are hidden if there is at least a graded activity in them. This is done due to a change(69eeca61d8) that was done before the implementation of public_view mechanism for unenrolled users.

Since we use public_view now and by default it restricts the unit rendering for anonymous users we do not need to limit the access at this way for anonymous users.
2020-02-21 21:00:55 -04:00
uzairr
2f080e8cd9 Add five seconds step to video slider
Currently, video is moving one second ahead or behind on each right
and left arrow key respectively.In order to make it compliant with
the industry standards like Youtube,its step is adjusted to five
seconds.

PROD-159
2020-02-19 13:34:54 +05:00
Jansen Kantor
0e0b488fb5 EDUCATOR-4876: Correctly handle 'None' as a valid max_team_size (#23038)
add default max team sizes, change ui to not show max for managed teams
2020-02-18 16:44:20 -05:00
Manjinder Singh
2274cd09b4 Added options to pytest calls (#23083)
- added more default options to pytest calls in setup.cfg and pytest.ini files.
- pytest-json-report's plugin name in pluggy has changed, so added option for multiple names
2020-02-18 08:58:44 -05:00
Ahtisham Shahid
728f7d2c71 Updated Trascript functionality
removed extras

fixed initial state of transcript

Fixed js tests

fixed js tests

created and fixed tests

Updated Trascript functionality

updated v name

fixed spacing
2020-02-17 11:48:28 +05:00
Awais Jibran
eaaebc6d93 Merge pull request #169 from edx/aj/sec-fix-capa
SECURITY FIX : Fix CAPA Problems
2020-02-13 13:52:29 +05:00
saadyousafarbi
dd994657ac use xpath instead of tag to get all matches from subtree instead of subelements. 2020-02-11 18:59:24 +05:00
Adam Butterworth
53c1d2a0da Hide display titles for vertical blocks embedded in microfrontends (#23006)
Relates to TNL-7048. Since bookmarking is handled in the courseware microfrontend, it needs to also manage the display of a unit title.
2020-02-10 13:32:08 -05:00
Jeremy Bowman
59768e7498 Fix more deprecation warnings (#23061) 2020-02-10 13:17:25 -05:00
Feanil Patel
4422fb36cf Merge pull request #23037 from edx/feanil/bom-939
BOM-939 Update pickle procotol version.
2020-02-10 11:36:20 -05:00
DawoudSheraz
0b1c7db967 add multiple correct values check for Dropdown problems 2020-02-10 11:36:28 +05:00
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
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
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