Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
da5ce144
Commit
da5ce144
authored
12 years ago
by
Vik Paruchuri
Browse files
Options
Downloads
Patches
Plain Diff
Fix var names, remove debug statements
parent
68c99192
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/xmodule/xmodule/open_ended_image_submission.py
+3
-7
3 additions, 7 deletions
common/lib/xmodule/xmodule/open_ended_image_submission.py
with
3 additions
and
7 deletions
common/lib/xmodule/xmodule/open_ended_image_submission.py
+
3
−
7
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment