From 68acf66f6ca78512bed981ec64da1b8d395d18f8 Mon Sep 17 00:00:00 2001
From: lduarte1991
Date: Thu, 5 Jun 2014 12:44:36 -0400
Subject: [PATCH] Annotation Tools: PR Fixes
- Fixed camel case for variable name
- Fixed indentation in imageannotation.html
- Changed all mentions of Instructor Username to Email
- Turned annotation_mode into phrase
- Fixed indentation in imageannotation.html
- Added comments in imageannotation.html
- Changing annotation_mode in OSDA
---
.../xmodule/xmodule/imageannotation_module.py | 13 +-
.../xmodule/xmodule/textannotation_module.py | 13 +-
.../xmodule/xmodule/videoannotation_module.py | 15 +-
.../js/vendor/ova/OpenSeaDragonAnnotation.js | 2 +-
common/static/js/vendor/ova/catch/js/catch.js | 88 ++++-----
lms/templates/imageannotation.html | 167 +++++++++---------
lms/templates/textannotation.html | 9 +-
lms/templates/videoannotation.html | 9 +-
8 files changed, 163 insertions(+), 153 deletions(-)
diff --git a/common/lib/xmodule/xmodule/imageannotation_module.py b/common/lib/xmodule/xmodule/imageannotation_module.py
index 754c29359c..40d50b8b06 100644
--- a/common/lib/xmodule/xmodule/imageannotation_module.py
+++ b/common/lib/xmodule/xmodule/imageannotation_module.py
@@ -69,17 +69,18 @@ class AnnotatableFields(object):
scope=Scope.settings,
default="myNotes",
)
- instructor_username = String(
- display_name=_("Username for 'Instructor' Annotations"),
- help=_("Username that will be attached to all annotations that will be found in 'Instructor' tab."),
+ # currently only supports one instructor, will build functionality for multiple later
+ instructor_email = String(
+ display_name=_("Email for 'Instructor' Annotations"),
+ help=_("Email of the user that will be attached to all annotations that will be found in 'Instructor' tab."),
scope=Scope.settings,
default="",
)
annotation_mode = String(
display_name=_("Mode for Annotation Tool"),
- help=_("Type in number corresponding to following modes: 1 = only instructor can annotate , 2 = Everyone can annotate"),
+ help=_("Type in number corresponding to following modes: 'instructor' or 'everyone'"),
scope=Scope.settings,
- default="2",
+ default="everyone",
)
@@ -123,7 +124,7 @@ class ImageAnnotationModule(AnnotatableFields, XModule):
'tag': self.instructor_tags,
'openseadragonjson': self.openseadragonjson,
'default_tab': self.default_tab,
- 'instructor_username': self.instructor_username,
+ 'instructor_email': self.instructor_email,
'annotation_mode': self.annotation_mode,
}
diff --git a/common/lib/xmodule/xmodule/textannotation_module.py b/common/lib/xmodule/xmodule/textannotation_module.py
index 7d47ef87fa..2bdda68ea2 100644
--- a/common/lib/xmodule/xmodule/textannotation_module.py
+++ b/common/lib/xmodule/xmodule/textannotation_module.py
@@ -71,17 +71,18 @@ class AnnotatableFields(object):
scope=Scope.settings,
default="myNotes",
)
- instructor_username = String(
- display_name=_("Username for 'Instructor' Annotations"),
- help=_("Username that will be attached to all annotations that will be found in 'Instructor' tab."),
+ # currently only supports one instructor, will build functionality for multiple later
+ instructor_email = String(
+ display_name=_("Email for 'Instructor' Annotations"),
+ help=_("Email of the user that will be attached to all annotations that will be found in 'Instructor' tab."),
scope=Scope.settings,
default="",
)
annotation_mode = String(
display_name=_("Mode for Annotation Tool"),
- help=_("Type in number corresponding to following modes: 1 = only instructor can annotate , 2 = Everyone can annotate"),
+ help=_("Type in number corresponding to following modes: 'instructor' or 'everyone'"),
scope=Scope.settings,
- default="2",
+ default="everyone",
)
@@ -120,7 +121,7 @@ class TextAnnotationModule(AnnotatableFields, XModule):
'token': retrieve_token(self.user_email, self.annotation_token_secret),
'diacritic_marks': self.diacritics,
'default_tab': self.default_tab,
- 'instructor_username': self.instructor_username,
+ 'instructor_email': self.instructor_email,
'annotation_mode': self.annotation_mode,
}
fragment = Fragment(self.system.render_template('textannotation.html', context))
diff --git a/common/lib/xmodule/xmodule/videoannotation_module.py b/common/lib/xmodule/xmodule/videoannotation_module.py
index e3fbde9944..95848c0e9e 100644
--- a/common/lib/xmodule/xmodule/videoannotation_module.py
+++ b/common/lib/xmodule/xmodule/videoannotation_module.py
@@ -48,7 +48,7 @@ class AnnotatableFields(object):
annotation_storage_url = String(
help=_("Location of Annotation backend"),
scope=Scope.settings,
- default="http://your_annotation_storage.com",
+ default="http://your_annotation_storage.com",
display_name=_("Url for Annotation Storage"),
)
annotation_token_secret = String(
@@ -63,17 +63,18 @@ class AnnotatableFields(object):
scope=Scope.settings,
default="myNotes",
)
- instructor_username = String(
- display_name=_("Username for 'Instructor' Annotations"),
- help=_("Username that will be attached to all annotations that will be found in 'Instructor' tab."),
+ # currently only supports one instructor, will build functionality for multiple later
+ instructor_email = String(
+ display_name=_("Email for 'Instructor' Annotations"),
+ help=_("Email of the user that will be attached to all annotations that will be found in 'Instructor' tab."),
scope=Scope.settings,
default="",
)
annotation_mode = String(
display_name=_("Mode for Annotation Tool"),
- help=_("Type in number corresponding to following modes: 1 = only instructor can annotate , 2 = Everyone can annotate"),
+ help=_("Type in number corresponding to following modes: 'instructor' or 'everyone'"),
scope=Scope.settings,
- default="2",
+ default="everyone",
)
class VideoAnnotationModule(AnnotatableFields, XModule):
@@ -125,7 +126,7 @@ class VideoAnnotationModule(AnnotatableFields, XModule):
'annotation_storage': self.annotation_storage_url,
'token': retrieve_token(self.user_email, self.annotation_token_secret),
'default_tab': self.default_tab,
- 'instructor_username': self.instructor_username,
+ 'instructor_email': self.instructor_email,
'annotation_mode': self.annotation_mode,
}
fragment = Fragment(self.system.render_template('videoannotation.html', context))
diff --git a/common/static/js/vendor/ova/OpenSeaDragonAnnotation.js b/common/static/js/vendor/ova/OpenSeaDragonAnnotation.js
index 4fbadc4f47..938af6e8d3 100644
--- a/common/static/js/vendor/ova/OpenSeaDragonAnnotation.js
+++ b/common/static/js/vendor/ova/OpenSeaDragonAnnotation.js
@@ -380,7 +380,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
clickTimeThreshold: viewer.clickTimeThreshold,
clickDistThreshold: viewer.clickDistThreshold
});
- if(this.options.viewer.annotation_mode == "2" || this.options.viewer.flags){
+ if(this.options.viewer.annotation_mode == "everyone" || this.options.viewer.flags){
/* Set elements to the control menu */
viewer.annotatorControl = viewer.wrapperAnnotation.element;
if( viewer.toolbar ){
diff --git a/common/static/js/vendor/ova/catch/js/catch.js b/common/static/js/vendor/ova/catch/js/catch.js
index 950966fb07..c2f16b98e4 100644
--- a/common/static/js/vendor/ova/catch/js/catch.js
+++ b/common/static/js/vendor/ova/catch/js/catch.js
@@ -42,29 +42,29 @@ annotationList:
''+
'