Basic need: show a specific static image + text "teaser" or card layout on the site home page that automatically changes depending on where we are in the term/semester. You know... basic promotional advertising.
Things I've tried:
- Javascript: This
would be my first choice but either I'm not able to find documentation
on the java libraries available and/or can't initialize the most
simplest of javascript functions within an inline <script> such
as:
var date = new Date(); document.getElementById("p1").innerHTML = date;
- H5P: I went down this road thinking maybe I could smash something together and have a nice way to edit and create the content for the widget. However, the embedded H5P in the mobile app doesn't automatically play(unless it's an activity).
- IonicFramework/CSS: I can create graphical elements but can't create any of the logic behind displaying it. Yes, I could use moodle's restrict access settings and make 10 separate label blocks on the homepage but that's ridiculously messy and causes other problems with updating the dates every term.
- iframe + external system: my last attempt. According to ionic folks, generally not a great approach — but I'll do it if it works. Height with responsive size = always a pain in the butt (especially when the app isn't liking the javascript I put in front of it). Cross-website tracking is enabled by default on iOS devices which will prevent most of the content from loading (unless internal in Moodle). Skimming as much information as I can, it appears the app maybe uses Cordova-in-app-browser to render. Limited testing = works for for an embedded google form.
I'm open for any/all creative suggestions or reality check condolences. 🤕