Commit Graph

951 Commits

Author SHA1 Message Date
Kevin Falcone
72b4cf377b Don't hardcode student_module_history
aws_migrate may be used on boxes where that DB does not yet exist.
2016-03-01 11:56:11 -05:00
Kevin Falcone
b4ac588ce1 Update reset-test-db.sh for bok-choy
This now correctly migrates and dumps files for both databases.

Run lettuce migrations for both databases
2016-02-29 13:59:29 -05:00
Kevin Falcone
6f9a3911e5 Implement a BaseStudentModuleHistory
This abstract class contains most of the fields (aside from the id and
foreign key to StudentModule that the subclasses need to manage).  It
also provides a get_history method that abstracts searching across
multiple backends.

Move router code to openedx/core
We need to use it from cms and lms.
Ensure aws_migrate can be used for migrating both the lms and cms.

Handle queries directed to student_module_history vs default and the
extra queries generated by Django 1.8 (SAVEPOINTS, etc).

Additionally, flag testing classes as multi_db so that Django will
flush the non-default database between unit tests.

Further decouple the foreignkey relation between csm and csmhe

When calling StudentModule().delete() Django will try to delete CSMHE
objects, but naively does so in the database, not by consulting the
database router.

Instead, we disable django cascading deletes and listen for post_delete
signals and clean up CSMHE by hand.

Add feature flags for CSMHE
One to turn it on/off so we can control the deploy.
The other will control whether or not we read from two database tables
or one when searching.

Update tests to explicitly use this get_history method rather than
looking directly into StudentModuleHistory or
StudentModuleHistoryExtended.

Inform lettuce to avoid the coursewarehistoryextended app

Otherwise it fails when it can't find features/ in that app.

Add Pg support, this is not tested automatically.
2016-02-29 13:59:27 -05:00
Calen Pennington
dd90c55602 Create a new CSMHExtended table to hold our new data
This is a clone (copy) of CSMH's declaration and methods with an added
id of UnsignedBigInAutoField

We should be able to delete the save_history code, but needs testing.

Add error logging when capa failures happen

Put StudentModuleHistory into its own database

Bump out the primary key on CSMHE

This gives us a gap to backfill as needed.
Since the new table's pk is an unsigned bigint, even for people who don't
consolidate CSMH into CSMHE, the lost rows are unlikely to matter.

Remove StudentModuleHistory cleaner
2016-02-29 13:58:39 -05:00
Usman Khalid
2586f09d7a Add option to disable migrations when running tests
By default, migrations are applied as they always have been. Exporting DISABLE_MIGRATIONS=1 or passing --disable-migrations to Paver commands will create tables directly from apps' models.
2016-02-29 11:47:32 -05:00
Ned Batchelder
a9ab395d43 Use yaml.safe_load, since we have no need for the greater power of .load 2016-02-24 15:36:04 -05:00
Jim Abramson
fb3a09e68e Merge pull request #11520 from edx/jsa/ecom-3638
Specify high priority queue for credentials generation task.
2016-02-12 14:29:49 -05:00
jsa
8a620640c2 Disable credentials-related settings/tests under cms. 2016-02-12 13:25:44 -05:00
Usman Khalid
ec6a786400 Add Randomize XBlock to DEPRECATED_BLOCK_TYPES. 2016-02-12 19:54:41 +05:00
Asad Iqbal
64291d3c01 Merge pull request #11391 from edx/asadiqbal08/WL-272
asadiqbal08/WL-272 - Studio Language Selection
2016-02-10 18:30:29 +05:00
asadiqbal
64778cdf69 WL-272 2016-02-10 14:33:38 +05:00
Ben Patterson
f12c415ed6 Merge pull request #11470 from edx/benp/remove-ruby-deps
[S&B] Remove ruby dependencies.
2016-02-09 10:56:21 -05:00
Ben Patterson
ffa089a9c6 Remove ruby reference in pipeline arguments. 2016-02-08 18:18:37 -05:00
Ehtesham
b9c8b3308d [TNL-3962] moving DEPRECATED_ADVANCED_COMPONENT_TYPES to dJango admin 2016-02-08 17:26:49 +05:00
jsa
92aa346fdf Implement celery task to award program certs.
ECOM-3354
2016-02-05 12:21:20 -05:00
Peter Fogg
ce769b363d Convert PARTNER_SUPPORT_EMAIL to a setting. 2016-02-02 15:18:16 -05:00
Matjaz Gregoric
bb0c2901c7 Merge pull request #11319 from open-craft/remove-comprehensive-theme-finders
Remove ThemingAware storage mixins and ComprehensiveThemeFinder
2016-02-02 17:57:36 +01:00
Diana Huang
cd0bb4c7e0 Add ability to generate static i18n files. 2016-02-01 15:54:10 -05:00
Matjaz Gregoric
266f593d2d Remove ThemingAware storage mixins and ComprehensiveThemeFinder.
Collectstatic failed in production when comprehensive theme contained custom css files.
This patch fixes that problem by removing ComprehensiveThemeFinder from STATICFILES_FINDERS
and ComprehensiveThemingAware mixin from STATICFILES_STORAGE.

