Ejemplo n.º 1
0
def _get_release_date_from(xblock):
    """
    Returns a string representation of the section or subsection that sets the xblock's release date
    """
    source = find_release_date_source(xblock)
    # Translators: this will be a part of the release date message.
    # For example, 'Released: Jul 02, 2014 at 4:00 UTC with Section "Week 1"'
    return _('{section_or_subsection} "{display_name}"').format(
        section_or_subsection=xblock_type_display_name(source),
        display_name=source.display_name_with_default)
Ejemplo n.º 2
0
def _get_release_date_from(xblock):
    """
    Returns a string representation of the section or subsection that sets the xblock's release date
    """
    source = find_release_date_source(xblock)
    # Translators: this will be a part of the release date message.
    # For example, 'Released: Jul 02, 2014 at 4:00 UTC with Section "Week 1"'
    return _('{section_or_subsection} "{display_name}"').format(
        section_or_subsection=xblock_type_display_name(source),
        display_name=source.display_name_with_default)
Ejemplo n.º 3
0
def _get_release_date_from(xblock):
    """
    Returns a string representation of the section or subsection that sets the xblock's release date
    """
    return _xblock_type_and_display_name(find_release_date_source(xblock))
Ejemplo n.º 4
0
def _get_release_date_from(xblock):
    """
    Returns a string representation of the section or subsection that sets the xblock's release date
    """
    return _xblock_type_and_display_name(find_release_date_source(xblock))
Ejemplo n.º 5
0
 def _verify_release_date_source(self, item, expected_source):
     """Helper to verify that the release date source of a given item matches the expected source"""
     source = utils.find_release_date_source(item)
     self.assertEqual(source.location, expected_source.location)
     self.assertEqual(source.start, expected_source.start)
Ejemplo n.º 6
0
 def _verify_release_date_source(self, item, expected_source):
     """Helper to verify that the release date source of a given item matches the expected source"""
     source = utils.find_release_date_source(item)
     self.assertEqual(source.location, expected_source.location)
     self.assertEqual(source.start, expected_source.start)