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

Import/export only subpath of a directory/category #61

Open
EJMFarrow opened this issue Jan 10, 2025 · 0 comments
Open

Import/export only subpath of a directory/category #61

EJMFarrow opened this issue Jan 10, 2025 · 0 comments

Comments

@EJMFarrow
Copy link
Collaborator

Currently gitsync allows the user to import a subdirectory or export a subcategory but only within the full directory or category.
e.g. importing the directory top/Category-1/Subcat-2 will only import the questions in Subcat-2 but will do so into the category top/Category 1/Subcat 2.

When dealing with large reference sets of questions such as HELM we want to be able to import a directory potentially several levels down into a category just below top. If a user makes improvements we then want to be able to export back to the correct level of the repo.

(There's an alternate scenario where we have a multi-layer question bank and we want to create a smaller repo from a subcategory. That will cause problems as the code is expecting a top folder, etc. If this is required, it could be worked around using the current subcategory export and the proposed subdirectory solution.)

We will need to add parameters to set a targetfolder and targetcategory. These will be set on initial import/export, stored in the manifest and will not be able to be overridden.

Issues:

  • Manifest file naming - we could have multiple files with the same name under current naming convention as categories are names on a Moodle instance/context level.
  • Category paths in the category files will be wrong. Particular issues when creating subcategories on import (we'll need fake updated files to import) and when exporting added subcategories (we'll need to update the exported files with a longer path). This is going to involve some dubious string manipulation. (Note: What if there's a '/' in a category name? This probably breaks already...)
  • The target category will need to exist already.
  • Assumption: The manifest file will always be created on import from an existing repo.
  • How does this interact with quiz functionality.
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

No branches or pull requests

1 participant