Commit Graph

102 Commits

Author SHA1 Message Date
M. Rehan
31b180beb3 Skip orphans while getting discussion modules 2016-01-29 11:09:00 +05: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
Brian Beggs
141e0a93c7 Merge branch 'master' into dj18-release-merge 2015-11-19 13:36:13 -05:00
Sven Marnach
3dcc3c4aae Clean up occurrences of SlashSeparatedCourseKey in the django_comment_client app.
The preferred form is to use CourseKey.from_string() instead of
SlashSeparatedCourseKey.from_deprecated_string().
2015-11-18 16:37:57 +01: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
Ned Batchelder
322ca34b20 Remove pylint pragmas from "class Meta"
Also remove useless docstrings where they were added to keep pylint
quiet.
2015-10-21 07:37:00 -04:00
mushtaqali
296f75a07c Add template escaping in forums, progress page and course container TNL-2395, TNL-2394, TNL-2393 2015-10-07 11:20:51 -04:00
Will Daly
8555630df7 Upgrade djangorestframework to v3.1
* Upgrade edx-submissions
* Upgrade edx-ora2
* Upgrade edx-val
* Upgrade edx-proctoring
* Update all edx-platform code that depends on DRF, including:
  - auth_exchange
  - cors_csrf
  - embargo
  - enrollment
  - util
  - commerce
  - course_structure
  - discussion_api
  - mobile_api
  - notifier_api
  - teams
  - credit
  - profile_images
  - user_api
  - lib/api (OAuth2 and pagination)
2015-09-25 12:40:57 -04:00
muhammad-ammar
6a5ce5d544 Upgrade factory_boy
TNL-3179
2015-09-18 18:02:38 +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
Peter Fogg
2f7fa6fd8b Enforce discussions permissions in teams UI.
Adds a read-only mode to the discussion module which disables any
controls for updating the discussion (votes, follows, replies,
etc). This mode is enabled for users who are not a member of the team,
and are also not moderators, admins, or community TAs.
2015-08-06 11:15:56 -04:00
Diana Huang
1c6c1654be Add the creator of a team to that team.
TNL-1908
2015-08-04 16:08:40 -04:00
Ben McMorran
6d48e1360d Extend is_commentable_cohorted to support teams 2015-07-31 20:22:31 +00:00
Ben McMorran
4a78271851 Move is_commentable_cohorted to django_comment_client 2015-07-30 20:59:34 +00:00
Ben McMorran
2cf3390ba8 Merge pull request #8837 from edx/benmcmorran/discussion-caching-3
TNL-2389 Use discussion id map cache for thread creation and update
2015-07-17 11:33:02 -04:00
Sarina Canelake
49f78b4742 Remove logging-not-lazy Pylint violations 2015-07-13 17:34:54 -04:00
Sarina Canelake
39d3537410 Pylint logging-format-interpolation: Convert logging calls to use %s formatting 2015-07-13 17:33:29 -04:00
Ben McMorran
a119b723fd TNL-2389 Use discussion id map cache for thread creation and update 2015-07-13 20:56:50 +00:00
Ben McMorran
ccf20e52b1 TNL-2458 Cache discussion id mapping on course publish 2015-07-13 20:12:52 +00:00
Diana Huang
dae137feaa Convert all tabs to the new plugin framework. 2015-06-02 15:05:16 -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
Christine Lytwynec
ddb1ae667e Split lms unittests into multiple shards 2015-05-07 09:17:26 -04:00
Usman Khalid
c50f828187 Fixes after rebase. 2015-03-23 19:03:31 +05:00
muzaffaryousaf
e6c75529c0 Cohort discussion topics via UI in instructor dashboard.
TNL-1256
2015-03-23 14:28:22 +05:00
Usman Khalid
d382f569c8 Refactor django_comment_client.utils.prepare_content() to query
course cohort settings only once.

TNL-1258
2015-03-23 09:57:07 +05:00
Usman Khalid
d59be9949e Use cohort settings from CourseCohortSettings.
TNL-1258
2015-03-23 09:43:00 +05:00
Ned Batchelder
81d17c516e Fix or remove tearDown methods that don't use super.
Update edx-lint to the version that checks if tearDown uses super.

Convert a number of tearDown methods into addCleanup.

Remove some unneeded tearDown methods: no need to call patch.stopall if
none of them were started with patch.start.
2015-03-17 15:14:52 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
stv
e7e9a16379 Fix Pylint: W0403(relative-import) 2015-03-13 20:20:04 -07:00
stv
268cb46d97 Fix Pylint: E0211(no-method-argument)
I can find no other record of this class.
2015-03-13 20:20:04 -07: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
Daniel Friedman
a79bf683b0 Fix failing forums unit test. 2015-03-06 11:09:12 -05:00
David Baumgold
dca05a6095 Merge branch 'release' 2015-03-06 08:54:22 -05: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
Matjaz Gregoric
639ab0dc70 Fix issues with duplicate discussion targets.
When two or more instances of Discussion XBlock were configured
with the same discussion target (Category/Subcategory),
only one of the blocks would be shown on the Course Discussion page.
This was the source of several bugs when trying to edit discussion threads.

This patch adds incrementing numbers to the title of each duplicate
subcategory when rendering the Course Discussion to make sure that
all of the threads are visible in Course Discussion.
2015-03-03 23:55:15 +08:00
Daniel Friedman
c8434ef9c8 Check access for discussion modules in forums
TNL-650
2015-02-25 11:31:18 -05:00
stv
971713d0c2 Remove unreferenced mustache_helpers code
I can't seem to find any references to this code outside of the library
and the tests themselves.
2015-02-16 22:50:11 -08: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
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
David Baumgold
36e77c7463 Fixing pep8 issues 2014-12-11 13:04:49 -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
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
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
polesye
f039341d21 TNL-549: Fix thread editing. 2014-10-03 23:27:15 +03:00
Don Mitchell
4ca5012f3c Use split to test views 2014-09-29 11:25:55 -04:00
jsa
d3d4d33064 Ensure group info is present in LMS responses.
TNL-24
2014-09-12 13:47:05 -04:00