First set of fixes from the pull request This does not include some of the testing files. The textannotation and videoannotation test files are not ready. waiting for an answer on the issue. Deleted token line in api.py and added test for token generator Added notes_spec.coffee remove spec file fixed minor error with the test fixes some quality errors fixed unit test fixed unit test added advanced module Added notes_spec.coffee remove spec file Quality and Testing Coverage 1. in test_textannotation.py I already check for line 75 as it states in the diff in line 43, same with test_videoanntotation 2. Like you said, exceptions cannot be checked for firebase_token_generator.py. The version of python that is active on the edx server is 2.7 or higher, but the code is there for correctness. Error checking works the same way. 3. I added a test for student/views/.py within tests and deleted the unused secret assignment. 4. test_token_generator.py is now its own file Added Secret Token data input fixed token generator Annotation Tools in Place The purpose of this pull request is to install two major modules: (1) a module to annotate text and (2) a module to annotate video. In either case an instructor can declare them in advanced settings under advanced_modules and input content (HTML in text, mp4 or YouTube videos for video). Students will be able to highlight portions and add their comments as well as reply to each other. There needs to be a storage server set up per course as well as a secret token to talk with said storage. Changes: 1. Added test to check for the creation of a token in tests.py (along with the rest of the tests for student/view.py) 2. Removed items in cms pertaining to annotation as this will only be possible in the lms 3. Added more comments to firebase_token_generator.py, the test files, students/views.py 4. Added some internationalization stuff to textannotation.html and videoannotation.html. I need some help with doing it in javascript, but the html is covered. incorporated lib for traslate fixed quality errors fixed my notes with catch token Text and Video Annotation Modules - First Iteration The following code-change is the first iteration of the modules for text and video annotation. Installing Modules: 1. Under “Advanced Settings”, add “textannotation” and “videoannotation” to the list of advanced_modules. 2. Add link to an external storage for annotations under “annotation_storage_url” 3. Add the secret token for talking with said storage under “annotation_token_secret” Using Modules 1. When creating new unit, you can find Text and Video annotation modules under “Advanced” component 2. Make sure you have either Text or Video in one unit, but not both. 3. Annotations are only allowed on Live/Public version and not Studio. Added missing templates and fixed more of the quality errors Fixed annotator not existing issue in cmd and tried to find the get_html() from the annotation module class to the descriptor Added a space after # in comments Fixed issue with an empty Module and token links Added licenses and fixed vis naming scheme and location.
Notes Django App
This is a django application that stores and displays notes that students make while reading static HTML book(s) in their courseware. Note taking functionality in the static HTML book(s) is handled by a wrapper script around annotator.js, which interfaces with the API provided by this application to store and retrieve notes.
Usage
To use this application, course staff must opt-in by doing the following:
- Login to Studio.
- Go to Course Settings -> Advanced Settings
- Find the
advanced_modulespolicy key and in the policy value field, add"notes"to the list. - Save the course settings.
The result of following these steps is that you should see a new tab appear in the courseware named My Notes. This will display a journal of notes that the student has created in the static HTML book(s). Second, when you highlight text in the static HTML book(s), a dialog will appear. You can enter some notes and tags and save it. The note will appear highlighted in the text and will also be saved to the journal.
To disable the My Notes tab and notes in the static HTML book(s), simply reverse the above steps (i.e. remove "notes" from the advanced_modules policy setting).
Caveats and Limitations
- Notes are private to each student.
- Sharing and replying to notes is not supported.
- The student My Notes interface is very limited.
- There is no instructor interface to view student notes.
Developer Overview
Quickstart
$ ./manage.py lms syncdb --migrate
Then follow the steps above to enable the My Notes tab or manually add a tab to the policy tab configuration with {"type": "notes", "name": "My Notes"}.
App Directory Structure:
lms/djangoapps/notes:
- api.py - API used by annotator.js on the frontend
- models.py - Contains note model for storing notes
- tests.py - Unit tests
- views.py - View to display the journal of notes (i.e. My Notes tab)
- urls.py - Maps the API and View routes.
- utils.py - Contains method for checking if the course has this app enabled. Intended to be public to other modules.
Also requires:
- lms/static/coffee/src/notes.coffee -- wrapper around annotator.js
- lms/templates/notes.html -- used by views.py to display the notes
Interacts with:
- lms/djangoapps/staticbook - the html static book checks to see if notes is enabled and has some logic to enable/disable accordingly