Files
edx-platform/lms/djangoapps/courseware/transformers.py
Feanil Patel 8143796b26 docs: update references from setup.py to pyproject.toml
Update documentation, comments, and docstrings throughout the codebase
to reflect the migration from setup.py to pyproject.toml:

- Transformer class docstrings: changed to reference "entry point name
  in the package configuration" for better future-proofing
- Block structure module docs: updated to reference pyproject.toml
- Test file comments: updated entry point references
- Config files (tox.ini, pytest.ini): updated references
- Documentation (extension_points.rst, course apps ADRs): updated to
  reference pyproject.toml with inclusive language for external packages
- Requirements documentation (github.in): updated with inclusive language
- edxmako README: modernized install command to use pip install

Historical ADRs and references to external packages that may still use
setup.py were intentionally left unchanged or updated with inclusive
language acknowledging both pyproject.toml and setup.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 10:46:16 -05:00

47 lines
1.3 KiB
Python

"""
Courseware BlockTransformer implementations
"""
from openedx.core.djangoapps.content.block_structure.transformer import (
BlockStructureTransformer,
FilteringTransformerMixin,
)
class OpenAssessmentDateTransformer(FilteringTransformerMixin, BlockStructureTransformer):
"""
BlockTransformer to collect all fields related to dates for openassessment problems.
"""
WRITE_VERSION = 2
READ_VERSION = 1
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return 'open_assessment_transformer'
@classmethod
def collect(cls, block_structure):
"""
Collects any information that's necessary to execute this
transformer's transform method.
"""
block_structure.request_xblock_fields(
'valid_assessments',
'submission_start',
'submission_due',
'title',
'graded',
'format',
'has_score',
'date_config_type',
)
def transform_block_filters(self, usage_info, block_structure):
# This Transformer exists only to collect fields needed by other code, so it
# doesn't transform the tree.
return block_structure.create_universal_filter()