Skip to content
Snippets Groups Projects
Commit b391650b authored by Hans William Forbrigd's avatar Hans William Forbrigd
Browse files

Merge branch 'william_feature_fixgetcontent' into 'main'

printing the tree as you get the data

See merge request mattiaae/idatt2900-072!12
parents 6eda7511 bd7d7a0f
No related branches found
No related tags found
No related merge requests found
......@@ -57,18 +57,13 @@ def list_contents(ctx, course_id: str, folder_id=None):
response = contents_service.list_contents(ctx.obj['SESSION'], course_id, folder_id)
folders = response.json()['results']
roots = []
for folder in folders:
root = Node(folder)
worklist = [root]
r = Node(folder)
worklist = [r]
get_children(ctx, course_id, worklist)
roots.append(root)
for r in roots:
colors, root = r.preorder(r)
contents_view.list_tree(colors, root)
end = time.time()
print(f'\ndownload time: {end - start} seconds')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment