Commit Graph

10 Commits

Author SHA1 Message Date
Chris Chávez
0bd0e6f4ca refactor: Update get block OLX view to support versions [FC-0062] (#35932)
* Deprecate `get_block_draft_olx`
* Deprecate get olx view in content libraries
* Create `get_block_olx` in xblock API with support of versions
* Create get olx view in xblock
2024-12-05 18:49:23 +00:00
Usama Sadiq
64752ed66c refactor: pyupgrade second iteration (#27459) 2021-05-10 13:56:40 +05:00
Usama Sadiq
25b275bca4 refactor: Ran pyupgrade on openedx/core/djangoapps
Ran pyupgrade on openedx/core/djangoapps/{xblock, xmodule_django, zendesk_proxy}
2021-04-07 18:57:52 +05:00
Jawayria
250c94dc6a BOM-2331: Applied pylint-amnesty to waffle_utils, xblock, xmodule_django, zendesk_proxy, __init__.py 2021-02-04 17:49:15 +05:00
Manjinder Singh
cf350f9c44 fix: Correcting logic for xblock_handler token expiration (#26224)
* fix: Correcting logic for xblock_handler token expiration

The previous math had a date math error which resulted in token expiring in 0-2 days
instead of 2-4 days

Co-authored-by: Feanil Patel <feanil@edx.org>
Co-authored-by: Tim McCormack <tmccormack@edx.org>
2021-02-02 10:52:31 -05:00
Tim McCormack
ec5b78c625 doc: Clarify location and content of xblock token keys (#26259) 2021-01-29 19:44:26 +00:00
Feanil Patel
ceb8b3ac51 feat: Code to use a new set of keys for xblock handlers.
The keys will fallback to the Django SECRET_KEY if it's not set or is an
empty list. Instructions for the rotation process are in a comment near
the usage of the new keys in openedx/core/djangoapps/xblock/utils.py.
2021-01-28 15:08:22 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Braden MacDonald
f31dc19887 Support anonymous users in the Blockstore-based XBlock runtime
Implementation details:
* Anonymous users are assigned a unique ID (like 
  `anon42c08f9996194e2a9339`) which gets stored in the django session.
  `block.scope_ids.user_id` and `block.runtime.anonymous_student_id`
  will both return this value.
* User state for anonymous users is stored in the django cache and
  automatically expires as the cache gets pruned. Because user state is
  stored, anonymous users can use interactive blocks like capa problems.
* There is no mechanism for upgrading to a registered account and
  keeping user state since the user state store for anonymous users
  (EphemeralKeyValueStore) is completely different than the one for
  registered users (DjangoKeyValueStore/"CSM"), and has no "list all
  keys" functionality.
* "User State Summary" field values are shared among [recently active]
  anonymous users but are not shared with registered users.
* Anonymous users can only access the `public_view` of XBlocks, not the
  regular `student_view`.
2019-12-19 16:12:24 -08:00
Braden MacDonald
d3f6ed09d8 Learning Contexts, New XBlock Runtime, Blockstore API Client + Content Libraries
https://github.com/edx/edx-platform/pull/20645

This introduces:
* A new XBlock runtime that can read and write XBlocks that are persisted using
  Blockstore instead of Modulestore. The new runtime is currently isolated so
  that it can be tested without risk to the current courseware/runtime.
* Content Libraries v2, which store XBlocks in Blockstore not modulestore
* An API Client for Blockstore
* "Learning Context" plugin API. A learning context is a more abstract concept
  than a course; it's a collection of XBlocks that serves some learning purpose.
2019-08-30 10:31:15 -07:00