{"action":"created","comment":{"url":"https://api.github.com/repos/otavanopisto/muikku/pulls/comments/46816788","id":46816788,"diff_hunk":"@@ -244,29 +244,40 @@\n           \n           var assignments = [];\n           for (var i = 0; i<this.options.workspaceEvaluableAssignments.length; i++) {\n-            var workspaceEvaluableAssignment = this.options.workspaceEvaluableAssignments[i];\n-            mApi({async: false}).workspace.workspaces.materials.evaluations\n-            .read(this.options.workspaceEntityId, workspaceEvaluableAssignment.workspaceMaterial.id, {userEntityId: this.options.studentEntityId})\n-            .callback($.proxy(function(err, evaluations) {\n-              var evaluation = null;\n-              if (evaluations != null && evaluations.length > 0) {\n-                evaluation = evaluations[0];\n-              }\n-              assignments.push({\n-                workspaceMaterialId: workspaceEvaluableAssignment.workspaceMaterial.id,\n-                materialId: workspaceEvaluableAssignment.workspaceMaterial.materialId,\n-                type: 'html',\n-                title: workspaceEvaluableAssignment.workspaceMaterial.title,\n-                html: htmlMaterialMap[workspaceEvaluableAssignment.workspaceMaterial.materialId].html,\n-                evaluation: evaluation\n-              });\n-            }, this));\n-          }\n-          this._loadTemplate(assignments, callback);\n+            assignments.push(this._loadAssigmentEvaluation(this.options.workspaceEvaluableAssignments[i], htmlMaterialMap));\n+          } \n+          async.parallel(assignments, $.proxy(function(err, results){\n+            if(!err){","path":"muikku-evaluation-plugin/src/main/resources/META-INF/resources/scripts/gui/evaluation.js","position":41,"original_position":41,"commit_id":"ec09d7cf5acc061823c6d8aaf36811a844c17be2","original_commit_id":"ec09d7cf5acc061823c6d8aaf36811a844c17be2","user":{"login":"pkukkon","id":3963004,"avatar_url":"https://avatars.githubusercontent.com/u/3963004?v=3","gravatar_id":"","url":"https://api.github.com/users/pkukkon","html_url":"https://github.com/pkukkon","followers_url":"https://api.github.com/users/pkukkon/followers","following_url":"https://api.github.com/users/pkukkon/following{/other_user}","gists_url":"https://api.github.com/users/pkukkon/gists{/gist_id}","starred_url":"https://api.github.com/users/pkukkon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkukkon/subscriptions","organizations_url":"https://api.github.com/users/pkukkon/orgs","repos_url":"https://api.github.com/users/pkukkon/repos","events_url":"https://api.github.com/users/pkukkon/events{/privacy}","received_events_url":"https://api.github.com/users/pkukkon/received_events","type":"User","site_admin":false},"body":"show error","created_at":"2015-12-07T12:48:24Z","updated_at":"2015-12-07T12:48:24Z","html_url":"https://github.com/otavanopisto/muikku/pull/1043#discussion_r46816788","pull_request_url":"https://api.github.com/repos/otavanopisto/muikku/pulls/1043","_links":{"self":{"href":"https://api.github.com/repos/otavanopisto/muikku/pulls/comments/46816788"},"html":{"href":"https://github.com/otavanopisto/muikku/pull/1043#discussion_r46816788"},"pull_request":{"href":"https://api.github.com/repos/otavanopisto/muikku/pulls/1043"}}},"pull_request":{"url":"https://api.github.com/repos/otavanopisto/muikku/pulls/1043","id":52828158,"html_url":"https://github.com/otavanopisto/muikku/pull/1043","diff_url":"https://github.com/otavanopisto/muikku/pull/1043.diff","patch_url":"https://github.com/otavanopisto/muikku/pull/1043.patch","issue_url":"https://api.github.com/repos/otavanopisto/muikku/issues/1043","number":1043,"state":"open","locked":false,"title":"Bug 1026 slow evaluation","user":{"login":"anttileppa","id":1730736,"avatar_url":"https://avatars.githubusercontent.com/u/1730736?v=3","gravatar_id":"","url":"https://api.github.com/users/anttileppa","html_url":"https://github.com/anttileppa","followers_url":"https://api.github.com/users/anttileppa/followers","following_url":"https://api.github.com/users/anttileppa/following{/other_user}","gists_url":"https://api.github.com/users/anttileppa/gists{/gist_id}","starred_url":"https://api.github.com/users/anttileppa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anttileppa/subscriptions","organizations_url":"https://api.github.com/users/anttileppa/orgs","repos_url":"https://api.github.com/users/anttileppa/repos","events_url":"https://api.github.com/users/anttileppa/events{/privacy}","received_events_url":"https://api.github.com/users/anttileppa/received_events","type":"User","site_admin":false},"body":"Fixes #1026 ","created_at":"2015-12-07T10:35:44Z","updated_at":"2015-12-07T12:48:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d71e38194df5879d5ac0ebfb42bc51f6a7adbc9c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/otavanopisto/muikku/pulls/1043/commits","review_comments_url":"https://api.github.com/repos/otavanopisto/muikku/pulls/1043/comments","review_comment_url":"https://api.github.com/repos/otavanopisto/muikku/pulls/comments{/number}","comments_url":"https://api.github.com/repos/otavanopisto/muikku/issues/1043/comments","statuses_url":"https://api.github.com/repos/otavanopisto/muikku/statuses/ec09d7cf5acc061823c6d8aaf36811a844c17be2","head":{"label":"otavanopisto:BUG-1026_slow_evaluation","ref":"BUG-1026_slow_evaluation","sha":"ec09d7cf5acc061823c6d8aaf36811a844c17be2","user":{"login":"otavanopisto","id":3909061,"avatar_url":"https://avatars.githubusercontent.com/u/3909061?v=3","gravatar_id":"","url":"https://api.github.com/users/otavanopisto","html_url":"https://github.com/otavanopisto","followers_url":"https://api.github.com/users/otavanopisto/followers","following_url":"https://api.github.com/users/otavanopisto/following{/other_user}","gists_url":"https://api.github.com/users/otavanopisto/gists{/gist_id}","starred_url":"https://api.github.com/users/otavanopisto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otavanopisto/subscriptions","organizations_url":"https://api.github.com/users/otavanopisto/orgs","repos_url":"https://api.github.com/users/otavanopisto/repos","events_url":"https://api.github.com/users/otavanopisto/events{/privacy}","received_events_url":"https://api.github.com/users/otavanopisto/received_events","type":"Organization","site_admin":false},"repo":{"id":8877030,"name":"muikku","full_name":"otavanopisto/muikku","owner":{"login":"otavanopisto","id":3909061,"avatar_url":"https://avatars.githubusercontent.com/u/3909061?v=3","gravatar_id":"","url":"https://api.github.com/users/otavanopisto","html_url":"https://github.com/otavanopisto","followers_url":"https://api.github.com/users/otavanopisto/followers","following_url":"https://api.github.com/users/otavanopisto/following{/other_user}","gists_url":"https://api.github.com/users/otavanopisto/gists{/gist_id}","starred_url":"https://api.github.com/users/otavanopisto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otavanopisto/subscriptions","organizations_url":"https://api.github.com/users/otavanopisto/orgs","repos_url":"https://api.github.com/users/otavanopisto/repos","events_url":"https://api.github.com/users/otavanopisto/events{/privacy}","received_events_url":"https://api.github.com/users/otavanopisto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/otavanopisto/muikku","description":"Muikku Learning Environment","fork":false,"url":"https://api.github.com/repos/otavanopisto/muikku","forks_url":"https://api.github.com/repos/otavanopisto/muikku/forks","keys_url":"https://api.github.com/repos/otavanopisto/muikku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otavanopisto/muikku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otavanopisto/muikku/teams","hooks_url":"https://api.github.com/repos/otavanopisto/muikku/hooks","issue_events_url":"https://api.github.com/repos/otavanopisto/muikku/issues/events{/number}","events_url":"https://api.github.com/repos/otavanopisto/muikku/events","assignees_url":"https://api.github.com/repos/otavanopisto/muikku/assignees{/user}","branches_url":"https://api.github.com/repos/otavanopisto/muikku/branches{/branch}","tags_url":"https://api.github.com/repos/otavanopisto/muikku/tags","blobs_url":"https://api.github.com/repos/otavanopisto/muikku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otavanopisto/muikku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otavanopisto/muikku/git/refs{/sha}","trees_url":"https://api.github.com/repos/otavanopisto/muikku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otavanopisto/muikku/statuses/{sha}","languages_url":"https://api.github.com/repos/otavanopisto/muikku/languages","stargazers_url":"https://api.github.com/repos/otavanopisto/muikku/stargazers","contributors_url":"https://api.github.com/repos/otavanopisto/muikku/contributors","subscribers_url":"https://api.github.com/repos/otavanopisto/muikku/subscribers","subscription_url":"https://api.github.com/repos/otavanopisto/muikku/subscription","commits_url":"https://api.github.com/repos/otavanopisto/muikku/commits{/sha}","git_commits_url":"https://api.github.com/repos/otavanopisto/muikku/git/commits{/sha}","comments_url":"https://api.github.com/repos/otavanopisto/muikku/comments{/number}","issue_comment_url":"https://api.github.com/repos/otavanopisto/muikku/issues/comments{/number}","contents_url":"https://api.github.com/repos/otavanopisto/muikku/contents/{+path}","compare_url":"https://api.github.com/repos/otavanopisto/muikku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otavanopisto/muikku/merges","archive_url":"https://api.github.com/repos/otavanopisto/muikku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otavanopisto/muikku/downloads","issues_url":"https://api.github.com/repos/otavanopisto/muikku/issues{/number}","pulls_url":"https://api.github.com/repos/otavanopisto/muikku/pulls{/number}","milestones_url":"https://api.github.com/repos/otavanopisto/muikku/milestones{/number}","notifications_url":"https://api.github.com/repos/otavanopisto/muikku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otavanopisto/muikku/labels{/name}","releases_url":"https://api.github.com/repos/otavanopisto/muikku/releases{/id}","created_at":"2013-03-19T11:30:32Z","updated_at":"2015-07-31T12:46:34Z","pushed_at":"2015-12-07T12:26:25Z","git_url":"git://github.com/otavanopisto/muikku.git","ssh_url":"git@github.com:otavanopisto/muikku.git","clone_url":"https://github.com/otavanopisto/muikku.git","svn_url":"https://github.com/otavanopisto/muikku","homepage":null,"size":245854,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":415,"forks":0,"open_issues":415,"watchers":4,"default_branch":"master"}},"base":{"label":"otavanopisto:devel","ref":"devel","sha":"44117bde7e7e5228be7e4178f79af93705d38911","user":{"login":"otavanopisto","id":3909061,"avatar_url":"https://avatars.githubusercontent.com/u/3909061?v=3","gravatar_id":"","url":"https://api.github.com/users/otavanopisto","html_url":"https://github.com/otavanopisto","followers_url":"https://api.github.com/users/otavanopisto/followers","following_url":"https://api.github.com/users/otavanopisto/following{/other_user}","gists_url":"https://api.github.com/users/otavanopisto/gists{/gist_id}","starred_url":"https://api.github.com/users/otavanopisto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otavanopisto/subscriptions","organizations_url":"https://api.github.com/users/otavanopisto/orgs","repos_url":"https://api.github.com/users/otavanopisto/repos","events_url":"https://api.github.com/users/otavanopisto/events{/privacy}","received_events_url":"https://api.github.com/users/otavanopisto/received_events","type":"Organization","site_admin":false},"repo":{"id":8877030,"name":"muikku","full_name":"otavanopisto/muikku","owner":{"login":"otavanopisto","id":3909061,"avatar_url":"https://avatars.githubusercontent.com/u/3909061?v=3","gravatar_id":"","url":"https://api.github.com/users/otavanopisto","html_url":"https://github.com/otavanopisto","followers_url":"https://api.github.com/users/otavanopisto/followers","following_url":"https://api.github.com/users/otavanopisto/following{/other_user}","gists_url":"https://api.github.com/users/otavanopisto/gists{/gist_id}","starred_url":"https://api.github.com/users/otavanopisto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otavanopisto/subscriptions","organizations_url":"https://api.github.com/users/otavanopisto/orgs","repos_url":"https://api.github.com/users/otavanopisto/repos","events_url":"https://api.github.com/users/otavanopisto/events{/privacy}","received_events_url":"https://api.github.com/users/otavanopisto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/otavanopisto/muikku","description":"Muikku Learning Environment","fork":false,"url":"https://api.github.com/repos/otavanopisto/muikku","forks_url":"https://api.github.com/repos/otavanopisto/muikku/forks","keys_url":"https://api.github.com/repos/otavanopisto/muikku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otavanopisto/muikku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otavanopisto/muikku/teams","hooks_url":"https://api.github.com/repos/otavanopisto/muikku/hooks","issue_events_url":"https://api.github.com/repos/otavanopisto/muikku/issues/events{/number}","events_url":"https://api.github.com/repos/otavanopisto/muikku/events","assignees_url":"https://api.github.com/repos/otavanopisto/muikku/assignees{/user}","branches_url":"https://api.github.com/repos/otavanopisto/muikku/branches{/branch}","tags_url":"https://api.github.com/repos/otavanopisto/muikku/tags","blobs_url":"https://api.github.com/repos/otavanopisto/muikku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otavanopisto/muikku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otavanopisto/muikku/git/refs{/sha}","trees_url":"https://api.github.com/repos/otavanopisto/muikku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otavanopisto/muikku/statuses/{sha}","languages_url":"https://api.github.com/repos/otavanopisto/muikku/languages","stargazers_url":"https://api.github.com/repos/otavanopisto/muikku/stargazers","contributors_url":"https://api.github.com/repos/otavanopisto/muikku/contributors","subscribers_url":"https://api.github.com/repos/otavanopisto/muikku/subscribers","subscription_url":"https://api.github.com/repos/otavanopisto/muikku/subscription","commits_url":"https://api.github.com/repos/otavanopisto/muikku/commits{/sha}","git_commits_url":"https://api.github.com/repos/otavanopisto/muikku/git/commits{/sha}","comments_url":"https://api.github.com/repos/otavanopisto/muikku/comments{/number}","issue_comment_url":"https://api.github.com/repos/otavanopisto/muikku/issues/comments{/number}","contents_url":"https://api.github.com/repos/otavanopisto/muikku/contents/{+path}","compare_url":"https://api.github.com/repos/otavanopisto/muikku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otavanopisto/muikku/merges","archive_url":"https://api.github.com/repos/otavanopisto/muikku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otavanopisto/muikku/downloads","issues_url":"https://api.github.com/repos/otavanopisto/muikku/issues{/number}","pulls_url":"https://api.github.com/repos/otavanopisto/muikku/pulls{/number}","milestones_url":"https://api.github.com/repos/otavanopisto/muikku/milestones{/number}","notifications_url":"https://api.github.com/repos/otavanopisto/muikku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otavanopisto/muikku/labels{/name}","releases_url":"https://api.github.com/repos/otavanopisto/muikku/releases{/id}","created_at":"2013-03-19T11:30:32Z","updated_at":"2015-07-31T12:46:34Z","pushed_at":"2015-12-07T12:26:25Z","git_url":"git://github.com/otavanopisto/muikku.git","ssh_url":"git@github.com:otavanopisto/muikku.git","clone_url":"https://github.com/otavanopisto/muikku.git","svn_url":"https://github.com/otavanopisto/muikku","homepage":null,"size":245854,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":415,"forks":0,"open_issues":415,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/otavanopisto/muikku/pulls/1043"},"html":{"href":"https://github.com/otavanopisto/muikku/pull/1043"},"issue":{"href":"https://api.github.com/repos/otavanopisto/muikku/issues/1043"},"comments":{"href":"https://api.github.com/repos/otavanopisto/muikku/issues/1043/comments"},"review_comments":{"href":"https://api.github.com/repos/otavanopisto/muikku/pulls/1043/comments"},"review_comment":{"href":"https://api.github.com/repos/otavanopisto/muikku/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/otavanopisto/muikku/pulls/1043/commits"},"statuses":{"href":"https://api.github.com/repos/otavanopisto/muikku/statuses/ec09d7cf5acc061823c6d8aaf36811a844c17be2"}}}}