Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
db183af6
Commit
db183af6
authored
Sep 06, 2012
by
kimth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #636 from MITx/feature/cale/progress-handle-extra-credit
Feature/cale/progress handle extra credit
parents
8f10461f
b28317ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
common/lib/xmodule/xmodule/capa_module.py
+2
-4
common/lib/xmodule/xmodule/progress.py
+8
-3
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
db183af6
...
...
@@ -202,10 +202,8 @@ class CapaModule(XModule):
try
:
return
Progress
(
score
,
total
)
except
Exception
as
err
:
# TODO (vshnayder): why is this still here? still needed?
if
self
.
system
.
DEBUG
:
return
None
raise
log
.
exception
(
"Got bad progress"
)
return
None
return
None
def
get_html
(
self
):
...
...
common/lib/xmodule/xmodule/progress.py
View file @
db183af6
...
...
@@ -39,9 +39,14 @@ class Progress(object):
isinstance
(
b
,
numbers
.
Number
)):
raise
TypeError
(
'a and b must be numbers. Passed {0}/{1}'
.
format
(
a
,
b
))
if
not
(
0
<=
a
<=
b
and
b
>
0
):
raise
ValueError
(
'fraction a/b = {0}/{1} must have 0 <= a <= b and b > 0'
.
format
(
a
,
b
))
if
a
>
b
:
a
=
b
if
a
<
0
:
a
=
0
if
b
<=
0
:
raise
ValueError
(
'fraction a/b = {0}/{1} must have b > 0'
.
format
(
a
,
b
))
self
.
_a
=
a
self
.
_b
=
b
...
...
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