Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
475ad034
Commit
475ad034
authored
Aug 08, 2014
by
dragonfi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR comments: Rename events
parent
a4fe83d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
mentoring/mentoring.py
+1
-5
mentoring/public/js/mentoring.js
+6
-0
mentoring/public/js/questionnaire.js
+11
-5
No files found.
mentoring/mentoring.py
View file @
475ad034
...
...
@@ -141,10 +141,6 @@ class MentoringBlock(XBlockWithLightChildren):
fragment
.
initialize_js
(
'MentoringBlock'
)
self
.
runtime
.
publish
(
self
,
'mentoring.problem.shown'
,
{
'component_id'
:
self
.
scope_ids
.
usage_id
,
'user_id'
:
self
.
runtime
.
user_id
}
)
return
fragment
@XBlock.json_handler
...
...
@@ -247,7 +243,7 @@ class MentoringBlock(XBlockWithLightChildren):
raw_score
=
self
.
score
[
0
]
self
.
runtime
.
publish
(
self
,
'
mentoring.problem.attemp
ted'
,
{
self
.
runtime
.
publish
(
self
,
'
xblock.mentoring.submit
ted'
,
{
'component_id'
:
self
.
scope_ids
.
usage_id
,
'user_id'
:
self
.
runtime
.
user_id
,
'num_attempts'
:
self
.
num_attempts
,
...
...
mentoring/public/js/mentoring.js
View file @
475ad034
...
...
@@ -92,4 +92,10 @@ function MentoringBlock(runtime, element) {
else
if
(
data
.
mode
===
'assessment'
)
{
MentoringAssessmentView
(
runtime
,
element
,
mentoring
);
}
$
.
ajax
({
type
:
"POST"
,
url
:
runtime
.
handlerUrl
(
element
,
'publish_event'
),
data
:
JSON
.
stringify
({
event_type
:
"xblock.mentoring.loaded"
})
});
}
mentoring/public/js/questionnaire.js
View file @
475ad034
...
...
@@ -27,16 +27,22 @@ function MessageView(element) {
popupDOM
.
css
(
'height'
,
''
)
}
popupDOM
.
show
();
$
(
'.close'
,
popupDOM
).
on
(
'click'
,
function
()
{
self
.
clearPopupEvents
();
console
.
log
(
popupDOM
);
function
publish_event
(
data
)
{
$
.
ajax
({
type
:
"POST"
,
url
:
runtime
.
handlerUrl
(
element
,
'publish_event'
),
data
:
JSON
.
stringify
(
{
event_type
:
'mentoring.feedback.closed'
}
)
data
:
JSON
.
stringify
(
data
)
});
}
publish_event
({
event_type
:
'xblock.mentoring.feedback.opened'
});
$
(
'.close'
,
popupDOM
).
on
(
'click'
,
function
()
{
self
.
clearPopupEvents
();
console
.
log
(
popupDOM
);
publish_event
({
event_type
:
'xblock.mentoring.feedback.closed'
});
});
},
showMessage
:
function
(
message
)
{
...
...
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