Commit Graph

146 Commits

Author SHA1 Message Date
Mat Peterson
4f6088cbd1 Fixed some isinstance errors with opaque-keys 2014-07-11 15:40:08 -04:00
Waqas Khalid
81dfcb04aa Show thread user to staff when only anonymous_to_peers is true
FOR-122
2014-07-11 13:09:13 +05:00
jsa
994ccd1110 consolidate new post form variants into single client-side template/view 2014-06-29 20:45:22 -04:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -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
Usman Khalid
8b6e3b4422 Replaces print statement in django_comment_client with unicode log.debug.
LMS-2194
2014-03-19 19:36:55 +05:00
Greg Price
9ae6bb0b73 Check for forum data errors in LMS
Some messages generated by the comments service are not readily
translated because they come from third-party libraries. Thus, we plan
to try to avoid showing any comments service generated message to the
user. This check preempts the only end-user-visible CS-generated error
message that we are presently aware of.
2014-02-13 15:44:57 -05:00
Greg Price
4e1c595472 Merge pull request #2377 from edx/gprice/forum-thread-pagination
Add pagination of responses to forum threads
2014-02-03 08:55:20 -08:00
Chris Rossi
0a1ed11daa Make mako template lookups pluggable.
This code adds the ability to add Mako template lookup directories on
the fly, allowing third party add-ons to contribute their own Mako templates.
A new API function for registering Mako templates is introduced::

    from edxmako import add_lookup

    add_lookup('main', '/path/to/templates')

    # Or, specify a package to lookup using pkg_resources.  This will
    # add the 'templates' directory inside the current package:
    add_lookup('main', 'templates', package=__name__)
2014-01-31 13:55:36 -05:00
Greg Price
fba6f2ebb2 Allow LMS to do forum thread response pagination
The relevant parameters and data are merely passed through between the
front end and comments service.
2014-01-30 13:58:46 -05:00
Greg Price
a1dc49cc9b Remove defunct forum post tagging code 2014-01-14 13:03:56 -05:00
David Baumgold
3d2ad59c51 Merge pull request #1907 from edx/db/whitespace-fixes
whitespace-only changes
2013-12-13 11:40:54 -08:00
cahrens
df09e99ad1 Create explicit Locations.
Part of STUD-1030
2013-12-12 14:37:00 -05:00
David Baumgold
28f22393bf whitespace-only changes 2013-12-10 11:45:49 -05:00
David Baumgold
8eff442752 mitxmako => edxmako 2013-12-03 14:15:09 -05:00
Greg Price
c4cdb457de Remove label from forum posts by global staff
The motivation for this change is performance. The forums UI code gets
the list of users for each role and renders the staff label based on
those lists. The list for the staff role is expensive to compute because
there is no index on the is_staff attribute, and we cannot create one
because the User model is built into django.

Users with is_staff=True are still assigned the Moderator role upon
enrolling in a course, so this change will have no practical effect
except that a user who is granted staff privileges after enrolling in a
course will have to be made a Moderator in order for their posts to be
labeled.

Additionally, the UI did not use the list of users with the Student
role, so that list has been removed as well.
2013-11-01 14:16:55 -04:00
Greg Price
87e0ddf398 Fix a typo that caused an error to be raised 2013-10-30 11:18:27 -04:00
Greg Price
e6ecb6ecfe Improve performance of forum views
Avoid recomputing course module information for every thread, which
should dramatically improve the performance of high-percentile latency
queries.

