Fragment API

Makes the Fragment class available through the old namespace location.

class xblock.fragment.Fragment(*args, **kwargs)

A wrapper around web_fragments.fragment.Fragment that provides backwards compatibility for the old location.

Deprecated.

add_frag_resources(fragment)

Add all the resources from a single fragment to my resources.

This is used to aggregate resources from another fragment that should be considered part of the current fragment.

The content from the Fragment is ignored. The caller must collect together the content into this Fragment’s content.

add_frags_resources(fragments)

Add all the resources from fragments to my resources.

This is used to aggregate resources from a sequence of fragments that should be considered part of the current fragment.

The content from the Fragments is ignored. The caller must collect together the content into this Fragment’s content.