Skip to content

Copyright endpoint does not include thumbnail field when image name is changed #3117

@emmachughes

Description

@emmachughes

Thumbnails in the copyright info are only included if the image's contentName parameter equals Image:

https://github.com/cerpus/Edlib/blob/cd932c0180b2bf725800ed8c426ce60972aa3d7a/sourcecode/apis/contentauthor/app/Libraries/H5P/H5PCopyright.php#L193-

The h5p-core library uses this logic, too:

https://github.com/h5p/h5p-php-library/blob/b5f527e140c17da2792283d369f621e9b3f969ff/js/h5p.js#L1247

However, contentName is not a machine-readable identifier for the content type, it is a freely editable text field that can be altered from the H5P editor:

Image

Thus, naming the image anything other than Image excludes it from having an associated thumbnail in the copyright info.

Some other method of establishing the content type should be used instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Content AuthorAll issues that affect content author (sourcecode/apis/contentauthor)NDLANDLA EdlibbugSomething isn't working

    Type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions