Commit Graph

198 Commits

Author SHA1 Message Date
Calen Pennington
6dd6f0c79d Add more tags to comment_client request metrics
This captures real-time metrics for all of the comment client actions,
segregated by course_id, as well as other small-cardinality fields.

The goal is to be able to detect changes in forum usage, with the goal
of alerting on potential error conditions.
2014-03-28 11:37:44 -04:00
Calen Pennington
ec1b056d82 Use requests library utility method for getting json results 2014-03-28 11:37:43 -04:00
Calen Pennington
cb93b66582 Remove unused *args and **kwargs from perform_request 2014-03-28 11:37:43 -04:00
Calen Pennington
d4db0ee7e4 Remove unused methods from comment_client 2014-03-28 11:37:43 -04:00
Jay Zoldak
1de5e565c3 Kill the perfstats module, which is unused 2014-03-18 15:47:36 -04:00
jsa
b20c8f9248 Ensure account creation succeeds before creating comments service user
Also improves handling in cases where account creation did succeed, but
comments service user creation did not.

Depends on commit 88abdd8a0b20bc9816f487b25abdea1953f5661d in https://github.com/edx/cs_comments_service

JIRA: FOR-522
2014-03-18 13:24:30 -04:00
Diana Huang
bce7d9e43d Add tests and clean up A/B testing
Also fixes STUD-1351
2014-03-05 13:46:03 -05:00
Victor Shnayder
281ad63d2b split testing support in the LMS.
Adds a split_test_module XModule, that can choose one of its children
to display, based on a get_condition_for_user API added to the runtime.

To test, add something like this to an xml course, or make equivalent
 tweaks in mongo.

 <vertical url_name="split_test_vert">
    <split_test url_name="split1" experiment_id="0" condition_id_to_child='{"0": "i4x://MITx/6.00x/html/split_test_cond0", "1": "i4x://MITx/6.00x/html/split_test_cond1"}'>
       <html url_name="split_test_cond0">condition 0</html>
       <html url_name="split_test_cond1">condition 1</html>
    </split_test>
  </vertical>

Also needs an experiment configured in the course policy json: e.g.

        "user_partitions": [{"id": 0,
                                      "name": "Experiment 0",
                                      "description": "Unicorns?",
                                      "version": 1,
                                      "groups": [{"id": 0,
                                                        "name": "group 0",
                                                        "version": 1},
                                                        {"id": 1,
                                                        "name": "group 1",
                                                        "version": 1}]}]

(This particular snippet will work inside a course with org MITx
 and course name 6.00x)

Co-Author: Sarina Canelake <sarina@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Diana Huang <diana@edx.org>
Co-Author: Calen Pennington <cale@edx.org>

[LMS-2095]
2014-03-05 13:45:08 -05:00
Calen Pennington
9126777ed7 Add test of local_resource_url in AcidBlock 2014-02-25 14:01:37 -05:00
Calen Pennington
dbc99ef8ad Implement children for pure XBlocks in edx-platform
This requires fixing the javascript api implementation, and adding
an implementation of get_block to the ModuleSystem api.

However, the implementation is incomplete, due to mismatches between
the expectations of XModule and XBlock.

Also adds tests using the Acid block to make sure that the javascript
and python apis for children are working correctly.
2014-02-21 15:01:20 -05:00
Greg Price
1c188c9f89 Send language preference to the comments service 2014-02-12 15:25:34 -05:00
Greg Price
5841d460f0 Clean up usage of CS API key 2014-02-12 15:24:30 -05:00
Calen Pennington
f6731342de Make Studio load XBlock fragment js and css on the client-side
[LMS-1421][LMS-1517]
2014-02-04 15:38:13 -05:00
Calen Pennington
49217ebe8b Allow multiple client-side runtimes on a single page
Make XBlock client-side runtimes proper classes, so that handlerUrl can
be defined in a per-runtime way, and we can have multiple runtimes on a
single page.

[LMS-1630][LMS-1421][LMS-1517]
2014-02-04 08:55:36 -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
Jay Zoldak
bc30addfb9 Unicode changes to support QRF
fixing unit tests

fixing merge error

fixing xqueue submission issue with unicode url (trial 0.1)

fixing fotmats as commented upon

removing yaml file language selection

Unicode changes to support QRF

removed unnecessary pass in modulestore/init.py

fixing merge error

fixing fotmats as commented upon

removing yaml file language selection

fixing pep8 violations

- fixing pylint violations

pylint violation

fixing line spaces and formats

ignore pylint E1101

remove empty line

fixing pylint violations

 pep8 violations

bulk mail unicode/decode

fix migration error

fix pep8 just to push again

more unicode/decode
Final changes to comments and error messages.
2014-01-30 16:20: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
jsa
40fcc6b9a5 Allow new response pagination parameters to pass through thread model.
JIRA: FOR-374
2014-01-28 17:24:37 -05:00
Greg Price
a1dc49cc9b Remove defunct forum post tagging code 2014-01-14 13:03:56 -05:00
Calen Pennington
d937da8d47 Update handler_url support to match the latest in the xblock repo, for both js and python runtimes
[LMS-1613]
2013-12-10 12:04:18 -05:00
Calen Pennington
6d613f9d4e Enable un-authenticated handler urls
Updates to depend on the latest version of XBlock, which includes
support for service-to-service (thirdparty) handler urls, which aren't
authenticated with a user (unlike handler requests coming from the
xblock client-side javascript).

