Add history table for course access rule changes.
Provide test utility for simulating restricted access.
Provide `redirect_if_blocked` method for integration with other
parts of the system (will be used for blocking enrollment).
Add info-level logging explaining when and why users are blocked.
This change will also move us to bok-choy instead of lettuce for
these scenarios, and re-enable them. See TE-736.
Includes some refactoring of repeated event-checking code as well.
The previous version of this migration incorrectly handled
disabled configuration. When configuration is disabled,
the embargoed country field was the empty string; calling
str.split(",") produced a list with a single empty list entry,
which is not a valid country code.
Iframe unit in the studio have accesibility issue as there was no title for
Iframe provided as well as placeholder does not specify what changes to made
to add new iframe
TNL-1073
Add Django admin UI for configuring country access
Migrate existing embargo rules into the new tables.
ECOM-996: updated the middleware to use new models and access rules
ECOM-996: added the flag to support old and new formats
ECOM-996: added the api layer for country access settings
ECOM-996: added the api layer for country access settings
ECOM-996 implementing the white and blacklist checks.
ECOM-996 minor re-factoring in api.
ECOM-996 minor re-factoring in api.
ECOM-1025 refactoring the code according to PR feedback.
ECOM-1025 refactoring the code according to PR feedback.
ECOM-1025 deleting cache in model save and delete methods
ECOM-1025 adding basic api test cases file.
ECOM-1025 refactoring the code according to PR feedback.
ECOM-1025 refactoring the code according to PR feedback.
ECOM-1025 refactoring the code according to PR feedback. adding the test cases.
ECOM-1025 removing extra line
ECOM-1025 removing un-used function.
ECOM-1025 removing un-used function.
ECOM-1025 re-factor the code.
ECOM-1025 re-name the test file to test_middleware_access_rules.py. we already had old test_middleware.py
ECOM-1025 adding test cases for newly added models.
ECOM-1025 adding test cases and resolve conflicts.
ECOM-1025 fixing the quality and pep-8 issues.
ECOM-1025 re-factoring the code according to the PR feedback.
ECOM-1025 re-name the variable name.
ECOM-1025 removing the _check_ip_lists and its test cases. also added few missing scenarios test cases.
ECOM-1025 removing un-used line.
Clicking quickly on up/down votes in forums generates a race condition
where the votes can continue going up or down (and I can get e.g. large
negative numbers). This is client-side; the server-side is not affected.
This is caused by safeAjax calling code (including updateWithUndo) not
handling the possible undefined return value. This is returned in the case
where the element that triggers the event is already disabled.
Corrected typo in DiscussionThreadView cleanup: @responseRequest -> @responsesRequest
Resolves TNL-1061
attributes that are serialized/de-serialized to/from MongoDB.
Change access of attributes from dict keys.
Add EditInfo object to encapsulate editing info for block data.
There were no label added for problem with adaptive hint so for the question
added the label and insteat of using for attribute used the label as the
parent of input field
TNL-1074
The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.
In a structure like:
@override_settings(MODULESTORE=store_a)
class BaseTestCase(ModuleStoreTestCase):
def setUp(self):
# use store
@override_settings(MODULESTORE=store_b)
class ChildTestCase(BaseTestCase):
def setUp(self):
# use store
In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.
To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.
[PLAT-419]