diff --git a/xmodule/capa_block.py b/xmodule/capa_block.py index 54ca0cbc312f..9b821c1822c4 100644 --- a/xmodule/capa_block.py +++ b/xmodule/capa_block.py @@ -486,10 +486,22 @@ 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 + return self.location.block_type + suffix - return self.display_name + return self.display_name + suffix def grading_method_display_name(self) -> str | None: """