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
edeebe7b
Commit
edeebe7b
authored
May 08, 2014
by
lduarte1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes from @singingwolfboy in PR #3466
parent
26eb16eb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
common/lib/xmodule/xmodule/textannotation_module.py
+3
-3
common/lib/xmodule/xmodule/videoannotation_module.py
+3
-3
common/static/js/vendor/ova/annotator-full-firebase-auth.js
+7
-7
lms/templates/textannotation.html
+0
-0
No files found.
common/lib/xmodule/xmodule/textannotation_module.py
View file @
edeebe7b
...
@@ -61,9 +61,9 @@ class TextAnnotationModule(AnnotatableFields, XModule):
...
@@ -61,9 +61,9 @@ class TextAnnotationModule(AnnotatableFields, XModule):
self
.
instructions
=
self
.
_extract_instructions
(
xmltree
)
self
.
instructions
=
self
.
_extract_instructions
(
xmltree
)
self
.
content
=
etree
.
tostring
(
xmltree
,
encoding
=
'unicode'
)
self
.
content
=
etree
.
tostring
(
xmltree
,
encoding
=
'unicode'
)
self
.
user
=
""
self
.
user
_email
=
""
if
self
.
runtime
.
get_real_user
is
not
None
:
if
self
.
runtime
.
get_real_user
is
not
None
:
self
.
user
=
self
.
runtime
.
get_real_user
(
self
.
runtime
.
anonymous_student_id
)
.
email
self
.
user
_email
=
self
.
runtime
.
get_real_user
(
self
.
runtime
.
anonymous_student_id
)
.
email
def
_extract_instructions
(
self
,
xmltree
):
def
_extract_instructions
(
self
,
xmltree
):
""" Removes <instructions> from the xmltree and returns them as a string, otherwise None. """
""" Removes <instructions> from the xmltree and returns them as a string, otherwise None. """
...
@@ -83,7 +83,7 @@ class TextAnnotationModule(AnnotatableFields, XModule):
...
@@ -83,7 +83,7 @@ class TextAnnotationModule(AnnotatableFields, XModule):
'instructions_html'
:
self
.
instructions
,
'instructions_html'
:
self
.
instructions
,
'content_html'
:
self
.
content
,
'content_html'
:
self
.
content
,
'annotation_storage'
:
self
.
annotation_storage_url
,
'annotation_storage'
:
self
.
annotation_storage_url
,
'token'
:
retrieve_token
(
self
.
user
,
self
.
annotation_token_secret
),
'token'
:
retrieve_token
(
self
.
user_email
,
self
.
annotation_token_secret
),
}
}
return
self
.
system
.
render_template
(
'textannotation.html'
,
context
)
return
self
.
system
.
render_template
(
'textannotation.html'
,
context
)
...
...
common/lib/xmodule/xmodule/videoannotation_module.py
View file @
edeebe7b
...
@@ -56,9 +56,9 @@ class VideoAnnotationModule(AnnotatableFields, XModule):
...
@@ -56,9 +56,9 @@ class VideoAnnotationModule(AnnotatableFields, XModule):
self
.
instructions
=
self
.
_extract_instructions
(
xmltree
)
self
.
instructions
=
self
.
_extract_instructions
(
xmltree
)
self
.
content
=
etree
.
tostring
(
xmltree
,
encoding
=
'unicode'
)
self
.
content
=
etree
.
tostring
(
xmltree
,
encoding
=
'unicode'
)
self
.
user
=
""
self
.
user
_email
=
""
if
self
.
runtime
.
get_real_user
is
not
None
:
if
self
.
runtime
.
get_real_user
is
not
None
:
self
.
user
=
self
.
runtime
.
get_real_user
(
self
.
runtime
.
anonymous_student_id
)
.
email
self
.
user
_email
=
self
.
runtime
.
get_real_user
(
self
.
runtime
.
anonymous_student_id
)
.
email
def
_extract_instructions
(
self
,
xmltree
):
def
_extract_instructions
(
self
,
xmltree
):
""" Removes <instructions> from the xmltree and returns them as a string, otherwise None. """
""" Removes <instructions> from the xmltree and returns them as a string, otherwise None. """
...
@@ -93,7 +93,7 @@ class VideoAnnotationModule(AnnotatableFields, XModule):
...
@@ -93,7 +93,7 @@ class VideoAnnotationModule(AnnotatableFields, XModule):
'poster'
:
self
.
poster_url
,
'poster'
:
self
.
poster_url
,
'content_html'
:
self
.
content
,
'content_html'
:
self
.
content
,
'annotation_storage'
:
self
.
annotation_storage_url
,
'annotation_storage'
:
self
.
annotation_storage_url
,
'token'
:
retrieve_token
(
self
.
user
,
self
.
annotation_token_secret
),
'token'
:
retrieve_token
(
self
.
user
_email
,
self
.
annotation_token_secret
),
}
}
return
self
.
system
.
render_template
(
'videoannotation.html'
,
context
)
return
self
.
system
.
render_template
(
'videoannotation.html'
,
context
)
...
...
common/static/js/vendor/ova/annotator-full-firebase-auth.js
View file @
edeebe7b
Annotator
.
Plugin
.
Auth
.
prototype
.
haveValidToken
=
function
()
{
Annotator
.
Plugin
.
Auth
.
prototype
.
haveValidToken
=
function
()
{
var
allFields
;
return
(
allFields
=
this
.
_unsafeToken
&&
this
.
_unsafeToken
.
d
.
issuedAt
&&
this
.
_unsafeToken
.
d
.
ttl
&&
this
.
_unsafeToken
.
d
.
consumerKey
;
this
.
_unsafeToken
&&
if
(
allFields
&&
this
.
timeToExpiry
()
>
0
)
{
this
.
_unsafeToken
.
d
.
issuedAt
&&
return
true
;
this
.
_unsafeToken
.
d
.
ttl
&&
}
else
{
this
.
_unsafeToken
.
d
.
consumerKey
&&
return
false
;
this
.
timeToExpiry
()
>
0
}
);
};
};
Annotator
.
Plugin
.
Auth
.
prototype
.
timeToExpiry
=
function
()
{
Annotator
.
Plugin
.
Auth
.
prototype
.
timeToExpiry
=
function
()
{
...
...
lms/templates/textannotation.html
View file @
edeebe7b
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