Commit Graph

30 Commits

Author SHA1 Message Date
John Eskew
211cef0814 Ignore IntegrityErrors upon set_many update save(). 2016-08-24 13:48:42 -04:00
John Eskew
2252ce6abf Ignore IntegrityErrors upon set_many update save(). 2016-08-24 13:18:03 -04:00
J. Clifford Dyer
7b75d1d452 Add transformer that collects grading data.
TNL-4449
2016-05-26 16:15:34 -04:00
Ned Batchelder
2e1238b83e Remove unused imports 2016-04-08 11:23:05 -04:00
Kevin Falcone
6f9a3911e5 Implement a BaseStudentModuleHistory
This abstract class contains most of the fields (aside from the id and
foreign key to StudentModule that the subclasses need to manage).  It
also provides a get_history method that abstracts searching across
multiple backends.

Move router code to openedx/core
We need to use it from cms and lms.
Ensure aws_migrate can be used for migrating both the lms and cms.

Handle queries directed to student_module_history vs default and the
extra queries generated by Django 1.8 (SAVEPOINTS, etc).

Additionally, flag testing classes as multi_db so that Django will
flush the non-default database between unit tests.

Further decouple the foreignkey relation between csm and csmhe

When calling StudentModule().delete() Django will try to delete CSMHE
objects, but naively does so in the database, not by consulting the
database router.

Instead, we disable django cascading deletes and listen for post_delete
signals and clean up CSMHE by hand.

Add feature flags for CSMHE
One to turn it on/off so we can control the deploy.
The other will control whether or not we read from two database tables
or one when searching.

Update tests to explicitly use this get_history method rather than
looking directly into StudentModuleHistory or
StudentModuleHistoryExtended.

Inform lettuce to avoid the coursewarehistoryextended app

Otherwise it fails when it can't find features/ in that app.

Add Pg support, this is not tested automatically.
2016-02-29 13:59:27 -05:00
Sarina Canelake
8928e9ef19 Remove CallStackManager (PLAT-931) 2015-12-08 10:21:55 -05:00
John Eskew
ac05012d23 Add response times to get_many/set_many/delete_many. 2015-11-05 11:02:49 -05:00
Calen Pennington
ec49576eb4 Merge pull request #9387 from cpennington/csm-count-requested-blocks
Record the number of blocks requested in get_many
2015-09-03 13:37:30 -04:00
utkjad
387303d364 Injecting call stack manager in CSM/CSMH,introducting @trackit,@wrapt, and refining implementation[PLAT-758] 2015-08-26 22:29:43 +00:00
Calen Pennington
26f06d4a55 Record the number of blocks requested in get_many 2015-08-20 10:40:27 -04:00
Calen Pennington
3f9027d05e Log delete_many calls and metrics 2015-08-14 10:22:24 -04:00
Calen Pennington
448356ed3e Log the size of block state and the number of blocks missing state when retrieved with get_many 2015-08-13 16:32:05 -04:00
Calen Pennington
31f29763fd Increase sample rate when measuring DjangoXBlockUserStateClient metrics 2015-08-13 16:31:33 -04:00
Calen Pennington
93b1b69854 Don't violate the empty-dict vs None semantics of student_module during delete_many 2015-08-10 14:42:18 -04:00
John Eskew
f3e59acbf1 Add DataDog histogram events to DjangoXBlockUserStateClient class. 2015-08-04 17:14:05 -04:00
Calen Pennington
aa374ca12a Make DjangoXBlockUserStateClient pass semantic tests
This required the following changes to the DjangoXBlockUserStateClient
semantics:

1) Changes get/get_many to return XBlockUserState tuples, rather
than state dictionaries or (block_key, state) tuples.
2) Raises DoesNotExist if get_history is called on an XBlock that has
had no data saved to it.
3) Returns XBlockUserState tuples as the results of get_history.
2015-08-01 08:13:25 -04:00
Calen Pennington
53b37e7412 Remove extraneous documentation, contracts, and method definitions 2015-08-01 08:13:25 -04:00
utkjad
b85b50d11a Removing @contract 2015-07-31 17:44:16 +00:00
Sarina Canelake
b26f2af585 Revert "Adding entries of Call Stack Manager in StudentModule and StudentModuleHistory" 2015-07-07 05:45:23 -04:00
utkjad
10a3863832 Enable CallStackManager on StudentModule and StudentModuleHistory to capture any use outside of DjangoXBlockUserStateClient 2015-07-06 18:11:05 +00:00
Utkarsh
dac018f459 Adding dependency for edx-user-state-client 2015-06-25 03:10:50 +00:00
Calen Pennington
0f6ef44476 Don't pass in a user object to DjangoUserStateClient 2015-06-12 12:37:49 -04:00
Ali Mohammad
69772ef20e Convert access to StudentModuleHistory to use the UserStateClient API. 2015-06-12 12:37:34 -04:00
Calen Pennington
3e8631c214 Make the use of StudentModules explicit in variable names in user_state_client.py 2015-05-20 15:33:30 -04:00
Calen Pennington
7d2909c5b5 Add contracts to DjangoXBlockUserStateClient interface methods 2015-05-20 15:33:29 -04:00
Calen Pennington
2e06e592ca Use DjangoXBlockUserStateClient to implement UserStateCache 2015-05-20 15:33:29 -04:00
Calen Pennington
674b68b7e3 Add implementation of get_many and set_many to DjangoXBlockUserStateClient 2015-05-20 15:07:28 -04:00
Calen Pennington
1ec4ae7c26 Add more documentation to XBlockUserStateClient interface 2015-05-20 15:07:28 -04:00
Calen Pennington
4c3fb2d07e Enforce user-state only for StudentModule backend Client 2015-05-20 15:07:28 -04:00
Calen Pennington
c9dbd2c308 Add an empty implementation of XBlockUserStateClient backed by StudentModule 2015-05-20 15:07:27 -04:00