Skip to content

Commit

Permalink
refactor: change block types setting name
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-canon committed Jun 28, 2023
1 parent 5d525d7 commit a16a966
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eox_nelp/stats/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_course_metrics(course_key):
for sequential in sequentials:
verticals += sequential.get_children()

allowed_block_types = stats_settings.get("ALLOWED_VERTICAL_BLOCK_TYPES", [])
allowed_block_types = stats_settings.get("API_XBLOCK_TYPES", [])
components = {key: 0 for key in allowed_block_types}

for vertical in verticals:
Expand Down
2 changes: 1 addition & 1 deletion eox_nelp/stats/tests/tests_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def test_set_empty_allowed_components(self):

self.assertFalse(course["components"])

@override_settings(STATS_SETTINGS={"ALLOWED_VERTICAL_BLOCK_TYPES": ["html", "problem", "video"]})
@override_settings(STATS_SETTINGS={"API_XBLOCK_TYPES": ["html", "problem", "video"]})
def test_set_allowed_components(self):
"""This modifies the STATS_SETTINGS value in order to test that
the components returns the expect type of components.
Expand Down

0 comments on commit a16a966

Please sign in to comment.