-
Notifications
You must be signed in to change notification settings - Fork 54
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
base: develop
Are you sure you want to change the base?
Conversation
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. |
ricecooker/utils/SCORM_metadata.py
Outdated
# 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")) |
There was a problem hiding this comment.
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,]
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is producing a server error in Studio https://learningequality.sentry.io/issues/4997106816/?project=1252819
Add general purpose utility for setting metadata on a node.
Write basic tests to confirm behaviour.
I've been playing with the latest code from this PR:
|
There was a problem hiding this 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
Fixes #332
Fixes #337