Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
894428ea
Commit
894428ea
authored
Jun 06, 2014
by
lduarte1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverting commit @
3bfb633f
and updating openseadragon.js for latest build
parent
dc9ae84e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
46 deletions
+101
-46
common/lib/xmodule/xmodule/annotator_mixin.py
+0
-38
common/lib/xmodule/xmodule/imageannotation_module.py
+33
-2
common/lib/xmodule/xmodule/textannotation_module.py
+33
-2
common/lib/xmodule/xmodule/videoannotation_module.py
+33
-2
common/static/js/vendor/ova/openseadragon.js
+2
-2
No files found.
common/lib/xmodule/xmodule/annotator_mixin.py
View file @
894428ea
...
...
@@ -6,10 +6,6 @@ from lxml import etree
from
urlparse
import
urlparse
from
os.path
import
splitext
,
basename
from
HTMLParser
import
HTMLParser
from
xblock.core
import
Scope
,
String
# Make '_' a no-op so we can scrape strings
_
=
lambda
text
:
text
def
get_instructions
(
xmltree
):
""" Removes <instructions> from the xmltree and returns them as a string, otherwise None. """
...
...
@@ -56,37 +52,3 @@ def html_to_text(html):
htmlstripper
=
MLStripper
()
htmlstripper
.
feed
(
html
)
return
htmlstripper
.
get_data
()
class
CommonAnnotatorMixin
(
object
):
annotation_storage_url
=
String
(
help
=
_
(
"Location of Annotation backend"
),
scope
=
Scope
.
settings
,
default
=
"http://your_annotation_storage.com"
,
display_name
=
_
(
"Url for Annotation Storage"
)
)
annotation_token_secret
=
String
(
help
=
_
(
"Secret string for annotation storage"
),
scope
=
Scope
.
settings
,
default
=
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
,
display_name
=
_
(
"Secret Token String for Annotation"
)
)
default_tab
=
String
(
display_name
=
_
(
"Default Annotations Tab"
),
help
=
_
(
"Select which tab will be the default in the annotations table: myNotes, Instructor, or Public."
),
scope
=
Scope
.
settings
,
default
=
"myNotes"
,
)
# 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: 'instructor' or 'everyone'"
),
scope
=
Scope
.
settings
,
default
=
"everyone"
,
)
common/lib/xmodule/xmodule/imageannotation_module.py
View file @
894428ea
...
...
@@ -7,7 +7,7 @@ from pkg_resources import resource_string
from
xmodule.x_module
import
XModule
from
xmodule.raw_module
import
RawDescriptor
from
xblock.core
import
Scope
,
String
from
xmodule.annotator_mixin
import
CommonAnnotatorMixin
,
get_instructions
,
html_to_text
from
xmodule.annotator_mixin
import
get_instructions
,
html_to_text
from
xmodule.annotator_token
import
retrieve_token
from
xblock.fragment
import
Fragment
...
...
@@ -51,9 +51,40 @@ class AnnotatableFields(object):
scope
=
Scope
.
settings
,
default
=
'professor:green,teachingAssistant:blue'
,
)
annotation_storage_url
=
String
(
help
=
_
(
"Location of Annotation backend"
),
scope
=
Scope
.
settings
,
default
=
"http://your_annotation_storage.com"
,
display_name
=
_
(
"Url for Annotation Storage"
)
)
annotation_token_secret
=
String
(
help
=
_
(
"Secret string for annotation storage"
),
scope
=
Scope
.
settings
,
default
=
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
,
display_name
=
_
(
"Secret Token String for Annotation"
)
)
default_tab
=
String
(
display_name
=
_
(
"Default Annotations Tab"
),
help
=
_
(
"Select which tab will be the default in the annotations table: myNotes, Instructor, or Public."
),
scope
=
Scope
.
settings
,
default
=
"myNotes"
,
)
# 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: 'instructor' or 'everyone'"
),
scope
=
Scope
.
settings
,
default
=
"everyone"
,
)
class
ImageAnnotationModule
(
AnnotatableFields
,
CommonAnnotatorMixin
,
XModule
):
class
ImageAnnotationModule
(
AnnotatableFields
,
XModule
):
'''Image Annotation Module'''
js
=
{
'coffee'
:
[
...
...
common/lib/xmodule/xmodule/textannotation_module.py
View file @
894428ea
...
...
@@ -6,7 +6,7 @@ from pkg_resources import resource_string
from
xmodule.x_module
import
XModule
from
xmodule.raw_module
import
RawDescriptor
from
xblock.core
import
Scope
,
String
from
xmodule.annotator_mixin
import
CommonAnnotatorMixin
,
get_instructions
from
xmodule.annotator_mixin
import
get_instructions
from
xmodule.annotator_token
import
retrieve_token
from
xblock.fragment
import
Fragment
import
textwrap
...
...
@@ -53,9 +53,40 @@ class AnnotatableFields(object):
scope
=
Scope
.
settings
,
default
=
''
,
)
annotation_storage_url
=
String
(
help
=
_
(
"Location of Annotation backend"
),
scope
=
Scope
.
settings
,
default
=
"http://your_annotation_storage.com"
,
display_name
=
_
(
"Url for Annotation Storage"
)
)
annotation_token_secret
=
String
(
help
=
_
(
"Secret string for annotation storage"
),
scope
=
Scope
.
settings
,
default
=
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
,
display_name
=
_
(
"Secret Token String for Annotation"
)
)
default_tab
=
String
(
display_name
=
_
(
"Default Annotations Tab"
),
help
=
_
(
"Select which tab will be the default in the annotations table: myNotes, Instructor, or Public."
),
scope
=
Scope
.
settings
,
default
=
"myNotes"
,
)
# 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: 'instructor' or 'everyone'"
),
scope
=
Scope
.
settings
,
default
=
"everyone"
,
)
class
TextAnnotationModule
(
AnnotatableFields
,
CommonAnnotatorMixin
,
XModule
):
class
TextAnnotationModule
(
AnnotatableFields
,
XModule
):
''' Text Annotation Module '''
js
=
{
'coffee'
:
[],
'js'
:
[]}
...
...
common/lib/xmodule/xmodule/videoannotation_module.py
View file @
894428ea
...
...
@@ -7,7 +7,7 @@ from pkg_resources import resource_string
from
xmodule.x_module
import
XModule
from
xmodule.raw_module
import
RawDescriptor
from
xblock.core
import
Scope
,
String
from
xmodule.annotator_mixin
import
CommonAnnotatorMixin
,
get_instructions
,
get_extension
from
xmodule.annotator_mixin
import
get_instructions
,
get_extension
from
xmodule.annotator_token
import
retrieve_token
from
xblock.fragment
import
Fragment
...
...
@@ -45,9 +45,40 @@ class AnnotatableFields(object):
scope
=
Scope
.
settings
,
default
=
""
)
annotation_storage_url
=
String
(
help
=
_
(
"Location of Annotation backend"
),
scope
=
Scope
.
settings
,
default
=
"http://your_annotation_storage.com"
,
display_name
=
_
(
"Url for Annotation Storage"
)
)
annotation_token_secret
=
String
(
help
=
_
(
"Secret string for annotation storage"
),
scope
=
Scope
.
settings
,
default
=
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
,
display_name
=
_
(
"Secret Token String for Annotation"
)
)
default_tab
=
String
(
display_name
=
_
(
"Default Annotations Tab"
),
help
=
_
(
"Select which tab will be the default in the annotations table: myNotes, Instructor, or Public."
),
scope
=
Scope
.
settings
,
default
=
"myNotes"
,
)
# 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: 'instructor' or 'everyone'"
),
scope
=
Scope
.
settings
,
default
=
"everyone"
,
)
class
VideoAnnotationModule
(
AnnotatableFields
,
CommonAnnotatorMixin
,
XModule
):
class
VideoAnnotationModule
(
AnnotatableFields
,
XModule
):
'''Video Annotation Module'''
js
=
{
'coffee'
:
[
...
...
common/static/js/vendor/ova/openseadragon.js
View file @
894428ea
...
...
@@ -7872,14 +7872,14 @@ $.extend( $.IIIF1_1TileSource.prototype, $.TileSource.prototype, {
uri
;
if
(
level_width
<
this
.
tile_width
&&
level_height
<
this
.
tile_height
){
iiif_size
=
level_width
+
","
+
level_height
;
iiif_size
=
level_width
+
","
;
iiif_region
=
'full'
;
}
else
{
iiif_tile_x
=
x
*
iiif_tile_size_width
;
iiif_tile_y
=
y
*
iiif_tile_size_height
;
iiif_tile_w
=
Math
.
min
(
iiif_tile_size_width
,
this
.
width
-
iiif_tile_x
);
iiif_tile_h
=
Math
.
min
(
iiif_tile_size_height
,
this
.
height
-
iiif_tile_y
);
iiif_size
=
Math
.
ceil
(
iiif_tile_w
*
scale
)
+
","
+
Math
.
ceil
(
iiif_tile_h
*
scale
)
;
iiif_size
=
Math
.
ceil
(
iiif_tile_w
*
scale
)
+
","
;
iiif_region
=
[
iiif_tile_x
,
iiif_tile_y
,
iiif_tile_w
,
iiif_tile_h
].
join
(
','
);
}
uri
=
[
this
[
'@id'
],
iiif_region
,
iiif_size
,
IIIF_ROTATION
,
IIIF_QUALITY
].
join
(
'/'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment