ucfopen / Materia

Engage students with easily embedded apps for online courses. Supercharge your course with compelling experiences and game mechanics.
https://ucfopen.github.io/Materia-Docs/
GNU Affero General Public License v3.0
37 stars 32 forks source link

Feature: Install widgets into a new directory for versioning and cache busting #1059

Open iturgeon opened 6 years ago

iturgeon commented 6 years ago

When widgets get installed now, they just overwrite the old files in place.

We should install them into a new directory for 2 purposes: keeping a short history (and supporting people currently playing an older version), and (the primary reason for this issue) busting CDN cache when a new version is deployed.

So, installing a widget would create a new directory close to what it does now: From $static/widget/4-crossword to $static/widget/4-crossword-fx3k29

The play iframe would then point to something like $static/widget/4-crossword-fx3k29/player.html

iturgeon commented 5 years ago

Adding some ideas from a duplicate issue here:

Agree - my thoughts were to add a randomly chosen directory into the widget url - perhaps id-widget/player.html -> id-widget/dk20#K/player.html If we know what version the widget is - we could use that instead id-widget/player.html -> id-widget/v2.0.1/player.html

iturgeon commented 5 years ago

another idea was introduced over on #1169 where this would be implemented in the MDK - causing the mdk to add the widget version or cache-busting info to the .wigt file output.