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
da5ce144
Commit
da5ce144
authored
Jan 30, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix var names, remove debug statements
parent
68c99192
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
common/lib/xmodule/xmodule/open_ended_image_submission.py
+3
-7
No files found.
common/lib/xmodule/xmodule/open_ended_image_submission.py
View file @
da5ce144
...
...
@@ -67,12 +67,11 @@ class ImageProperties(object):
"""
colors
=
self
.
image
.
getcolors
(
MAX_COLORS_TO_COUNT
)
if
colors
is
None
:
color
s
=
MAX_COLORS_TO_COUNT
color
_count
=
MAX_COLORS_TO_COUNT
else
:
color
s
=
len
(
colors
)
color
_count
=
len
(
colors
)
too_many_colors
=
(
colors
<=
MAX_COLORS
)
log
.
debug
(
"Too many colors: {0}"
.
format
(
too_many_colors
))
too_many_colors
=
(
color_count
<=
MAX_COLORS
)
return
too_many_colors
def
get_skin_ratio
(
self
):
...
...
@@ -89,7 +88,6 @@ class ImageProperties(object):
is_okay
=
False
else
:
is_okay
=
True
log
.
debug
(
"Skin ratio okay: {0}"
.
format
(
is_okay
))
return
is_okay
def
run_tests
(
self
):
...
...
@@ -99,8 +97,6 @@ class ImageProperties(object):
"""
#image_is_okay = self.count_colors() and self.get_skin_ratio() and not self.image_too_large
image_is_okay
=
self
.
count_colors
()
and
not
self
.
image_too_large
log
.
debug
(
"Image too large: {0}"
.
format
(
self
.
image_too_large
))
log
.
debug
(
"Image Okay: {0}"
.
format
(
image_is_okay
))
return
image_is_okay
...
...
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