Skip to content
Snippets Groups Projects
Commit 2b38e16c authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

fix typo

parent 2ef39984
No related branches found
No related tags found
No related merge requests found
...@@ -19,10 +19,10 @@ class ScoreCalculatorWorker ...@@ -19,10 +19,10 @@ class ScoreCalculatorWorker
score = 0 score = 0
# 250 points if it has thumbnail # 250 points if it has thumbnail
score += weights[:thumbnail] unless object.thumbnail.empty? score += weights[:thumbnail] unless object.thumbnail.blank?
# 150 points if it has description # 150 points if it has description
score += weights[:description] unless object.description.empty? score += weights[:description] unless object.description.blank?
# range to 250 points, for normalized likes ( maxLikes/actualLike => [0..1] ) # range to 250 points, for normalized likes ( maxLikes/actualLike => [0..1] )
likes = learning_object_repository.count_likes(object) likes = learning_object_repository.count_likes(object)
...@@ -33,7 +33,7 @@ class ScoreCalculatorWorker ...@@ -33,7 +33,7 @@ class ScoreCalculatorWorker
score += (views / learning_object_repository.max_views)*weights[:views] unless views < 1 score += (views / learning_object_repository.max_views)*weights[:views] unless views < 1
downloads = learning_object_repository.count_downloads(object) downloads = learning_object_repository.count_downloads(object)
score += (downloads / learning_object_repository.max_downloads)*weights[:downloads] unless views < 1 score += (downloads / learning_object_repository.max_downloads)*weights[:downloads] unless downloads < 1
learning_object_repository.update_property(object, 'score', score) learning_object_repository.update_property(object, 'score', score)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment