Commit Graph

3157 Commits

Author SHA1 Message Date
David Ormsbee
2051c90924 Test Speedup: Isolate Modulestore Signals
There are a number of Django Signals that are on the modulestore's
SignalHandler class, such as SignalHandler.course_published. These
signals can trigger very expensive processes to occur, such as course
overview or block structures generation. Most of the time, the test
author doesn't care about these side-effects.

This commit does a few things:

* Converts the signals on SignalHandler to be instances of a new
  SwitchedSignal class, that allows signal sending to be disabled.

* Creates a SignalIsolationMixin helper similar in spirit to the
  CacheIsolationMixin, and adds it to the ModuleStoreIsolationMixin
  (and thus to ModuleStoreTestCase and SharedModuleStoreTestCase).

* Converts our various tests to use this new mechanism. In some cases,
  this means adjusting query counts downwards because they no longer
  have to account for publishing listener actions.

Modulestore generated signals are now muted by default during test runs.
Calls to send() them will result in no-ops. You can choose to enable
specific signals for a given subclass of ModuleStoreTestCase or
SharedModuleStoreTestCase by specifying an ENABLED_SIGNALS class
attribute, like the following example:

    from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase

    class MyPublishTestCase(ModuleStoreTestCase):
        ENABLED_SIGNALS = ['course_published', 'pre_publish']

You should take great care when disabling signals outside of a
ModuleStoreTestCase or SharedModuleStoreTestCase, since they can leak
out into other tests. Be sure to always clean up, and never disable
signals outside of testing. Because signals are essentially process
globals, it can have a lot of unpleasant side-effects if we start
mucking around with them during live requests.

Overall, this change has cut the total test execution time for
edx-platform by a bit over a third, though we still spend a lot in
pre-test setup during our test builds.

[PERF-413]
2017-02-23 10:31:16 -05:00
Ben Patterson
c0dd2b878f Lettuce-on-Xenial CMS fix. Iterate through a list to avoid quotation string confusion.
Also change some selenium settings (they were not necessary at this time).
2017-02-20 17:22:36 -05:00
Ben Patterson
0e7e9468eb Solve open sans quotation issue with tests. 2017-02-20 17:21:42 -05:00
Ayesha Baig
61f2067935 [YONK-513]: Add feature flag which allows for disabling of account creation 2017-02-13 12:28:57 +05:00
Jesse Zoldak
83a451dc0b Revert "PLAT-1104 Import courses asynchronously" 2017-01-30 19:21:43 -05:00
Jeremy Bowman
576f6755f8 Merge pull request #14200 from edx/jmbowman/async_course_import
PLAT-1104 Import courses asynchronously
2017-01-30 16:50:55 -05:00
Jeremy Bowman
831cd4b85b PLAT-1104 Import courses asynchronously 2017-01-30 12:19:33 -05:00
jagonzalr
d112c0b81b show button new library in studio depending on flags and user staff status
add flag DISABLE_LIBRARY_CREATION

add comma

use CourseCreatorRole to determine if user can create a library

add disable library creation feature flag

Conflicts:
	cms/djangoapps/contentstore/views/course.py

ENABLE_CONTENT_LIBRARIES flag

check for course creator role for library creation

Conflicts:
	cms/djangoapps/contentstore/views/course.py

add unit tests

make check of creation of library a true/false for forntend, add security in api call, clean tests

update tests

fix docstring of tests

fixed quality violation

fixed broken unit test and quality violations

Feedback changes and unit test to assert libraries are visible to non staff users too

fixed quality violation and feedback changes
2017-01-30 12:51:35 +05:00
Renzo Lucioni
31f5c8ddcb Remove the program admin tool from Studio
All programs are now managed using the Django admin on the catalog service. This is the first in a series of commits removing use of the old programs service from edx-platform.

