Commit Graph

603 Commits

Author SHA1 Message Date
Sven Marnach
52f56ddd37 Add feature flag to allow hiding the discussion tab for individual courses. 2015-06-14 20:36:45 +02:00
cewing
6a0c9aee9d MIT CCX: Use CCX Keys
Implement the use of CCX opaque keys throughout the ccx code base

include the new custom ccx id package in the github checkouts list

update the coach dashboard wrapper to get CCX information from the incoming course_id, if possible

update function signatures for all view functions to expect CCX as passed by the dashboard wrapper (default to None), remove calls to get_ccx_for_coach as the ccx is passed in.

update reverse calls in python view code to use a CCXLocator for the URL instead of a CourseLocator

use CCXLocator where necessary

use course id to find ccx, instead of thread local

remove unused method and related tests

use course id for getting ccx

provide course id to the get_current_ccx method

ensure the course id passed in is a CourseKey instance of some type whether it starts out as a string or not

use the provided block to figure out what the course_id should be, then get the ccx for that

redirect to ccx dashboard using coach ccx if no ccx is passed in

update student dashboard listing for ccx to build an appropriate url from a CCXLocator, not from the course locator.

refactor building the ccx locator so we don't have to do it repeatedly

begin test refactoring after ccx_keys introduction

Ensure that when access checking happens, the course_locator form of a ccx locator is used.  This ensures that the access check happens against the course and it is not necesarry to duplicate the entire access control structure for the course.

pick up api change in ccx-keys

create and conditionally use a wrapper for the mixed modulestore returned by xmodule.modulestore.django.modulestore

the wrapper will strip and restore ccx values from CourseKey and UsageKey objects

fix return values on a few methods

remove unused symbol

pull updated ccx-keys package

set course_id on the caching descriptor system to avoid api incompatibilities in some subsystems

use ccx.course instead of self.course

fix get method to find course keys from blocks that are not themselves keys but have a location attribute (which will be a key)

if an item coming out of the db has children, restore the ccx to them as well

if the block passed in has a CCX key, unwrap that before we try to look up the override, otherwise it will never be found.

pick up a change in the ccx keys package that allows for stripping CCX identity from a usage key

begin writing tests to cover this modulestore wrapper

remove the switch_pocs view, the url pattern for it, and the tests that covered it

remove the ccx context and the middleware responsible for setting the current CCX.  These are no longer needed

all dashboard views should raise 404 if a ccx is not provided by the coach_dashboard decorator

code quality

prevent errors resulting from trying to `get` a ccx based on non-unique criteria.

remove obsolete usage of ACTIVE_CCX_KEY

fix setUp method for grading tests to properly create grades for the ccx rather than for the course.

clean up reverse calls

code quality

adding docstrings to clarify purpose of this patch

fix bug in getting ccx for coach

fix grading views to properly fetch a ccx-ified course so that grades for that version will be calculated

fix small errors in modulestore implementation

fix errant merge marker

update call to get_current_ccx after key refactoring merged with tab changes
2015-06-12 00:01:24 -07:00
Diana Huang
cddd387beb Merge pull request #8367 from edx/diana/merge-course-view-and-tab
Refactor and merge CourseViewType and CourseTab.
2015-06-08 16:08:27 -04:00
Diana Huang
7461a2fd37 Refactor and merge CourseViewType and CourseTab.
TNL-2321
2015-06-08 15:18:39 -04:00
Nimisha Asthagiri
d240785b17 MA-722 Render xBlock API Support 2015-06-05 11:18:48 -04:00
Diana Huang
dae137feaa Convert all tabs to the new plugin framework. 2015-06-02 15:05:16 -04:00
Greg Price
8fbfa2398e Add comment creation to discussion API 2015-05-29 11:05:02 -04:00
Greg Price
f891450f50 Add thread creation to discussion API
Also, fix the field-specific error format for all API endpoints.

This requires cs_comments_service commit fdf017c918.
2015-05-26 12:42:40 -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
muzaffaryousaf
67848ff67b Link to learner profile page from username in discussions.
TNL-1503
2015-04-17 17:23:15 -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
e07f45b5dd Removed cohort_config from advanced settings page.
TNL-1258
2015-03-23 09:58:25 +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
6ac1b82bb2 Merge pull request #7356 from edx/ned/fix-or-remove-teardown
Fix or remove tearDown methods that don't use super.
2015-03-18 17:36:17 -04:00
Ned Batchelder
425b766965 Remove TEST_DATA_MOCK_MODULESTORE 2015-03-17 17:21:52 -04: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
f03b943b95 Fix Pylint: W0612(unused-variable) 2015-03-13 20:20:05 -07: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
stv
4131898180 Remove "nopep" pragma 2015-02-27 11:49:51 -08:00
Clinton Blackburn
2fca3f032f Replaced simplejson with json
simplejson has been removed from future versions of Django (which we will eventually use).
2015-02-26 12:13: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
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
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