Co-author: Ned Batchelder <ned@edx.org>
2013-11-26 16:29:34 -05:00
Calen Pennington
864d831ce3 Use XBlock handlers for handle_ajax in XModules
Adds xblock handler_url support to the LMS, and makes handle_ajax use
that code.

[LMS-230] [LMS-229]
2013-11-08 11:08:48 -05:00
Calen Pennington
8ddd8c14a4 Fix pylint/pep8 errors 2013-11-08 11:08:48 -05:00
Calen Pennington
da26ae2529 Remove lms/lib from sys.path in favore of using it as the module lms.lib 2013-11-08 11:08:48 -05:00
Greg Price
6bca7de4b0 Avoid CS search endpoint for non-search queries
This change requires cs_comments_service version 31ef160 or later. Now
that the /threads endpoint can filter by commentable_ids, use that
instead of the /search/threads endpoint, which does not sort and
paginate correctly.

Bug: FOR-224
2013-10-31 16:49:01 -04:00
Greg Price
7abaecd8b7 Improve forum error handling
CommentClientError now has sane subclasses that are meaningfully
distinct, and each subclass is handled appropriately. Errors raised by
the requests library are no longer handled by turning them into
CommentClientErrors, since there is no meaningful handling we can do,
and this way we will get more visibility into why errors are occurring.
Also, HTTP status codes from the comments service indicating client
error are correctly passed through to the client.
2013-10-28 11:23:06 -04:00
Greg Price
bd477581b6 Log all comments service requests
Logging the duration of each request will allow us to determine
whether there is a significant difference in the latency reported by
the comments service and that observed by the LMS. Each request will
be assigned a unique identifier to allow correlation of the reported
latency on each end.
2013-10-16 16:31:59 -04:00
Greg Price
62cc9e77bf Use HTTP header for comments service auth
Previously, authentication was done using a URL parameter, which would
appear in various logs. Now, authentication is done more appropriately
with an HTTP header. Note that this requires cs_comments_service commit
cf39aabdd160176ebf206ca19d3ee030161a0b47 or later.
2013-10-11 12:01:44 -04:00
Ned Batchelder
3bbdd2f4c3 No need to invoke classmethods through self.__class__ 2013-10-02 10:35:58 -04:00
Kevin Chugh
62f6e2d52b home button working, default to home when no thread selected 2013-07-29 23:33:50 -04:00
Your Name
6276997180 update checkbox with get settings 2013-07-29 13:26:31 -04:00
Kevin Chugh
d95693ebb7 hook up panel to new stats service 2013-07-25 03:23:04 -04:00
Ned Batchelder
a484224ef5 Remove pointless addition tests 2013-06-27 16:27:39 -04:00
Ned Batchelder
45815e2d03 Remove obsolete file comment_client/legacy.py 2013-06-21 17:33:23 -04:00
Ned Batchelder
df4b512b6f Change wildcard imports into specific imports 2013-06-21 17:33:06 -04:00
Ned Batchelder
3eec09b87a Merge pull request #216 from edx/ned/remove-unused-imports
Ned/remove unused imports
2013-06-20 14:15:31 -07:00
Calen Pennington
308fe26b65 Clean up pep8 E128 issues 2013-06-20 09:08:25 -04:00
Ned Batchelder
61b53713d2 Remove unused imports from lms, as detected by pylint. 2013-06-19 16:56:34 -04:00
Ned Batchelder
98673f8e6a Somehow, when I moved symmath, I left behind its test files!? 2013-05-31 14:39:23 -04:00
Ned Batchelder
9314154ec1 Move loncapa grading helpers into the sandbox-packages directory. 2013-05-31 12:01:33 -04:00
Greg Price
787366fe02 Remove tags for comment client request time histogram in Datadog
According to someone from Datadog, this was generating tags like "knowledgeable_
people_who_put_this_course_together._this_is_harvard._you_can_t_tell_us_there_s_
a_shortage_of_editorial_talent." They say that they can handle tens or hundreds
of unique tags but not thousands. Given that we have a unique URL for each
thread, we can't even use that as a tag. Thus, all tags are removed for now
until we can determine whether there is a useful set of tags with small enough
cardinality. In light of this, I did not investigate why the long tag mentioned
above was being generated.
2013-05-22 14:12:25 -04:00
Nate Hardison
cc7b2942ee Handle Heroku's 503 maintenance mode response
The LMS comment client previously would try to parse the response
as JSON, choke, and return a 500 to the client. Now, the LMS client
displays a message indicating that the forums are down for
maintenance.
2013-05-21 10:03:51 -07:00
Kevin Chugh
ef3204da69 Merge pull request #2059 from edx/feature/zoldak/forum-testing
Feature/zoldak/forum testing
2013-05-17 10:10:55 -07:00
Ned Batchelder
e947218285 Merge master to here. 2013-05-16 14:21:51 -04:00
Jay Zoldak
3b8a8a13b0 Revert "Revert "Merge pull request #1883 from MITx/feature/kevin/flagging_refactor_verbs""
This reverts commit 5560a4add4.
2013-05-16 10:29:33 -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
Greg Price
87cc4fab5a Add tags to comment service request Datadog timer 2013-05-14 14:49:56 -04:00
Greg Price
c8970cafee Add comment service request time logging to Datadog 2013-05-14 11:32:40 -04:00
Diana Huang
c6f63140a2 Hide the API key during logging. 2013-05-07 16:38:38 -04:00
Ned Batchelder
7c498be606 Move packages around so we can install packages into the sandbox. 2013-05-06 10:55:05 -04:00