Commit Graph

4136 Commits

Author SHA1 Message Date
Calen Pennington
2bfbd57ec1 Add a test case for an XBlock that has no student state fields, but sets a score 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
257660ed85 Move query-chunking into StudentModule and related ORM-objects 2015-05-20 15:33:29 -04:00
Calen Pennington
cacdbc35d7 Remove the ability to select_for_updates from FieldDataCache.
The only consumer of that functionality (the XQueue callback) already
does retries, so newly introduce integrity errors (due to multiple
commiters trying to update a StudentModule) won't break the XQueue
processing pipeline.
2015-05-20 15:07:29 -04:00
Calen Pennington
e6db0af1f1 Use current OpaqueKeys methods when loading a block for the XQueue callback 2015-05-20 15:07:29 -04:00
Calen Pennington
8d9d6ce0ec Clarify the interface used by xqueue_callback to load an XBlock 2015-05-20 15:07:28 -04:00
Calen Pennington
917ea90dc3 Inline some private methods in UserStateCache 2015-05-20 15:07:28 -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
Calen Pennington
57d5fa28b5 Reorder methods in UserStateCache 2015-05-20 15:07:27 -04:00
Calen Pennington
3ea74743ee Flatten DjangoOrmFieldCache methods into UserStateCache 2015-05-20 15:07:27 -04:00
Calen Pennington
8c959528bc Add a last_modified method to FieldDataCache 2015-05-20 15:07:27 -04:00
Calen Pennington
3430024d22 Add a temporary set_grade method to the FieldDataCache and UserStateCache 2015-05-20 15:07:26 -04:00
Calen Pennington
c3bb2e9b3a Use per-type cache set_many calls in FieldDataCache set_many 2015-05-20 15:07:26 -04:00
Calen Pennington
60e436c290 Push get down into per-type caches 2015-05-20 15:07:26 -04:00
Calen Pennington
407db16938 Implement per-type set methods in terms of set_many methods 2015-05-20 15:07:25 -04:00
Calen Pennington
12740fa4ac Make test_model_data test_set_many_failure slightly more robust 2015-05-20 15:07:25 -04:00
Calen Pennington
67d66184a7 Push set_many save() calls into per-type caches 2015-05-20 15:07:25 -04:00
Calen Pennington
97c2513ed8 Push set_many object creation down into per-type caches 2015-05-20 15:07:24 -04:00
Calen Pennington
a0555d4cdc Add more documentation to DjangoOrmFieldCache 2015-05-20 15:07:24 -04:00
Calen Pennington
7a9923e289 Inline find_or_create 2015-05-20 15:07:24 -04:00
Calen Pennington
6ce7cc771a Move has logic down into per-scope caches 2015-05-20 15:07:23 -04:00
Calen Pennington
43d41d6648 Move delete logic down into per-scope caches 2015-05-20 15:07:23 -04:00
Calen Pennington
d1fae17ca2 Move the logic from find into the methods that use it 2015-05-20 15:07:23 -04:00
Calen Pennington
3bcd5ceb50 Push has down into FieldDataCache from DjangoKeyValueStore 2015-05-20 15:07:23 -04:00
Calen Pennington
9338b6a480 Push delete down into FieldDataCache from DjangoKeyValueStore 2015-05-20 15:07:22 -04:00
Calen Pennington
ebb3c906ff Push set_many down into FieldDataCache from DjangoKeyValueStore 2015-05-20 15:07:22 -04:00
Calen Pennington
951c19d789 Push get down into FieldDataCache, from DjangoKeyValueStore 2015-05-20 15:07:22 -04:00
Calen Pennington
5df3c22651 Push cache_key transformations inside the cache objects 2015-05-20 15:07:21 -04:00
Calen Pennington
29606a170d Extract common django-orm-backed-cache functionality 2015-05-20 15:07:21 -04:00
Calen Pennington
7909bee511 Stop leaking private _data members from per-scope caches 2015-05-20 15:07:21 -04:00
Calen Pennington
01cf2a3225 Store cache objects, rather than dictionaries generated by cache objects 2015-05-20 15:07:21 -04:00
Calen Pennington
21bcf55dba Extract _all_block_types and _all_usage_keys out of cache class 2015-05-20 15:07:20 -04:00
Calen Pennington
4463f71148 Separate caching for particular fields from instantiating the cache 2015-05-20 15:07:20 -04:00
Calen Pennington
0d37ec8099 Change the central cache to store at two levels: first by scope, then by cache key 2015-05-20 15:07:20 -04:00
Calen Pennington
645d2a727f Move field_object -> cache_key transformations to the scope-specific caches 2015-05-20 15:07:19 -04:00
Calen Pennington
7353d40b16 Push field_object iteration inside _retrieve_fields, and rename to _cache_fields 2015-05-20 15:07:19 -04:00
Calen Pennington
9059727672 Extract cache instantiation into classes per-scope 2015-05-20 15:07:19 -04:00
Calen Pennington
fd0c47bc42 Extract query chunking from FieldDataCache 2015-05-20 15:07:18 -04:00
Calen Pennington
4312c0e763 Enable PyContracts during tests 2015-05-20 15:07:18 -04:00
Chris Dodge
f655e7c380 need to urlencode the course_id when constructing the registration redirect query string 2015-05-20 14:05:00 -04:00
Sarina Canelake
c7424dd7ae Supply default url for XQA server 2015-05-19 14:19:04 -04:00
David Baumgold
37ab2fc16a Wrap block with license info in LMS only 2015-05-18 14:35:08 -04:00
David Baumgold
2159d34128 Added a simple XBlockMixin for courseware licenses
This allows course authors to choose between two difference licenses for their
course content: All Rights Reserved, or Creative Commons. In the backend, XBlocks
that wish to allow custom licenses need only inherit from LicenseMixin, which
adds a `license` field as a string.

License information is displayed in the Studio editor view, and just below the
rendered XBlock in the LMS. In addition, if the course block itself has a custom
license set, this license will display just below the main body of the page
on courseware pages.

This entire feature is gated behind the LICENSING feature flag.
2015-05-18 14:34:28 -04:00
christopher lee
5cef287c5d MA-635 Block Mobile Content for unfulfilled milestones
Previously, the mobile api did not check for pre-requisite courses
or entrance exams. This change checks for these milestones and then
returns course content accordingly.
2015-05-15 09:39:54 -04:00
Ned Batchelder
7c704f3959 Move xmodule_modifiers.py to openedx/core/lib/xblock_utils.py 2015-05-14 16:03:50 -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