ECOM-4422
2017-01-27 19:33:06 -05:00
Eric Fischer
507e621ccc Revert "Merge pull request #14324 from edx/efischer/revertins"
This reverts commit c7d2d601b8, reversing
changes made to fb2173f43e.
2017-01-18 10:56:13 -05:00
muhammad-ammar
36dfc2c08d log video id and status along with message 2017-01-12 13:59:23 +05:00
Jesse Zoldak
ff43b823d8 Revert "Feature flag for library creation" 2017-01-11 14:35:19 -05:00
Braden MacDonald
58e3c7827a Merge pull request #13914 from proversity-org/proversity/feature-flag-for-library-creation
Feature flag for library creation
2017-01-11 10:56:25 -08:00
noraiz-anwar
7494e5e6c8 Revert "Error while exporting course with too long filename" 2017-01-05 23:07:56 +05:00
Kevin Falcone
ebe332fc2d Merge pull request #14260 from edx/jibsheet/export-docs
It's always bugged me that the help strings were nonsensical
2017-01-05 10:50:33 -05:00
noraiz-anwar
a637121d19 Merge pull request #14216 from edx/noraiz/TNL-6197
Error while exporting course with too long filename
2017-01-05 15:43:44 +05:00
noraiz-anwar
9c139a87a6 Error while exporting course with too long filename 2017-01-05 14:43:48 +05:00
Kevin Falcone
2902c3b968 It's always bugged me that the help strings were nonsensical
While here, the one-line docstring also bothered me.
2017-01-04 16:51:34 -05:00
muhammad-ammar
ab7f4140d1 Update error handling for Video Uploads
Tnl-4777
2017-01-04 18:15:37 +05:00
Mushtaq Ali
07c93a8ed5 Merge pull request #14140 from edx/mushtaq/video-upload-restrict
Video upload restrictions
2016-12-22 14:35:17 +05:00
Calen Pennington
04115bfe43 Revert "Merge pull request #13235 from edx/jia/MA-2684"
This reverts commit bde0f7b2a7, reversing
changes made to 71693c3a12.
2016-12-21 13:21:47 -05:00
Mushtaq Ali
2c7941d1ef Prevent files larger than 5 GB
Prevent file containig containing non-ascii or special characters in file name
TNL-5855 TNL-5957
2016-12-21 16:36:17 +05:00
jagonzalr
0682618a57 fix docstring of tests 2016-12-16 08:26:16 +02:00
wajeeha-khalid
11356965b5 MA-2684: return correct marketing url for course about 2016-12-15 16:19:44 +05:00
jagonzalr
4f50874fd0 update tests 2016-12-14 12:24:10 +02:00
noraiz-anwar
5207e2fc91 Remove access for inactive users 2016-12-14 14:26:11 +05:00
Mushtaq Ali
2968e3551b Prevent non-video file formats - TNL-5956 2016-12-09 17:05:06 +05:00
marcotuts
2f4a4083bb removed global staff check 2016-12-02 17:40:54 +00:00
Calen Pennington
b24c22804e Merge pull request #14047 from cpennington/safer-opaque-keys
Safer opaque keys
2016-12-02 10:44:36 -05:00
Calen Pennington
fd0d69594a Upgrade to the latest version of opaque-keys 2016-12-01 13:04:31 -05:00
jagonzalr
ce17c1cdcf make check of creation of library a true/false for forntend, add security in api call, clean tests 2016-11-28 11:19:35 +02:00
jagonzalr
fe2c92e6c4 add unit tests 2016-11-23 11:13:12 +02:00
muhammad-ammar
dd45991926 soft delete video from video uploads page
TNL-5899
2016-11-21 15:14:57 +05:00
Muzaffar yousaf
8cee15b6a1 Merge pull request #13916 from edx/mushtaq/tnl-5797-duplicate-functionality
Add duplicate functionality for unit, sub-section and section
2016-11-21 15:08:00 +05:00
jagonzalr
9cf08261b9 check for course creator role for library creation 2016-11-18 14:16:57 +02:00
jagonzalr
fe5becb4fe ENABLE_CONTENT_LIBRARIES flag 2016-11-18 13:15:39 +02:00
jagonzalr
5f3257de87 use LIBRARIES_ENABLED 2016-11-18 12:50:13 +02:00
Mushtaq Ali
a31a728a95 Add duplicate functionality for unit, sub-section and section - TNL-5797, TNL-5798 2016-11-18 12:39:35 +05:00
jagonzalr
ab49631b25 add disable library creation feature flag 2016-11-17 07:35:32 +00:00
Hasnain
4454899821 WL-615 | Fix the preview certificate link. 2016-11-10 14:15:03 +00:00
Jeremy Bowman
3ee8fc130c PLAT-1074 Add support for django-user-tasks 2016-11-09 14:12:09 -05:00
jagonzalr
633eefb221 use CourseCreatorRole to determine if user can create a library 2016-11-08 10:14:07 +02:00
jagonzalr
00a42fe121 show button new library in studio depending on flags and user staff status 2016-11-03 14:59:39 +02:00
tan
1bc1c5453e MA-333 Added ability to refresh uploaded videos
This adds ability to refresh the list of uploaded videos without refreshing the whole page.

Added a refresh button that when clicked:
- fetches a fresh list of uploaded files from the server
- updates `PreviousVideoUploadListView`
- removes the successfully completed uploads from `ActiveVideoUploadListView`
- retains the ongoing or failed uploads in `ActiveVideoUploadListView` so that they can be monitored/retried

The view can also be refreshed without user action, but I felt it may be less surprising to have a button instead.

MA-333 update: auto-refresh list, fix test failure

Changes:
1. Refresh of file list triggered by upload completion. Refresh button retained and label changed to "Refresh List".
2. Added `aria-live="polite"` to `.active-video-upload-list` and `.assets-table`.
3. Removed unused parameter `evt`.
4. Added self to the `AUTHORS` file.

MA-333 update: added tests

MA-333 update: removed refresh button

MA-333 update: address review comments of @mushtaqak

MA-333 update: simplify nested `_each`

MA-333 update: rename viewRefresh to isViewRefresh

MA-333 update: doc string for `clearSuccesful`

MA-333 update: fix accessibility

MA-333 update: update only successfully uploaded videos

MA-333 update: use window.SR feature to notify screen readers that video upload was successful (@pomegranited)
2016-10-29 07:27:10 +05:30
Hasnain
b2572ee2b3 WL-614 | In Studio "View Live" button fix for theming feature. 2016-10-27 14:35:14 -04:00
Eric Fischer
8f0134b7e4 update_course_in_cache should retry on exceptions
Previously, retry() was never called, so the task was never retried despite
defining several retry-related variables.
2016-10-19 14:09:28 -04:00
Dmitry Viskov
bb09fdb7be Ability to hide Pages from students 2016-10-14 22:43:26 +03:00
Syed Hasan raza
97ebdb0301 Merge pull request #13633 from edx/shr/bug/TNL-557-conditional-module-children-modules-empty-context
Fix empty context KeyError for conditional module
2016-10-12 13:04:34 +05:00
Andy Armstrong
684aec8740 Move contentserver to openedx/core 2016-10-11 12:49:33 -04:00
Syed Hassan Raza
c41db159f4 Fix empty context KeyError for conditional module 2016-10-11 19:15:06 +05:00