Commit Graph

235 Commits

Author SHA1 Message Date
Usman Khalid
781623205e Added a named outer_atomic option.
A named outer is suitable when dealing with IntegrityErrors. It only
checks that it is not nested under an atomic only if it is nested
under enable_outer_atomic(name=<name>). This way only the view which
is causing IntegrityErrors needs to have its automatic transaction
management disabled and other callers are not effected.
2016-06-16 14:18:21 +05:00
PaulWattenberger
f5b42c8955 Initial lms changes for Sailthru (#12706)
* Initial lms changes for Sailthru

* Fix identified code quality issues

* Fix migration failure

* Fix code quality identified issue
2016-06-09 16:21:11 -04:00
PaulWattenberger
9781685719 Revert "Pwattenberger/sailthru" (#12701) 2016-06-08 23:03:22 -04:00
PaulWattenberger
ca02235e64 Pwattenberger/sailthru (#12646)
* Initial commit of Sailthru lms changes

* Field mapping changes for Sailthru integration

* Merge fix

* Add users to Sailthru list on registration

* FIx minor code format issues

* Several updates based on code review feedback

* Updates based on recomendations from Sailthru

* Clean up unit tests

* Fix last login

* Updates based on code review feedback

* Updates based on code review feedback

* Fix comment

* Cleanup
2016-06-08 19:38:29 -04:00
Calen Pennington
e93d112c04 Make UrlResetMixin.reset_urls a public method (so that it can be used inside test methods) 2016-06-06 13:27:38 -04:00
Nimisha Asthagiri
4a56fa5fb1 Adding infrastructure to support context-sensitive help links in the LMS. 2016-05-27 11:35:05 -04:00
Eric Fischer
a9a3fabfe8 Bulk Email Multiselect (#12301)
TNL-4356

Allows multiple bulk email targets to be specified at once.

-The previous "All" option has been split into "Staff" and "Learners"
-The backend changes made here lay the groundwork for cohort emailing
-The data migration, 0005, is somewhat large and requires deploy attention
-Tests have been updated
-Numerous safe-commit-linter fixes are included
2016-05-26 14:22:04 -04:00
Calen Pennington
18e1610043 Remove the create_user argument to setUp.
Instead, use a class attribute to define test behavior. This allows for
easier addition of new mixins over time.
2016-05-04 11:35:55 -04:00
Calen Pennington
39ff841d1f Don't pass arguments to setUp (for UrlResetMixin)
The TestCase API doesn't accept arguments, so passing arguments for some
TestCase subclasses makes adding new inheritance/mixins tricky. Instead,
prefer configuration via class attributes for TestCases.
2016-05-04 11:34:51 -04:00
Ayub khan
d45c4d8caf Revert "Implement 'from_string_or_404' in utils" 2016-05-02 14:23:39 +05:00
Ayub khan
986209669d Revert "SUST-35 Implementation of course_key_from_string_or_404 to return course_key or raise a 404" 2016-04-28 15:50:17 +05:00
Ayub-khan
e687f1e754 -Adressed all comments 2016-04-18 11:57:31 +05:00
Ayub-khan
ef70d017c8 -fixed failing tests
-Adressed all comments
2016-04-15 15:40:21 +05:00
Ayub-khan
d8464dbfb0 -changed method name from "from_string_or_404" to "course_key_from_string_or_404".
-Updated method "course_key_from_string_or_404" to raise message too.
-Wrote tests for "course_key_from_string_or_404" when exception message is given.
-Modified existing methods to use "ddt.data".
-Used Splunk logs to find exectly where we were getting "Invalid Key Error"
-Updated Views where we were getting "Invalid Key Error" in splunk logs.
-Wrote tests for those View End points where we were getting "Invalid Key Error"
2016-04-14 15:57:39 +05:00
muzaffaryousaf
e2d9ecc010 Make migrations in-sync with models 2016-04-07 12:26:18 +05:00
muzaffaryousaf
90c670c0ac Unit test to check the migrations are in sync. 2016-04-07 12:26:17 +05:00
Muhammad Rehan
771a7d06ca Implement 'from_string_or_404' util and its example usage. 2016-03-23 20:10:32 +05:00
Douglas Hall
56ecc6646d Merge pull request #11607 from CredoReference/invalid-display-courseware-through-lti-iframe
Invalid display courseware through the LTI iframe in IE 10+
2016-03-04 15:29:42 -05:00
Dmitry Viskov
ca82f143b0 When using in-frame LTI navigation in IE 10 & 11, problems are not rendering properly.
The problems render properly in IE 10 & 11 when using edX directly, or when opening LTI in a new tab.
This is reproducible in Canvas and D2L
2016-03-03 12:27:21 +03: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
Sanford Student
45f8e526c0 making check more generic 2016-02-17 09:22:27 -05:00
Sanford Student
52d8cb009f MA-1882 adding tests and reworking regex to exclude blocks routes 2016-02-12 09:35:29 -05:00
Sanford Student
b92c12cbe5 MA-1882 adding course api to regex 2016-02-11 16:03:52 -05:00
David Ormsbee
be25bb8aba Clear caches between tests for ModuleStoreTestCase/SharedModuleStoreTestCase
Cached values were leaking across tests, causing difficult to debug errors,
particularly when using Config Models. As part of this work, certain tests
that had query counts that relied on those values being cached needed to
be adjusted up.
2016-02-06 00:01:15 -05:00
Robert Raposa
29fe2c7b0c Move markup helpers to djangolib 2016-02-05 02:42:43 -05:00
Kevin Falcone
2d9708da03 Remove uses of using() from migrations
This hardcoded the db_alias fetched from schema_editor and forces django
to try and migrate any second database you use, rather than routing to
the default database.  In testing a build from scratch, these do not
appear needed.

Using using() prevents us from using multiple databases behind edxapp.

Additionally - add back a removed backwards migration from certificates
0003.  I have no idea why this was dropped in the 1.8 upgrade.
2016-02-01 16:57:26 -05:00
Douglas Hall
37a7fdc0f2 Added subsection gating feature 2016-01-28 14:05:20 -05:00
Nimisha Asthagiri
f3cb692472 Safe Session Cookies Middleware 2016-01-26 17:23:03 -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
Zia Fazal
2f275f31b4 fixed scenario when tests run using cached sql schema 2015-12-31 20:03:28 +05:00
Diana Huang
fab7a071e3 Add new helper methods. 2015-12-15 16:21:14 -05:00
Zia Fazal
2cb2233dde initial change set. add org autocomplete
added unit tests and fixed JS tests

added bok choy tests

fixed broken botchoy tests

fixed course discovery broken test

removed monkey patch at class level

changes after feedback from matte
2015-12-11 18:39:55 +05:00
Peter Fogg
2d40c66361 Fix spurious Zendesk warnings.
We were logging warnings about group names when no group names were
requested. This will clean up Splunk a little bit.
2015-12-09 10:01:14 -05:00
Peter Fogg
5ecb9af294 Merge pull request #10896 from edx/release
Release 2015-12-08
2015-12-08 18:58:14 -05:00
Peter Fogg
a609e074c7 Fix Unicode errors in financial assistance. 2015-12-08 16:35:38 -05:00
chrisndodge
4334eb9bd1 Merge pull request #10885 from edx/release
Release
2015-12-08 15:21:48 -05:00
Bill DeRusha
692e5d777a Update copy for HCFA
Update Zendesk ticket to correctly add group.

Add logic to hide new audit certs
2015-12-07 14:18:55 -05:00
Nimisha Asthagiri
d170c92f3b Refactor course_image_url 2015-12-04 11:25:40 -05:00
Ned Batchelder
0872732cf0 Fix pylint C7630 (literal used as attribute) violations
There's no need to use a string literal in setattr, delattr, or the
two-argument form of getattr.
2015-11-23 15:32:54 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
muhammad-ammar
29acc3acfc resolve merge conflicts
test fixes
2015-11-18 19:13:54 +05:00
muhammad-ammar
8d5f153201 Merge remote-tracking branch 'origin/release' into dj18-release-merge
Conflicts:
	common/djangoapps/util/testing.py
	lms/djangoapps/instructor/views/api.py
	lms/djangoapps/teams/tests/test_views.py
	openedx/core/djangoapps/programs/models.py
	openedx/core/djangoapps/user_api/accounts/tests/test_views.py
	requirements/edx/github.txt
2015-11-18 17:53:44 +05:00
wajeeha-khalid
4ea70aeb19 MA-862; accept application/merge-patch+json for comment/thread update 2015-11-13 12:52:21 +05:00
Saleem Latif
c068bc95cf Custom 500 error message should only be seen for Preview 2015-11-12 11:31:25 +05:00
Ned Batchelder
e7fcc743c0 More-correct data migrations
We need to be sure the migrations will work even in the presence of data
from the future.  get_or_create is a problem, because if the data
already exists, there could be more than one record, even if this
migration only creates one.
2015-11-11 09:03:21 -05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Clinton Blackburn
bb0effb75c Updated Zendesk error handling
Properly logging exceptions so we have the complete stacktrace.

ECOM-2792
2015-11-05 11:52:53 -05:00
Matt Drayer
a2fa59cd4b Merge pull request #10308 from edx/ziafazal/SOL-1332
SOL-1332: use a generic function to check if entrance_exam feature is enabled or not
2015-10-26 09:46:22 -04:00
Matt Drayer
487a894fd7 Merge pull request #10264 from edx/ziafazal/log-exception-in-custom-500-handling
log exception in the logs to debug issue on production or sandbox environments
2015-10-26 09:41:53 -04:00
Zia Fazal
9bb6f6e88d use a generic function check if entrance_exam is enabled or not 2015-10-22 16:45:19 +05:00