JIRA: FOR-250
2013-10-28 13:04:52 -04:00
Greg Price
a7d769dfea Remove an unnecessary global
The _DISCUSSIONINFO global was originally used as a cache, but has since
lost that capability and is therefore just harmful. This is a precursor
to more refactoring that will improve the performance of the forums and
may itself provide some performance improvement because it separates the
computation done by two functions that each previously computed the
entirety of _DISCUSSIONINFO.
2013-10-28 12:57:51 -04:00
Greg Price
545701d520 Add forum utility code unit test coverage
This is in preparation for significant refactoring of the code in
question.
2013-10-28 11:58:43 -04:00
Greg Price
54ad411078 Remove unused code 2013-10-28 11:58:43 -04:00
Don Mitchell
0848360436 Merge pull request #844 from edx/dhm/editable_metadata
refactoring of platform to xblock 0.3 w/ refactoring of inheritance in the platform to a consistent representation.
2013-09-06 11:58:36 -07:00
Calen Pennington
8201b1412e Use XBlock 0.3 2013-09-06 09:45:59 -04:00
jsa
6e7965d26c update mitxmako lookup / fixes FOR-150 2013-09-05 23:23:52 -04:00
Giulio Gratta
4e77098859 added course level feature flag for forum alpha sorting as well as tests 2013-08-23 12:59:13 -07:00
Giulio Gratta
e0471007d8 removed sort in HTML and instead added conditional to use subcategory titles as sort_key 2013-08-23 12:59:13 -07:00
Kevin Chugh
d95693ebb7 hook up panel to new stats service 2013-07-25 03:23:04 -04:00
Ned Batchelder
57909ce1aa Fix all W0602, global used but no assignment done. 2013-06-21 17:33:23 -04:00
Jason Bau
28ae2b6346 change form of making datetime.max aware (in UTC) 2013-06-17 16:11:35 -07:00
Jason Bau
da2fda1045 Fix for broken forums due to forum entry with no start_date
modification of @jrbl's version to handle a dict with value None
2013-06-15 01:30:42 -07:00
Don Mitchell
168cb306d3 Move tz_aware into connection config rather than settings.
Make django use_tz
2013-06-10 17:16:35 -04:00
Don Mitchell
d7194e6bec struct_time to datetime conversion. 2013-06-10 17:16:34 -04:00
Chris Dodge
fbbae44988 Merge branch 'master' of github.com:edx/edx-platform into feature/cdodge/autoprovision-forums-master
Conflicts:
	cms/djangoapps/contentstore/views/course.py
	lms/djangoapps/django_comment_client/base/views.py
	lms/djangoapps/django_comment_client/management/commands/show_permissions.py
	lms/djangoapps/django_comment_client/models.py
	lms/djangoapps/django_comment_client/tests/test_utils.py
	lms/envs/common.py
2013-05-20 10:22:36 -04:00
Jay Zoldak
71626f4ff6 Pep8 fixes of django_comment_client code 2013-05-16 15:57:34 -04:00
Jay Zoldak
ed5ad46192 Revert "Revert "fix merge conflict""
This reverts commit 2df3fe9344.

Conflicts:
	common/static/coffee/src/discussion/utils.coffee
2013-05-16 10:29:33 -04:00
Chris Dodge
a92910db20 update lms to reflect where comment models.py is now in common 2013-05-06 16:23:32 -04:00
Diana Huang
2df3fe9344 Revert "fix merge conflict"
This reverts commit acfd0d9fd6, reversing
changes made to e4194c99d8.
2013-04-26 12:40:35 -04:00
Your Name
0bcef4ddb7 fix merge conflicts 2013-04-22 12:54:33 -04:00
Your Name
7994e1b344 pep8 fixes 2013-04-22 12:53:30 -04:00
Kevin Chugh
e8c646142f Merge branch 'master' into feature/kevin/flagging 2013-04-21 06:15:55 -04:00
Kevin Chugh
de7c511328 flagging working again 2013-04-05 16:39:22 -04:00
Chris Dodge
e717244611 remove discussion cache, which isn't used 2013-04-05 15:27:50 -04:00
Kevin Chugh
0e8ef28347 flagging almost done 2013-04-05 13:23:09 -04:00
Kevin Chugh
5534d8bdce fix mega merge conflicts 2013-03-29 07:33:52 -04:00
Chris Dodge
a5845a2087 remove discussion caching for now. It might be overkill and I need to figure out how to serialize out the resultset into the cache as writing modules into the cache causes a pickle error 2013-03-21 15:46:57 -04:00
Chris Dodge
9a18685c1c add a discussion module write through cache to speed up Forum rendering 2013-03-18 09:01:54 -04:00
Calen Pennington
029d8c8085 Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged
Conflicts:
	common/lib/xmodule/xmodule/capa_module.py
	common/lib/xmodule/xmodule/tests/test_capa_module.py
2013-03-15 09:46:47 -04:00
Kevin Chugh
8d766c4b51 fix conflict 2013-03-13 21:01:37 -04:00
Your Name
8280c55992 pinning .1 2013-03-12 17:40:26 -04:00
Calen Pennington
2113541632 Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged
Conflicts:
	.ruby-version
	cms/djangoapps/contentstore/tests/test_contentstore.py
	cms/djangoapps/models/settings/course_metadata.py
	common/lib/xmodule/xmodule/course_module.py
	common/lib/xmodule/xmodule/modulestore/tests/factories.py
2013-03-12 07:23:28 -04:00