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
e4831015
Commit
e4831015
authored
Apr 04, 2014
by
Alan Boudreault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No more need to cast with the enforce_type in XBlock
parent
83b2f7b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
mentoring/mentoring.py
+2
-11
No files found.
mentoring/mentoring.py
View file @
e4831015
...
...
@@ -116,15 +116,6 @@ class MentoringBlock(XBlockWithLightChildren):
log
.
info
(
u'Received submissions: {}'
.
format
(
submissions
))
self
.
attempted
=
True
# TODO Don't do that...
# The xblock.fields.Field implementation has the effect that if the data *is not* read from
# the json (real xblock), it is set as dirty and it doesn't take care of the data type. So
# self.max_attempts is a string since it is read from the xml and set using 'setattr'.
try
:
max_attempts
=
int
(
self
.
max_attempts
)
except
ValueError
:
max_attempts
=
0
submit_results
=
[]
completed
=
True
for
child
in
self
.
get_children_objects
():
...
...
@@ -159,7 +150,7 @@ class MentoringBlock(XBlockWithLightChildren):
self
.
completed
=
bool
(
completed
)
if
not
self
.
completed
and
max_attempts
>
0
:
if
not
self
.
completed
and
self
.
max_attempts
>
0
:
self
.
num_attempts
+=
1
return
{
...
...
@@ -167,7 +158,7 @@ class MentoringBlock(XBlockWithLightChildren):
'completed'
:
self
.
completed
,
'attempted'
:
self
.
attempted
,
'message'
:
message
,
'max_attempts'
:
max_attempts
,
'max_attempts'
:
self
.
max_attempts
,
'num_attempts'
:
self
.
num_attempts
}
...
...
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