{"action":"created","issue":{"url":"https://api.github.com/repos/aselcillo/TheLearningGames/issues/74","repository_url":"https://api.github.com/repos/aselcillo/TheLearningGames","labels_url":"https://api.github.com/repos/aselcillo/TheLearningGames/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/aselcillo/TheLearningGames/issues/74/comments","events_url":"https://api.github.com/repos/aselcillo/TheLearningGames/issues/74/events","html_url":"https://github.com/aselcillo/TheLearningGames/issues/74","id":232218899,"number":74,"title":"There is a problem with notifications.","user":{"login":"aselcillo","id":19840373,"avatar_url":"https://avatars0.githubusercontent.com/u/19840373?v=3","gravatar_id":"","url":"https://api.github.com/users/aselcillo","html_url":"https://github.com/aselcillo","followers_url":"https://api.github.com/users/aselcillo/followers","following_url":"https://api.github.com/users/aselcillo/following{/other_user}","gists_url":"https://api.github.com/users/aselcillo/gists{/gist_id}","starred_url":"https://api.github.com/users/aselcillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aselcillo/subscriptions","organizations_url":"https://api.github.com/users/aselcillo/orgs","repos_url":"https://api.github.com/users/aselcillo/repos","events_url":"https://api.github.com/users/aselcillo/events{/privacy}","received_events_url":"https://api.github.com/users/aselcillo/received_events","type":"User","site_admin":false},"labels":[{"id":591764264,"url":"https://api.github.com/repos/aselcillo/TheLearningGames/labels/bug","name":"bug","color":"ee0701","default":true},{"id":591764265,"url":"https://api.github.com/repos/aselcillo/TheLearningGames/labels/duplicate","name":"duplicate","color":"cccccc","default":true}],"state":"open","locked":false,"assignee":{"login":"aselcillo","id":19840373,"avatar_url":"https://avatars0.githubusercontent.com/u/19840373?v=3","gravatar_id":"","url":"https://api.github.com/users/aselcillo","html_url":"https://github.com/aselcillo","followers_url":"https://api.github.com/users/aselcillo/followers","following_url":"https://api.github.com/users/aselcillo/following{/other_user}","gists_url":"https://api.github.com/users/aselcillo/gists{/gist_id}","starred_url":"https://api.github.com/users/aselcillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aselcillo/subscriptions","organizations_url":"https://api.github.com/users/aselcillo/orgs","repos_url":"https://api.github.com/users/aselcillo/repos","events_url":"https://api.github.com/users/aselcillo/events{/privacy}","received_events_url":"https://api.github.com/users/aselcillo/received_events","type":"User","site_admin":false},"assignees":[{"login":"aselcillo","id":19840373,"avatar_url":"https://avatars0.githubusercontent.com/u/19840373?v=3","gravatar_id":"","url":"https://api.github.com/users/aselcillo","html_url":"https://github.com/aselcillo","followers_url":"https://api.github.com/users/aselcillo/followers","following_url":"https://api.github.com/users/aselcillo/following{/other_user}","gists_url":"https://api.github.com/users/aselcillo/gists{/gist_id}","starred_url":"https://api.github.com/users/aselcillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aselcillo/subscriptions","organizations_url":"https://api.github.com/users/aselcillo/orgs","repos_url":"https://api.github.com/users/aselcillo/repos","events_url":"https://api.github.com/users/aselcillo/events{/privacy}","received_events_url":"https://api.github.com/users/aselcillo/received_events","type":"User","site_admin":false},{"login":"Elvo95","id":22739607,"avatar_url":"https://avatars0.githubusercontent.com/u/22739607?v=3","gravatar_id":"","url":"https://api.github.com/users/Elvo95","html_url":"https://github.com/Elvo95","followers_url":"https://api.github.com/users/Elvo95/followers","following_url":"https://api.github.com/users/Elvo95/following{/other_user}","gists_url":"https://api.github.com/users/Elvo95/gists{/gist_id}","starred_url":"https://api.github.com/users/Elvo95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elvo95/subscriptions","organizations_url":"https://api.github.com/users/Elvo95/orgs","repos_url":"https://api.github.com/users/Elvo95/repos","events_url":"https://api.github.com/users/Elvo95/events{/privacy}","received_events_url":"https://api.github.com/users/Elvo95/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-05-30T11:13:54Z","updated_at":"2017-05-30T13:28:03Z","closed_at":null,"body":"I was giving points to a student, and then I saw the notifications. Then the same notification \"The student Ivan Gonzalez has unlocked the level 1 in the achievement: Just a bit more\" appears 26 times.\r\nI'm not going to clear those notifications to make an analysis of what is happening. \r\n\r\nIt seems that we have to take a look at the worst function in our code...\r\n\r\n(Edit)\r\nIn the student part is happening the same.\r\nThere is a problem with the if sentences. We are saying: \"if (points > achievementToCheck.requirements)\" so is always entering in this block. Even if the achievement is already unlocked by the student. It is doing it 26 times, because that achievement's required points are 75. So until the points came to the maxScore (100) is always sending notifications."},"comment":{"url":"https://api.github.com/repos/aselcillo/TheLearningGames/issues/comments/304877798","html_url":"https://github.com/aselcillo/TheLearningGames/issues/74#issuecomment-304877798","issue_url":"https://api.github.com/repos/aselcillo/TheLearningGames/issues/74","id":304877798,"user":{"login":"Elvo95","id":22739607,"avatar_url":"https://avatars0.githubusercontent.com/u/22739607?v=3","gravatar_id":"","url":"https://api.github.com/users/Elvo95","html_url":"https://github.com/Elvo95","followers_url":"https://api.github.com/users/Elvo95/followers","following_url":"https://api.github.com/users/Elvo95/following{/other_user}","gists_url":"https://api.github.com/users/Elvo95/gists{/gist_id}","starred_url":"https://api.github.com/users/Elvo95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elvo95/subscriptions","organizations_url":"https://api.github.com/users/Elvo95/orgs","repos_url":"https://api.github.com/users/Elvo95/repos","events_url":"https://api.github.com/users/Elvo95/events{/privacy}","received_events_url":"https://api.github.com/users/Elvo95/received_events","type":"User","site_admin":false},"created_at":"2017-05-30T13:28:03Z","updated_at":"2017-05-30T13:28:03Z","body":"Check when lose an achievement notification parameter the levelAchievement.\r\nCheck commented part in checkAchievement"}}
{"actor":{"display_login":"Elvo95"}}