Commit Graph

68 Commits

Author SHA1 Message Date
Renzo Lucioni
1f0e61baa9 Speed up comment client tests
Also accelerates forums UnicodeTestCases
2016-03-01 14:41:52 -05:00
Ned Batchelder
43ac38aa87 Add autospec to all mocks 2015-12-09 09:44:22 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -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
Sven Marnach
ef563e4285 Add tests for the discussion forum vote events. 2015-11-18 16:22:59 +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
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
Peter Fogg
607bd538e6 Update discussion events to include team_id when appropriate.
TNL-3196
2015-09-04 13:10:39 -04:00
Peter Fogg
38fb6eaede Add signals for user's discussion activity.
These signals are caught by the Teams app and used to update
`last_activity_at` on both teams and individual users.

TNL-2497
2015-08-26 12:07:54 -04:00
Peter Fogg
5c855bdc7b Fix quality violation. 2015-08-20 15:15:14 -04:00
Mushtaq Ali
c80906596b Fix Forum Update Issue #TNL-3101 2015-08-20 13:08:41 -04:00
Peter Fogg
90d8774745 Test that discussion admins can delete team posts. 2015-08-07 09:46:12 -04:00
Daniel Friedman
f5840489a0 Allow editing of own post in team discussion 2015-08-06 11:15:55 -04:00
Diana Huang
bc2892f2d3 Merge pull request #9142 from edx/diana/context-aware-comment-client
Make context for threads more implicit.
2015-07-31 10:29:29 -04:00
Diana Huang
c12c2933a7 Make context for threads more implicit. 2015-07-31 08:58:01 -04:00
cahrens
9d3e2c1a08 Ignore team membership for privileged users. 2015-07-30 17:06:40 -04:00
cahrens
01c22531d7 Add team permission check on commentable_id.
TNL-2864
2015-07-30 13:56:08 -04:00
Ben McMorran
6b08bb20f8 TNL-1943 Support thread context for team discussions 2015-07-28 17:18:45 +00:00
Ben McMorran
d36eb83a03 Add query count tests 2015-07-15 14:56:04 +00:00
Ben McMorran
a119b723fd TNL-2389 Use discussion id map cache for thread creation and update 2015-07-13 20:56:50 +00:00
Ned Batchelder
425b766965 Remove TEST_DATA_MOCK_MODULESTORE 2015-03-17 17:21:52 -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
Jonathan Piacenti
be02613aac Do event tracking for major forum events. 2015-02-25 23:30:30 +00: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
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -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
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
74f61875c7 Fix PEP8: W601 .has_key() is deprecated, use 'in' 2014-11-25 10:16:05 -05:00
muhammad-ammar
fcaa783e43 Unit Test Improvements
TE-489
2014-10-31 11:55:13 +00: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
polesye
00c7e60e07 TNL-171: Change topic of a previously posted post. 2014-09-24 20:28:14 +03:00
jsa
d3d4d33064 Ensure group info is present in LMS responses.
TNL-24
2014-09-12 13:47:05 -04:00
Daniel Friedman
4d9517b456 Ensure LMS passes correct group_id when querying content 2014-09-10 16:43:06 -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
Daniel Friedman
25cbda6638 Test passing group_id in thread creation 2014-09-03 18:14:37 -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
Greg Price
c23a27bac4 Add post type control to forum new post form
Also change server to pass post type through to the comments service.
2014-08-29 15:59:32 -04:00
Nimisha Asthagiri
ea32529866 Fix all modulestore calls to pass in user ids. 2014-07-09 21:10:12 -04:00
jsa
c2ebfde429 implement forums endpoint for searching users 2014-06-16 10:12:52 -04:00
Calen Pennington
cd746bf8e5 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds the non-courseware lms/djangoapps and lms/lib.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-08 12:09:23 -04:00
Calen Pennington
ec1b056d82 Use requests library utility method for getting json results 2014-03-28 11:37:43 -04:00
Greg Price
f56de914d5 Do not allow students to pin/unpin forum threads
The wrong permission was being checked for pinning/unpinning, so a
sufficiently clever student could pin and unpin threads.

JIRA: FOR-499
2014-03-12 17:58:31 -04:00
jsa
4c5336e809 django_comment_client: add unit test for (sub)comment deletion.
JIRA: FOR-470
2014-02-20 13:35:26 -05:00
Greg Price
c321ce50f6 Add unit test for updating forum comment 2014-02-18 17:37:03 -05:00