lduarte1991 / hxat

Contains the currently-in-development project by HarvardX to bring the annotation tool currently living in the edX platform to a more accessible LTI implementation.
13 stars 7 forks source link

Import/Export Annotations #66

Closed lduarte1991 closed 8 years ago

lduarte1991 commented 8 years ago

This PR focuses on a very small request from one of our courses. The instructor would like to be able to export their annotations and import them into a new version of the course (i.e. the same target object, but different course or assignment).

Three new buttons will appear now under "My Notes" if you are an instructor:

Export will open up a new page with a JSON blob that the instructor can copy. Import will open up a text area in the sidebar that will accept a JSON blob. It will replace all the information that needs to be replaced (i.e. context_id, collection_id).

@arthurian Let me know if you see any issues. I know there's a bit more I want to do with this:

  1. Checks to make sure the blob was copied correctly and contains valid data.
  2. Feedback about items being added
  3. Way to order items added from the blob
  4. Or even just a way to do this via the backend and not involving them actually going back and forth copying and pasting items.
  5. Specifying which annotations should and should not be imported/exported.
arthurian commented 8 years ago

@lduarte1991 No major concerns here, other than the issues you noted yourself. Just to clarify, does this print/export/import the instructor's own annotations, or all annotations?

lduarte1991 commented 8 years ago

Only their own annotations. It's only there when you hit "My Notes" and only if you're an instructor.

Basically I wanted to offer a way for them to move their own content up to a new version of the tool...but figured if they wanted to do it for all annotations, they would contact me and we could talk about why and if it's a good idea.

arthurian commented 8 years ago

Ahh, OK, that makes sense. So basically, when you hit the "My Notes", the this.initOptions.controller.endpoint.annotationsMasterList will only contain the instructor's own annotations, which is what is being printed/exported.

lduarte1991 commented 8 years ago

Yes, exactly.

arthurian commented 8 years ago

Perfect. This PR looks good to me then, with perhaps some enhancements later like you said. I know that some of our teaching staff will love to have this feature as well. 👍

lduarte1991 commented 8 years ago

Awesome!