Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DoneXBlock
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
DoneXBlock
Commits
1403bf43
Commit
1403bf43
authored
Dec 14, 2015
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6 from pmitros/pmitros/analytics-review
Analytics event standards
parents
54439c83
2c7e3451
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
23 deletions
+2
-23
done/done.py
+1
-22
done/static/js/src/done.js
+1
-1
No files found.
done/done.py
View file @
1403bf43
...
...
@@ -7,27 +7,6 @@ from xblock.core import XBlock
from
xblock.fields
import
Scope
,
String
,
Boolean
,
DateTime
,
Float
from
xblock.fragment
import
Fragment
try
:
from
eventtracking
import
tracker
except
ImportError
:
class
tracker
(
object
):
# pylint: disable=invalid-name
"""
Define tracker if eventtracking cannot be imported. This is a
workaround so that the code works in both edx-platform and
XBlock workbench (the latter of which does not support event
emission). This should be replaced with XBlock's emit(), but
at present, emit() is broken.
"""
def
__init__
(
self
):
""" Do nothing """
pass
@staticmethod
def
emit
(
param1
,
param2
):
""" In workbench, do nothing for event emission """
pass
def
resource_string
(
path
):
"""Handy helper for getting resources from our kit."""
data
=
pkg_resources
.
resource_string
(
__name__
,
path
)
...
...
@@ -71,7 +50,7 @@ class DoneXBlock(XBlock):
self
.
runtime
.
publish
(
self
,
'grade'
,
grade_event
)
# This should move to self.runtime.publish, once that pipeline
# is finished for XBlocks.
tracker
.
emit
(
"edx.done.toggle"
,
{
'done'
:
self
.
done
})
self
.
runtime
.
publish
(
self
,
"edx.done.toggled"
,
{
'done'
:
self
.
done
})
return
{
'state'
:
self
.
done
}
...
...
done/static/js/src/done.js
View file @
1403bf43
...
...
@@ -38,7 +38,7 @@ function DoneXBlock(runtime, element, data) {
url
:
handlerUrl
,
data
:
JSON
.
stringify
({
'done'
:
checked
})
});
Logger
.
log
(
"edx.done.toggle"
,
{
'done'
:
checked
});
Logger
.
log
(
"edx.done.toggle
d
"
,
{
'done'
:
checked
});
update_knob
(
element
,
data
);
});
});
...
...
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