Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
RecommenderXBlock
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
RecommenderXBlock
Commits
ab82c567
Commit
ab82c567
authored
Jan 08, 2015
by
swdanielli
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #31 from pmitros/danielli/code_review
code clean
parents
a206d84f
fc3fbeb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
recommender/recommender.py
+1
-3
No files found.
recommender/recommender.py
View file @
ab82c567
...
...
@@ -362,8 +362,6 @@ class RecommenderXBlock(XBlock):
# Return new vote
result
[
'newVotes'
]
=
(
self
.
recommendations
[
resource_id
][
'upvotes'
]
-
self
.
recommendations
[
resource_id
][
'downvotes'
])
if
'newVotes'
in
result
:
tracker
.
emit
(
data
[
'event'
],
result
)
return
result
...
...
@@ -522,7 +520,7 @@ class RecommenderXBlock(XBlock):
"""
resource_id
=
stem_url
(
data
[
'id'
])
if
resource_id
not
in
self
.
recommendations
:
msg
=
'The selected resource
is not existing
'
msg
=
'The selected resource
does not exist
'
self
.
error_handler
(
msg
,
'edit_resource'
,
resource_id
)
result
=
{}
...
...
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