What kind of plugin should I use to embed Gooru Widget player in a Page type of resource?
Here's the whole HTML structure based from the docs:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <link rel="icon" href="favicon.ico"> <title>Gooru Player Test Site</title> <!-- Add your website CSS --> <!-- Wiget loader JS --> <script src="https://playerwidget.gooru.org/player-widget.js"></script> </head> <body> <div id="gooru-player" data-role="gooru-player" data-collection-id="7548b798-7fac-4352-91a8-991a50ba4f35" data-resource-id="" data-show-reactions="false" data-show-questions="false" data-show-report="false" data-gooru-token=""> </div> </body> </html>
An example of a full page widget can be seen here.
And here's an example screenshot when I manually pasted the HTML code using the atto editor. As you can see, there are some problems with its appearance. The nav drawer does not work as well (can't toggle show/hide sidebar) when I embedded the widget manually.
Regarding its HTML structure, the values that will be changed here is in the gooru-player div, particularly data-collection-id or data-resource-id.
I also have an existing repository plugin that I privately created that adds a file/URL resource to a course. The said plugin uses an external web page to search for Gooru's resources then add the desired resource using a callback script (returns the details of the resource in particular such as title, file name, author, license, date created, last modified).
With the following minimum requirements:
- Search colelctions/resources in Gooru and return collection/resource ID using callbacks.
- Generate HTML code in the atto editor under page content, then change data-collection-id or data-resource-id depending on what the callback script returns.
Does it fall under any type of plugin? I think it can be a mix of an atto and a repository plugin. I just can't think on where to start.