Comprehensive theme static dirs are added to the top of the STATICFILES_DIRS entry,
which means that the default django FilesystemFinder will find theme static files,
and since the theme folder is at the top of STATICFILES_DIRS, theme files will take
precedence over default LMS/CMS static files.

This change means that theme static file URLs are no longer prefixed with themes/<theme-name>/,
but since we currently only support one comprehensive theme at a time, that shouldn't be a problem.
If/when we want to make the choice of a theme dynamic per-request (microsites?), we will have to
bring custom theme finders and storage mixins back, but for now, we don't need them.
2016-01-29 08:28:18 +01:00
Douglas Hall
37a7fdc0f2 Added subsection gating feature 2016-01-28 14:05:20 -05:00
Ahsan Ulhaq
b11e312d2c Create placeholder django apps for credentials
ECOM-3057
2016-01-28 13:05:49 +05:00
Nimisha Asthagiri
08a2bc9620 Merge pull request #11358 from edx/release
Hotfix for MA-1981 and safe sessions
2016-01-27 15:53:20 -05:00
Toby Lawrence
531347b463 Merge pull request #11277 from edx/PERF-251
Add the basis of configuring a cache TTL for course assets.
2016-01-27 08:38:16 -05:00
Toby Lawrence
01a9ad2369 Add support to enhance the cacheability of course assets.
This introduces a mechanism to control the time-to-live for an unlocked
course asset, which will allow browsers and intermediate proxies/caches
to cache these course assets, determinstically.

Locked assets, with their nature of requiring authorization, are not
eligible for caching.
2016-01-26 21:09:18 -05:00
Nimisha Asthagiri
f3cb692472 Safe Session Cookies Middleware 2016-01-26 17:23:03 -05:00
Adam Palay
c37715a7c7 Merge remote-tracking branch 'origin/release' into merge-release-into-master
Conflicts:
	requirements/edx/base.txt
	requirements/edx/github.txt
2016-01-26 11:25:41 -05:00
Adam Palay
bb2d75d80e Revert "Merge pull request #11241 from edx/feature/credentials-phase-1"
This reverts commit 46df454536, reversing
changes made to 039e6cdfe6.
2016-01-25 12:46:57 -05:00
Adam Palay
c9c8116da7 Revert "Merge pull request #11324 from edx/ahsan/rc-add-service-user-in-cms"
This reverts commit a84b81113b, reversing
changes made to 0d1765e190.
2016-01-25 12:45:07 -05:00
Ahsan Ulhaq
31ec8ef708 Add service username in cms settings 2016-01-25 20:04:10 +05:00
Zia Fazal
c0648ab164 moved IS_EDX_DOMAIN dependent feature to edx.org theme 2016-01-22 15:32:19 -05:00
Awais Jibran
c2255ef0d6 Merge pull request #11226 from edx/aj/ecom3384-course-image-breaking
Studio - Schedule & Details tab broken
2016-01-22 18:56:15 +05:00
Ahsan Ulhaq
46df454536 Merge pull request #11241 from edx/feature/credentials-phase-1
Feature/credentials phase 1
2016-01-22 18:39:53 +05:00
Awais Jibran
8a6699a46d Studio breaks DEFAULT_COURSE_ABOUT_IMAGE_URL is not set in settings in cms
ECOM-3384
2016-01-22 16:49:57 +05:00
Piotr Mitros
3b2e0ddb83 Merge pull request #11229 from edx/pmitros/minor-studio-settings-cleanup
Minor cleanup of Studio settings
2016-01-21 14:38:24 -05:00
Braden MacDonald
5e3cc70783 Merge pull request #10943 from open-craft/email-authorized-list-master
Allow each instance to configure restrictions on allowed email addresses
2016-01-20 14:51:29 -08:00
Braden MacDonald
110714ee81 Allow each instance to configure restrictions on allowed email addresses 2016-01-20 11:03:30 -08:00
Giovanni Di Milia
bb36ab013f Added CCXCon app
The CCXCon app is used to push course updated to the CCXCon
 externale service.
