Commit Graph

18 Commits

Author SHA1 Message Date
cahrens
3abc7dc07e isort updates 2017-06-05 13:47:48 -04:00
cahrens
36c51450c2 Adds in radio button patch request and text for page
EDUCATOR-229
2017-06-05 13:00:31 -04:00
Toby Lawrence
2acb4a6cad [PERF-386] Utilize ForumsConfig to enable and disable forums.
This specifically enables/disables the underlying comment service client
used to make calls to the service.  When disabled, this client will now
throw an exception which can be propagated upwards so that callers can
make the right decision about how to notify users of the error, or
handle retry, etc etc.
2016-11-03 10:20:19 -04:00
Calen Pennington
411f1f7964 Use the Django TestClient for forum unit tests, so that middleware is cleaned up properly 2016-06-08 16:43:31 -04:00
Eric Fischer
88a389652b CohortMembership Test Fixes
There are 3 main changes in this commit:
* CohortFactory now sets up memberships properly, so consuming tests do not
need to explicitly touch CourseUserGroup.users to add() users.
* test_get_cohort_sql_queries has been updated to 3 and 9 queries when using
and not using the cache, respectively. This is needed due to each operation
needing an extra queery to get the CourseUserGroup from the CohortMembership.
* Adding remove_user_from_cohort(), the counterpart to add_user_to_cohort().
This is also to keep tests from touching the users field directly, and keep
CohortMembership data in sync.
2015-12-02 15:03:52 -05:00
David Ormsbee
9bac3579c0 Convert CohortedTestCase to use SharedModuleStoreTestCase.
Some low hanging fruit optimization of forums tests.
2015-08-27 20:37:48 -04:00
Daniel Friedman
3acd7a008c Refactor and add tests for new grade report.
* Handle grading errors
2015-05-13 06:58:02 -04:00
Daniel Friedman
9269ec3b00 Add new instructor task for weighted problems 2015-05-12 16:32:00 -04:00
Daniel Friedman
934abf3c19 Check access for discussion modules in forums
TNL-650

Conflicts:
	lms/djangoapps/django_comment_client/base/views.py
	lms/djangoapps/django_comment_client/tests/test_utils.py
	lms/djangoapps/django_comment_client/tests/utils.py
	lms/djangoapps/django_comment_client/utils.py
2015-03-09 15:02:48 -04:00
jsa
13ba2c4a57 Revert "Merge pull request #6771 from edx/dan-f/forums-filter-discussion-modules"
This reverts commit 086a2ba783, reversing
changes made to a44132ec18.  Some minor
code quality issues were addressed as part of this change.

Conflicts:
	lms/djangoapps/django_comment_client/base/views.py
	lms/djangoapps/django_comment_client/utils.py
2015-03-05 16:57:46 -05:00
Daniel Friedman
c8434ef9c8 Check access for discussion modules in forums
TNL-650
2015-02-25 11:31:18 -05:00
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
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]
2015-02-04 09:09:14 -05:00
Andy Armstrong
eced849db0 Add group_access field to all xblocks
TNL-670
2014-12-05 09:55:00 -05:00
jsa
f24f01d217 Add support for user partitioning based on cohort.
JIRA: TNL-710

IMPORTANT: this commit converts the course_groups
package to using migrations.  When deploying to an
existing openedx instance, migration 0001 may fail
with an error indicating that the CourseUserGroup
table already exists.  If this happens, running
the 0001 migration first, with the --fake option,
is recommended.  After performing this step,
remaining migrations should work as expected.
2014-12-05 09:53:44 -05:00
Jesse Zoldak
bf3b87bc64 Clean up all modulestore testcases
Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
2014-12-02 07:09:36 -05:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Daniel Friedman
4d9517b456 Ensure LMS passes correct group_id when querying content 2014-09-10 16:43:06 -04:00
Daniel Friedman
25cbda6638 Test passing group_id in thread creation 2014-09-03 18:14:37 -04:00