Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial integration of QTI and IMSCP import #468

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

rtibbles
Copy link
Member

  • Does an initial integration of IMSCP import into ricecooker.
  • Adds some simple utilities for mapping IMSCP/SCORM metadata fields to our metadata
  • Allows proper mapping of embedded webcontent files to the entry option
  • Writes tests to cover this behaviour

Fixes #332
Fixes #337

@rtibbles rtibbles added this to the 0.8 milestone Feb 19, 2024
@rtibbles
Copy link
Member Author

Looks like the way I am doing the zipfile testing is not compatible with Windows, open file handles etc - will need to update for that.

# Update the node with the general metadata
node.description = metadata_dict.get("description") or node.description
if metadata_dict.get("language"):
node.set_language(metadata_dict.get("language"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had two problems ithe these few lines of code:
language was en-US
metadata.dict was this one:

(Pdb) metadata_dict
{'title': 'Work with computers', 'description': 'This learning path will introduce you to the different parts and types of the computer and their functions. You will also learn the difference between operating systems and applications and their functions. Peripherals and portable storage devices will be discussed as well.', 'language': 'en-US', 'keyword': 'Default'}

It worked with these changes (I ignore if the keyword change will work with other scorm files)

    if metadata_dict.get("language"):
        node.set_language(metadata_dict.get("language").lower().split("-")[0])
    keyword = metadata_dict.get("keyword")
    if keyword:
        node.tags = node.tags + [keyword,]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated - hopefully has a similar effect, add some additional validation to make sure it's a language we know.

is_primary = True

def get_preset(self):
return self.preset or format_presets.IMSCP_ZIP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jredrejo
Copy link
Member

I've been playing with the latest code from this PR:

  • Ricecooker works
  • Uploading to Studio unstable works
  • The channel appears correctly (preview doesn't work, but that's not a ricecooker problem) https://unstable.studio.learningequality.org/es-es/channels/6877a75b029e5259a02c93046ee6dd80 , token: kokom-fitih
  • Using kolibri v0.16.1, I can see the channel, the structure is a bit weird, with more levels than expected: 1 single scorm file has up to four levels to access to the resource:
    image
  • After importing it, it does not work correctly, this is the error message:
    image

Copy link
Member

@jredrejo jredrejo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a detailed comment with the two issues found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle QTI exercises Integrate IMSCP code into ricecooker
2 participants