Worksheet/exercise import/export

Registered by William Grant

Worksheets and exercises need to be transported sometimes. Whether from staff content development machines to production, or between production IVLE instances for different institutions, we need a format and facility to transport a package of worksheets and exercises.

Blueprint information

Status:
Started
Approver:
Steven Bird
Priority:
Essential
Drafter:
Nhat Q. Ngo
Direction:
Needs approval
Assignee:
Nhat Q. Ngo
Definition:
Approved
Series goal:
Accepted for 1.0
Implementation:
Slow progress
Milestone target:
milestone icon 1.0.3
Started by
Nhat Q. Ngo

Sprints

Whiteboard

For export, a worksheet is exported along with its exercise in a txt, along with exercises file and a metadata file. In data structure format:
ZIP --- <worksheetname>.rst : The content of the worksheet
        |- meta.txt : Record worksheet name, worksheet url, assessable, publishable.
        |- exercises : Folder containing the exercises
                 |- <exercise1> : pickled data of an exercise, <exercise1> is the URL name of an exercise.
                 |- <exercise2> : ...

For importing, the user will upload a zip file containing these data onto the server, and the IVLE will load and validate the data first before committing.

The process of validation is as followed:
1. The zip file is extracted.
2. The meta data is checked if it contains all fields, especially worksheet url.
3. The exercises url name are checked. PLANNED: if the url name existed, ask for overwrite (i'm currently working on this.) CURRENT: Silent overwrite in step 5.
4. Once resolved, the worksheet url is checked, PLANNED: If url name exists, ask for overwrite. ( Working on as well).
5. Write the exercises first (IVLE requirement otherwise, the worksheet will gives an error).
6. Write the worksheet (Silent overwrite at the moment).

The exercises can be exported/imported similarly using pickled Python object. My rationale for using pickle is due to the complexity of the exercises, in particular, there is no clean way to authoring the Test Cases using a flat file format. Another consideration is that we are working on executable codes, it would be better if exercise is bounded within the authoring environment we current have, allowing external modification might not be ideal in term of security. Similarly, on security, the test cases and solutions to be legible, if it is leaked, the students can circulated the solution at will.

(?)

Work Items

Work items:
Export View: DONE
Create exported zipfile in memory: DONE
Write exercises as Python shelves: DONE
Write meta and worksheet rst: DONE
Import View: INPROGRESS
Read zipfile and extract in memory: DONE
Read metadata: DONE
Read exercises and worksheets: DONE
Confirmation: INPROGRESS
Update the database: DONE

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.