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
e5a75576
Commit
e5a75576
authored
Sep 25, 2015
by
Tim Krones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure data relevant for displaying review links is up-to-date when
displaying review step.
parent
8133e633
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
problem_builder/mentoring.py
+14
-8
problem_builder/public/js/mentoring_with_steps.js
+3
-0
No files found.
problem_builder/mentoring.py
View file @
e5a75576
...
...
@@ -989,18 +989,21 @@ class MentoringWithExplicitStepsBlock(BaseMentoringBlock, StudioContainerWithNes
def
show_extended_feedback
(
self
):
return
self
.
extended_feedback
def
feedback_dispatch
(
self
,
target_data
):
def
feedback_dispatch
(
self
,
target_data
,
stringify
):
if
self
.
show_extended_feedback
():
return
json
.
dumps
(
target_data
)
if
stringify
:
return
json
.
dumps
(
target_data
)
else
:
return
target_data
def
correct_json
(
self
):
return
self
.
feedback_dispatch
(
self
.
score
.
correct
)
def
correct_json
(
self
,
stringify
=
True
):
return
self
.
feedback_dispatch
(
self
.
score
.
correct
,
stringify
)
def
incorrect_json
(
self
):
return
self
.
feedback_dispatch
(
self
.
score
.
incorrect
)
def
incorrect_json
(
self
,
stringify
=
True
):
return
self
.
feedback_dispatch
(
self
.
score
.
incorrect
,
stringify
)
def
partial_json
(
self
):
return
self
.
feedback_dispatch
(
self
.
score
.
partially_correct
)
def
partial_json
(
self
,
stringify
=
True
):
return
self
.
feedback_dispatch
(
self
.
score
.
partially_correct
,
stringify
)
def
get_message_content
(
self
,
message_type
,
or_default
=
False
):
for
child_id
in
self
.
children
:
...
...
@@ -1095,6 +1098,9 @@ class MentoringWithExplicitStepsBlock(BaseMentoringBlock, StudioContainerWithNes
'correct_answers'
:
len
(
self
.
score
.
correct
),
'incorrect_answers'
:
len
(
self
.
score
.
incorrect
),
'partially_correct_answers'
:
len
(
self
.
score
.
partially_correct
),
'correct'
:
self
.
correct_json
(
stringify
=
False
),
'incorrect'
:
self
.
incorrect_json
(
False
),
'partial'
:
self
.
partial_json
(
False
),
}
@XBlock.json_handler
...
...
problem_builder/public/js/mentoring_with_steps.js
View file @
e5a75576
...
...
@@ -81,6 +81,9 @@ function MentoringWithStepsBlock(runtime, element) {
gradeDOM
.
data
(
'correct_answer'
,
response
.
correct_answers
);
gradeDOM
.
data
(
'incorrect_answer'
,
response
.
incorrect_answers
);
gradeDOM
.
data
(
'partially_correct_answer'
,
response
.
partially_correct_answers
);
gradeDOM
.
data
(
'correct'
,
response
.
correct
);
gradeDOM
.
data
(
'incorrect'
,
response
.
incorrect
);
gradeDOM
.
data
(
'partially'
,
response
.
partial
);
updateReviewTips
();
});
}
...
...
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