Summary
Legacy .elp packages produced by old eXeLearning versions (ones that contain contentv3.* and no index.html) currently fail to open with a raw technical error. We should detect that shape, show a user-friendly notice explaining the file is from an older eXeLearning version, and on save migrate it to the modern .elpx extension.
Current behavior
Opening a legacy .elp in the Nextcloud viewer surfaces this error:
Failed to open eXeLearning package.
The package does not contain an index.html.
Show details
Error: The package does not contain an index.html.
at Proxy.open (http://localhost:8080/custom_apps/exelearning/js/exelearning-view.js?v=…:2:220225)
That message is accurate but unhelpful — it tells the user nothing about why the file is broken or what to do about it.
Desired behavior
-
Detection. When the package is opened and index.html is absent, peek inside the zip for contentv3.* (or any other reliable legacy marker — contentv2.*, the absence of index.html, etc.). If it matches the legacy shape, branch into the legacy path instead of throwing the raw error.
-
User-facing notice. Show a notice / modal along the lines of:
This file is from an older version of eXeLearning and cannot be previewed directly. Open it in the editor to migrate it to the current format — saving will store it as .elpx.
With a primary action Open in eXeLearning editor (the editor handles the migration automatically when loading legacy projects).
-
Save-as-.elpx. When the editor saves a project that originated from a legacy .elp, the file written back to Nextcloud should use the .elpx extension (renaming the original, or leaving the .elp in place and adding <basename>.elpx — pick whichever is least surprising; renaming is what the desktop eXeLearning does).
Acceptance criteria
Notes
- The legacy detection should live before the current "no
index.html" check in src/elpx/ so the error path is the new branch, not the existing throw.
- The
application/vnd.exelearning.elpx MIME mapping registered by make up only covers .elpx; legacy .elp files arrive as application/zip. The viewer should still be the registered handler for both, or we wire up a second MIME entry — needs a decision in implementation.
Summary
Legacy
.elppackages produced by old eXeLearning versions (ones that containcontentv3.*and noindex.html) currently fail to open with a raw technical error. We should detect that shape, show a user-friendly notice explaining the file is from an older eXeLearning version, and on save migrate it to the modern.elpxextension.Current behavior
Opening a legacy
.elpin the Nextcloud viewer surfaces this error:That message is accurate but unhelpful — it tells the user nothing about why the file is broken or what to do about it.
Desired behavior
Detection. When the package is opened and
index.htmlis absent, peek inside the zip forcontentv3.*(or any other reliable legacy marker —contentv2.*, the absence ofindex.html, etc.). If it matches the legacy shape, branch into the legacy path instead of throwing the raw error.User-facing notice. Show a notice / modal along the lines of:
With a primary action Open in eXeLearning editor (the editor handles the migration automatically when loading legacy projects).
Save-as-
.elpx. When the editor saves a project that originated from a legacy.elp, the file written back to Nextcloud should use the.elpxextension (renaming the original, or leaving the.elpin place and adding<basename>.elpx— pick whichever is least surprising; renaming is what the desktop eXeLearning does).Acceptance criteria
.elp(one withcontentv3and noindex.html) shows the friendly notice, not the rawError:string..elpx(extension migrated) and the new file is what shows up in the Files list afterwards..elpxis unaffected — it still previews as today.Notes
index.html" check insrc/elpx/so the error path is the new branch, not the existing throw.application/vnd.exelearning.elpxMIME mapping registered bymake uponly covers.elpx; legacy.elpfiles arrive asapplication/zip. The viewer should still be the registered handler for both, or we wire up a second MIME entry — needs a decision in implementation.