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
f7a0d156
Commit
f7a0d156
authored
Apr 28, 2015
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code
parent
8e7eec3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
+4
-9
problem_builder/mentoring.py
+4
-4
problem_builder/public/js/answer.js
+0
-1
problem_builder/public/js/mentoring_standard_view.js
+0
-4
No files found.
problem_builder/mentoring.py
View file @
f7a0d156
...
...
@@ -148,6 +148,7 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
# Has the student attempted this mentoring step?
default
=
False
,
scope
=
Scope
.
user_state
# TODO: Does anything use this 'attempted' field? May want to delete it.
)
completed
=
Boolean
(
# Has the student completed this mentoring step?
...
...
@@ -458,7 +459,6 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
return
{
'results'
:
results
,
'completed'
:
completed
,
'attempted'
:
self
.
attempted
,
'message'
:
message
,
'step'
:
step
,
'max_attempts'
:
self
.
max_attempts
,
...
...
@@ -468,6 +468,8 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
@XBlock.json_handler
def
submit
(
self
,
submissions
,
suffix
=
''
):
log
.
info
(
u'Received submissions: {}'
.
format
(
submissions
))
# This has now been attempted:
self
.
attempted
=
True
if
self
.
is_assessment
:
...
...
@@ -528,10 +530,9 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
return
{
'results'
:
submit_results
,
'completed'
:
self
.
completed
,
'attempted'
:
self
.
attempted
,
'message'
:
message
,
'max_attempts'
:
self
.
max_attempts
,
'num_attempts'
:
self
.
num_attempts
'num_attempts'
:
self
.
num_attempts
,
}
def
handle_assessment_submit
(
self
,
submissions
,
suffix
):
...
...
@@ -589,7 +590,6 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
return
{
'completed'
:
completed
,
'attempted'
:
self
.
attempted
,
'max_attempts'
:
self
.
max_attempts
,
'num_attempts'
:
self
.
num_attempts
,
'step'
:
self
.
step
,
...
...
problem_builder/public/js/answer.js
View file @
f7a0d156
...
...
@@ -24,7 +24,6 @@ function AnswerBlock(runtime, element) {
handleSubmit
:
function
(
result
)
{
var
checkmark
=
$
(
'.answer-checkmark'
,
element
);
$
(
element
).
find
(
'.message'
).
text
((
result
||
{}).
error
||
''
);
this
.
clearResult
();
...
...
problem_builder/public/js/mentoring_standard_view.js
View file @
f7a0d156
...
...
@@ -48,10 +48,6 @@ function MentoringStandardView(runtime, element, mentoring) {
submitXHR
=
$
.
post
(
handlerUrl
,
JSON
.
stringify
(
data
)).
success
(
handleSubmitResults
);
}
function
get_results
()
{
calculate_results
(
'get_results'
);
}
function
submit
()
{
calculate_results
(
'submit'
);
}
...
...
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