2016-01-20 10:47:37 -05:00
Ahsan Ulhaq
8798ee0f53 Add credentials service user 2016-01-20 12:51:48 +05:00
Ahsan Ulhaq
6f8727a285 Create placeholder django apps for credentials
ECOM-3057
2016-01-20 12:50:29 +05:00
Jim Abramson
adb70e44b7 Merge pull request #11218 from edx/jsa/studio-id-token-expiration
Set default id token expiration to 5m for Studio
2016-01-15 11:37:47 -05:00
Piotr Mitros
6b6248b44a Minor cleanup of Studio settings: removing extra indirection, and advanced components list 2016-01-15 11:21:52 -05:00
Felipe Montoya
4742e661f4 Creating a settings object that is aware of the microsite settings.
Adding the declaration of the settings object to openedx.conf to be able to import it from a nicer location

Resolving quality violations

Merging dicts with the settings definition when they exist in the microsite configuration

Using a cache to improve the perfomance of quering any dictionary in the microsite definition

Ignoring the invalid-name pylint warning since the names must be kept thsi way to stay the same as the ones in django.
Removing the default dict argument as per https://docs.python.org/2/tutorial/controlflow.html#default-argument-values

Extracting the implementation of the microsite to a selectable backend.

Leaving the function startup.enable_microsites for backwards compatibilityy

Adding a database backend

Using a cache to improve the perfomance of quering any dictionary in the microsite definition.
Changed the database backend so that it extends the settings file backend and removed all the unnecessary methods.

Using the backend provider for the get_dict function

some tweeks and some initial unit tests

Using getattr as a function insteal of calling the underlying __getattr__ directly

Adding an ModelAdmin object for the microsite model in the django-admin panel

refactor enable_microsites()

consolidate/refactor some shared code

add config to aws.py and add migration files

fix tests

Changes to get the backends to run after the refactor

add archiving capabilities to microsites. Also make a few notes about performance improvements to make

fix tests

Making the query to find if microsites exist in the database faster

add ORG to microsite mapping tables and some performance improvements

allow for Mako templates to be pulled from the database

fix tests

For the database template backend the uri of the template does not use the filesystem relative path

Fixing pylint violations

Added caching of the templates stored in the database

Fixing pylint errors

fix pylint

Clearing the cache on model save

Fixing pylint errors

rebased and added test coverage

rebased cdodge/microsite-improvements branch with master and added test
coverage

added missing migration

fix quality violations

add more test coverage

mattdrayer: Add microsite_configuration to cms.INSTALLED_APPS

added microsite settings to cms/envs/test.py

run session cookie tests only in LMS

fixed broken tests

putting middleware changes back

Preventing the template_backend to be called on requests which have no microsite

changes to address feedback from mjfrey

changed BaseMicrositeBackend to AbstractBaseMicrositeBackend

changes after feedback from mattdrayer

fixed broken tests and quality violations

Allowing the backend to handle the enable_pre_startup routine

Typos and docstrings

Adressing feedback

Fixing python tests

add comment to explain why we need enable_microsites_pre_startup()
2016-01-15 14:52:36 +05:00
jsa
08cb9fc03f Set default id token expiration to 5m for Studio 2016-01-13 17:30:17 -05:00
Piotr Mitros
e87fabe45e Merge pull request #8289 from edx/danielli/pyfs_xblocks
Add setting for pyfs xblock service to devstack.py
2016-01-06 17:21:30 -05:00
AlasdairSwan
f25d8a16ee ECOM-3319 loading edx-icons fonts in studio programming author tool 2016-01-06 12:08:47 -05:00
swdanielli
ac66b4a8cd Add setting for pyfs xblock service 2016-01-05 23:09:09 +00:00
arbabnazar
49d8ec3543 DEVOPS-3388 Remove unused setting from edxapp configuration 2016-01-01 12:50:42 +05:00
Usman Khalid
5e972b2a66 Merge pull request #11022 from edx/bookmarking
Bookmarking
2015-12-22 18:25:48 +05:00
Sarina Canelake
2bc7b954ab Remove the graphical slider tool 2015-12-17 13:24:00 -05:00
Usman Khalid
4304c66c54 Performance optimizations and cache to keep the bookmarks info updated.
The cache uses the bookmarks.XBlockCache model.

TNL-1945
2015-12-17 22:07:34 +05:00