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
1dcf2dc1
Commit
1dcf2dc1
authored
Jun 02, 2014
by
lduarte1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Video Annotation Tool: Added Instructor Filter
parent
8429897c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
common/lib/xmodule/xmodule/videoannotation_module.py
+21
-0
lms/templates/textannotation.html
+0
-2
lms/templates/videoannotation.html
+9
-1
No files found.
common/lib/xmodule/xmodule/videoannotation_module.py
View file @
1dcf2dc1
...
@@ -57,6 +57,24 @@ class AnnotatableFields(object):
...
@@ -57,6 +57,24 @@ class AnnotatableFields(object):
default
=
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
,
default
=
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
,
display_name
=
_
(
"Secret Token String for Annotation"
)
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"
,
)
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."
),
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"
),
scope
=
Scope
.
settings
,
default
=
"2"
,
)
class
VideoAnnotationModule
(
AnnotatableFields
,
XModule
):
class
VideoAnnotationModule
(
AnnotatableFields
,
XModule
):
'''Video Annotation Module'''
'''Video Annotation Module'''
...
@@ -106,6 +124,9 @@ class VideoAnnotationModule(AnnotatableFields, XModule):
...
@@ -106,6 +124,9 @@ class VideoAnnotationModule(AnnotatableFields, XModule):
'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_email
,
self
.
annotation_token_secret
),
'token'
:
retrieve_token
(
self
.
user_email
,
self
.
annotation_token_secret
),
'default_tab'
:
self
.
default_tab
,
'instructor_username'
:
self
.
instructor_username
,
'annotation_mode'
:
self
.
annotation_mode
,
}
}
fragment
=
Fragment
(
self
.
system
.
render_template
(
'videoannotation.html'
,
context
))
fragment
=
Fragment
(
self
.
system
.
render_template
(
'videoannotation.html'
,
context
))
fragment
.
add_javascript_url
(
"/static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js"
)
fragment
.
add_javascript_url
(
"/static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js"
)
...
...
lms/templates/textannotation.html
View file @
1dcf2dc1
...
@@ -182,8 +182,6 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -182,8 +182,6 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
userId
=
'${instructor_username}'
;
userId
=
'${instructor_username}'
;
}
}
console
.
log
(
"${user.is_staff}"
);
//Catch
//Catch
var
annotator
=
ova
.
annotator
,
var
annotator
=
ova
.
annotator
,
catchOptions
=
{
catchOptions
=
{
...
...
lms/templates/videoannotation.html
View file @
1dcf2dc1
...
@@ -175,6 +175,10 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -175,6 +175,10 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
var
ova
=
new
OpenVideoAnnotation
.
Annotator
(
$
(
'#videoHolder'
),
options
);
var
ova
=
new
OpenVideoAnnotation
.
Annotator
(
$
(
'#videoHolder'
),
options
);
ova
.
annotator
.
addPlugin
(
'Tags'
);
ova
.
annotator
.
addPlugin
(
'Tags'
);
var
userId
=
'${user.email}'
;
if
(
'${default_tab}'
.
toLowerCase
()
==
'instructor'
){
userId
=
'${instructor_username}'
;
}
//Catch
//Catch
var
annotator
=
ova
.
annotator
,
var
annotator
=
ova
.
annotator
,
...
@@ -184,9 +188,13 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -184,9 +188,13 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
imageUrlRoot
:
imgURLRoot
,
imageUrlRoot
:
imgURLRoot
,
showMediaSelector
:
false
,
showMediaSelector
:
false
,
showPublicPrivate
:
true
,
showPublicPrivate
:
true
,
userId
:
'${user.email}'
,
userId
:
userId
,
pagination
:
pagination
,
//Number of Annotations per load in the pagination,
pagination
:
pagination
,
//Number of Annotations per load in the pagination,
flags
:
is_staff
flags
:
is_staff
flags
:
is_staff
,
default_tab
:
"${default_tab}"
,
instructor_username
:
"${instructor_username}"
,
annotation_mode
:
"${annotation_mode}"
,
},
},
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
</script>
</script>
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