Skip to content

Commit

Permalink
Add support for file duration and node suggested duration for ricecooker
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles authored Jun 22, 2022
1 parent a0d4563 commit fa2197e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions contentcuration/contentcuration/utils/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def map_files_to_node(user, node, data):
preset=kind_preset,
language_id=file_data.get('language'),
uploaded_by=user,
duration=file_data.get("duration"),
)
resource_obj.file_on_disk.name = file_path
resource_obj.save()
Expand Down
1 change: 1 addition & 0 deletions contentcuration/contentcuration/views/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ def create_node(node_data, parent_node, sort_order): # noqa: C901
freeze_authoring_data=True,
role_visibility=node_data.get('role') or roles.LEARNER,
complete=is_complete,
suggested_duration=node_data.get("suggested_duration"),
**metadata_labels
)

Expand Down

0 comments on commit fa2197e

Please sign in to comment.