Add scorm upload support when zip file has nested folder

Created on 6 March 2020, almost 5 years ago
Updated 4 February 2023, almost 2 years ago

Problem/Motivation

Observed Behavior:
When uploading a SCORM package to a new activity, I observe an error

Scorm package is wrong. Missing the Imsmanifest File. despite the Imsmanifest being present. In the filesystem, the SCORM package is being extracted at public://opigno_scorm_extracted/scorm_[DRUPAL FILE ID]/[SCORM PACKAGE NAME], but the Opigno code expects it to be at public://opigno_scorm_extracted/scorm_[DRUPAL FILE ID]/.

This seems to be occuring due to the extracted directory path being hardcoded in a way that is inconsistent with how the packages are being extracted.

The opigno_scorm module has at least two occurrences:

The opigno_module module also has at least two occurrences:

  • Drupal\opigno_module\Form\AddExternalPackageForm::validateZipPackage()
  • Drupal\opigno_module\Controller\ExternalPackageController::checkPackageType()

Proposed resolution

  1. Add a function to programmatically retrieve the package's extracted path similar to the Drupal\opigno_tincan_activity\TincanService::getExtractPath() function in opigno_module.
  2. Once that function is added, replace all instances of the hardcoded extract path with that function.
✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States qymanab

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada Liam McDermott

    Just a datapoint: a client has given us a file exported from Chameleon Creator, which places everything in the SCORM file in a sub-directory.
    Also, bumping version as this issue is still relevant in 3.x

Production build 0.71.5 2024