Commit Graph

569 Commits

Author SHA1 Message Date
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
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
Dennis Jen
a8be702136 Merge pull request #6469 from edx/release
hotfix-2015-01-06
2015-01-06 17:16:32 -05:00
jsa
ce3c650cf9 use modulestore bulk ops in forum views.
JIRA: PLAT-348
2015-01-06 09:59:20 -05:00
Alan Boudreault
68fcdcc030 Add always_cohort_inline_discussions in course settings 2014-12-26 18:03:50 +00:00
David Baumgold
36e77c7463 Fixing pep8 issues 2014-12-11 13:04:49 -05:00
Daniel Friedman
3d91f43030 Support cohorting students via a CSV File.
TNL-735
2014-12-10 09:23:04 -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
e26a0c4308 Fix pep8 violations in some tests 2014-12-02 09:39:23 -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
Sarina Canelake
520935209d s/pylint: disable=W0402/pylint: disable=deprecated-module/ 2014-12-01 11:22:12 -05:00
Sarina Canelake
d14c39a13e Fix exposed pylint violations 2014-12-01 11:22:10 -05:00
Sarina Canelake
b127d2844b s/pylint: disable=C0103/pylint: disable=invalid-name/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
20e2ee9a57 s/pylint: disable=E0611/pylint: disable=no-name-in-module/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
e0f1d3f3f3 s/pylint: disable=C0111/pylint: disable=missing-docstring/ 2014-12-01 11:22:09 -05:00
stv
31d094b5b4 Fix PEP8: E711 comparison to None
should be 'if cond is None:'
2014-11-25 10:16:05 -05:00
stv
74f61875c7 Fix PEP8: W601 .has_key() is deprecated, use 'in' 2014-11-25 10:16:05 -05:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Muhammad Ammar
e8e7e78e09 Merge pull request #5655 from edx/ammar/unit-improvements
Unit Test Improvements
2014-11-05 19:55:39 +05:00
Sarina Canelake
725e4908e3 Remove more pep8 violations 2014-11-04 07:37:41 -05:00
muhammad-ammar
fcaa783e43 Unit Test Improvements
TE-489
2014-10-31 11:55:13 +00:00
Ben Patterson
5703adb722 Merge branch 'release'
Includes rc/2014-10-14
2014-10-16 20:11:55 -04:00
Christina Roberts
f7ef9eb511 Merge pull request #5510 from edx/christina/bug-tnl-543
Pass group_id when getting user thread and comment counts.
2014-10-16 16:03:22 -04:00
cahrens
7133cfc150 Pass group_id when getting user thread and comment counts.
Depends on cs_comments_serivce commit ea218a2b038b59e63fd6593b5598db90223636e1.

TNL-543
2014-10-16 14:32:10 -04:00
jsa
786fc806f5 Add topic selection to inline thread editing, fixing errors
Co-Authored-By: Brian Talbot <btalbot@edx.org>

TNL-549
2014-10-14 15:45:19 -04:00
Andy Armstrong
03b41032ae Merge pull request #5501 from edx/andya/disable-cohorts-ui-bug
Don't show cohort information when disabled
2014-10-09 12:55:07 -04:00
Waqas Khalid
c2ecaa7e30 Forum shouldn't cuase error while searching unicode
If we use unicode character in the search of forum
it will cuase the error which is not the desired
behavior it should check and return result.

TNL-336
2014-10-09 14:40:06 +05:00
Andy Armstrong
3af9eb25b2 Minor cleanups 2014-10-08 15:14:17 -04:00
Andy Armstrong
fbeb57874c Address code review comments 2014-10-08 15:14:16 -04:00
Andy Armstrong
6114cf05f4 Don't show cohort information when disabled
TNL-552
2014-10-08 15:14:16 -04:00
Nimisha Asthagiri
d7f850a764 Merge branch 'release'
Conflicts:
	lms/djangoapps/instructor/features/data_download.py
2014-10-07 16:23:28 -04:00
polesye
f039341d21 TNL-549: Fix thread editing. 2014-10-03 23:27:15 +03:00
jmclaus
c2716d470c TNL-172: Change type of a previously posted post. IMPORTANT: this commit depends on commit 774887b in cs_comments_service. 2014-10-03 18:29:25 +02:00
Don Mitchell
4ca5012f3c Use split to test views 2014-09-29 11:25:55 -04:00
polesye
00c7e60e07 TNL-171: Change topic of a previously posted post. 2014-09-24 20:28:14 +03:00
Waqas Khalid
f94c677a79 Merge pull request #5279 from mlkwaqas/waqas/tnl404-new-post-hidden-breadcrumb
New post should show category/subcategory breadcrumb when created.
2014-09-24 19:20:46 +05:00
Waqas Khalid
2c3cef75bc New post should show category/subcategory breadcrumb when created.
When the new post is created under the subcategory and it appear
after the creation, it doesn't have the link of category/subcategory
after thread body. When we reload the page the link appears. Link
should appear after creation.

TNL-404
2014-09-24 18:19:51 +05:00
jsa
e00d3330fe fix 404s when students access group-less threads in cohorted topics
TNL-444
2014-09-22 15:22:10 -04:00
Adam Palay
7f4da14185 Add middleware optionally to catch unenrolled students who fail has_access (TNL-286) 2014-09-18 11:35:17 -04:00
Jim Abramson
9fc4fbc12a Merge pull request #5172 from edx/jsa/tnl24
test that group_id attribute is present and correct in LMS responses
2014-09-12 15:58:50 -04:00
jsa
d3d4d33064 Ensure group info is present in LMS responses.
TNL-24
2014-09-12 13:47:05 -04:00
cahrens
020094b8fb Create auto cohorts when list_cohorts is called and return number of users per cohort.
TNL-186
2014-09-11 13:51:34 -04:00
Daniel Friedman
4d9517b456 Ensure LMS passes correct group_id when querying content 2014-09-10 16:43:06 -04:00
Sarina Canelake
467f2988e1 Quality cleanup 2014-09-08 12:02:31 -04:00
Waqas Khalid
ac2436f520 User can flag the post whether thread is closed or open
When the thread is closed user can't able to report
the thread and it gives the error. User can now report
thread even it is closed.

TNL-151
2014-09-05 20:58:10 +05:00
Andy Armstrong
8349dbfa42 Implement forum cohort visibility labels correctly
TNL-25
2014-09-04 13:47:48 -04:00
Daniel Friedman
25cbda6638 Test passing group_id in thread creation 2014-09-03 18:14:37 -04:00
Greg Price
80d1cae6a0 Add filter menu to forum nav sidebar
The menu allows filtering to unread, unanswered, or flagged threads.
This includes passing through the appropriate query parameters to the
comments service.
2014-08-29 15:59:33 -04:00
Greg Price
ec482c0dc2 Allow authors of forum questions to mark answers
Co-authored-by: jsa <jsa@edx.org>
2014-08-29 15:59:32 -04:00