* refactor: make _credit_status function public
This allows for reuse in the new learner home
* feat: add credit to learner home serializers
* feat: get credit statuses for learner home
For edx.org, this will be set to <https://www.edx.org/policy/security>.
The only theme that I'm aware of as supporting this is `edx.org-next` but
other deployments might use this `get_footer` call as well.
This test stopped throwing the `TransactionManagementError` once we added the
`site_configuration.get_value()` call to the language preferences middleware.
in the problemgradereport currently we must currently hold the entire file in memory before writing it all at once. to avoid out of memory celery issues to resolve a blocking bug for some MIT courses, add a temp waffle flag `instructor_task.use_on_disk_grade_reporting` which when activated uses this new report to (hopefully) allow the report to complete. Additional testing and consideration is required for this approach.
Adds new api to return block metadata which includes index_dictionary.
Reason for new api instead of adding it to course blocks API: data like
index_dictionary are too large for the cache used by course/blocks
transformers API.
we were failing to get the course and then going on to try course.field
which would generate a worse exception
also wraps the email send in an exception absorb because a single email
can fail to send for infinitely many boring reasons
This function is no longer needed as all XModules have been converted to XBlocks.
XBLOCK_SELECT_FUNCTION Django setting is removed too, as it could take only `prefer_xmodules` or `default_select` values.
* fix: add missing permission/auth classes to init
* fix: add missing permission class
Django was complaining about adding JWT auth without the
NotJwtRestrictedApplication class which it would add automatically. Add
the class to remove that warning.
* style: use black / isort to fix import ordering
When a student submits a problem answer, the state is stored in a
StudentModule record containing answer, score, correctness, etc. The
record, though, is updated in multiple steps within the single request
(first the grade is updated, then the state is updated separately).
Each partial save would trigger a separate StudentModuleHistory record
to be stored resulting in duplicate and inaccurate historical records.
This solution uses the RequestCache to track within a request thread
which StudentModules are updated and a single corresponding
StudentModuleHistory id. If multiple update actions occur within the
request cycle, then modify the history record that was already
generated to ensure that each submission only results in one
StudentModuleHistory record.
This issue and its solution were discussed in:
https://discuss.openedx.org/t/extra-history-record-stored-on-each-problem-submission/8081