Skip to content

Commit

Permalink
revert: temp: suffix with upstream info, for testing
Browse files Browse the repository at this point in the history
This reverts commit 5353d2c.
  • Loading branch information
kdmccormick committed Jul 29, 2024
1 parent 20369d6 commit 4706705
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions xmodule/capa_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,22 +486,10 @@ def display_name_with_default(self):
Default to the display_name if it isn't None or not an empty string,
else fall back to problem category.
"""
# @@TODO: temporary suffix code
from openedx.core.djangoapps.content_libraries.sync import BadUpstream
try:
upstream_meta = self.get_upstream_meta()
except BadUpstream:
suffix = ""
else:
latest = upstream_meta.version_num
suffix = f" [v{self.upstream_version}]"
if self.upstream_version < latest:
suffix += f" [UPDATE AVAILBLE: v{latest}]"

if self.display_name is None or not self.display_name.strip():
return self.location.block_type + suffix
return self.location.block_type

return self.display_name + suffix
return self.display_name

def grading_method_display_name(self) -> str | None:
"""
Expand Down

0 comments on commit 4706705

Please sign in to comment.