{"action":"created","comment":{"url":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/comments/25963222","id":25963222,"diff_hunk":"@@ -0,0 +1,137 @@\n+/*jslint browser: true, undef: true *//*global Ext,Slate*/\n+Ext.define('Slate.cbl.view.student.DashboardController', {\n+    extend: 'Ext.app.ViewController',\n+    alias: 'controller.slate-cbl-student-dashboard',\n+    requires: [\n+        'Slate.cbl.model.Student',\n+        'Slate.cbl.model.Competency',\n+        'Slate.cbl.view.student.skill.OverviewWindow'\n+    ],\n+\n+    config: {\n+        id: 'slate-cbl-teacher-dashboard', // workaround for http://www.sencha.com/forum/showthread.php?290043-5.0.1-destroying-a-view-with-ViewController-attached-disables-listen-..-handlers\n+        control: {\n+            '#': {\n+//                contentareachange: 'refresh',\n+//                progressrowclick: 'onProgressRowClick',\n+                democellclick: 'onDemoCellClick',\n+                render: 'onComponentRender'\n+            }\n+        }\n+    },\n+\n+    // lifecycle overrides\n+    init: function() {\n+        var me = this;\n+\n+        Ext.create('Ext.data.Store', {\n+            storeId: 'cbl-competencies-loaded',\n+            model: 'Slate.cbl.model.Competency'\n+        });\n+    },\n+\n+\n+    //event handlers\n+    onComponentRender: function(dashboardView) {\n+        var me = this,\n+            siteEnv = window.SiteEnvironment || {},\n+            student = siteEnv.cblStudent && Ext.create('Slate.cbl.model.Student', siteEnv.cblStudent)\n+        studentDashboardCompetenciesList = dashboardView.el.down('#studentDashboardCompetenciesList'),\n+            contentArea = siteEnv.cblContentArea && Ext.create('Slate.cbl.model.ContentArea', siteEnv.cblContentArea),\n+            competenciesStore = Ext.getStore('cbl-competencies-loaded'),\n+            competenciesTpl = Ext.XTemplate.getTpl(me.view, 'competenciesTpl');\n+\n+        if (!student || !contentArea) {\n+            return;\n+        }\n+\n+        // empty competencies list\n+        studentDashboardCompetenciesList.empty();\n+        studentDashboardCompetenciesList.removeCls('competencies-unloaded').addCls('competencies-loading');\n+\n+        contentArea.getCompetenciesForStudents([student.getId()], function(competencies) {\n+            var competenciesLength = competencies.length,\n+                competencyIndex = 0,\n+                competency, skillsList;\n+\n+\n+            if(!competenciesStore.isLoaded()) {\n+                competenciesStore.loadRawData(competencies);\n+            }\n+\n+            competenciesTpl.overwrite(studentDashboardCompetenciesList, {\n+                student: student.getData(),\n+                competencies: competencies\n+            });\n+\n+            studentDashboardCompetenciesList.removeCls('competencies-loading').addCls('competencies-loaded');\n+\n+            for (; competencyIndex < competenciesLength; competencyIndex++) {\n+                competency = Ext.create('Slate.cbl.model.Competency', competencies[competencyIndex]);\n+                skillsList = studentDashboardCompetenciesList.down('.cbl-competency-panel[data-competency=\"'+competency.getId()+'\"] .cbl-skill-meter');\n+                me.loadSkills(student, competency, skillsList);\n+            }\n+        });\n+    },\n+\n+    onDemoCellClick: function(dashboardView, ev, targetEl) {\n+\n+        Ext.create('Slate.cbl.view.student.skill.OverviewWindow', {\n+            autoShow: true,\n+            animateTarget: targetEl,\n+\n+            student: window.SiteEnvironment.cblStudent.ID,\n+            competency: targetEl.up('ul.cbl-skill-demos').up('li.cbl-competency-panel').getAttribute('data-competency'),\n+            skill: targetEl.getAttribute('data-skill')\n+        });\n+    },\n+\n+\n+\n+    // protected methods\n+    loadSkills: function(student, competency, skillsList) {\n+        var me = this,\n+            skillsTpl = Ext.XTemplate.getTpl(me.view, 'skillsTpl'),\n+            skills, demonstrations, _renderSkills;\n+\n+        skillsList.removeCls('skills-unloaded').addCls('skills-loading');\n+\n+        _renderSkills = function() {\n+            var demonstrationsLength = demonstrations.length, demonstrationIndex = 0, demonstration, skill;\n+            // group skills by student","path":"sencha-workspace/packages/slate-cbl/src/view/student/DashboardController.js","position":101,"original_position":101,"commit_id":"c5a68b138c2af056630555675d979224e0e964c6","original_commit_id":"c5a68b138c2af056630555675d979224e0e964c6","user":{"login":"themightychris","id":458494,"avatar_url":"https://avatars.githubusercontent.com/u/458494?v=3","gravatar_id":"","url":"https://api.github.com/users/themightychris","html_url":"https://github.com/themightychris","followers_url":"https://api.github.com/users/themightychris/followers","following_url":"https://api.github.com/users/themightychris/following{/other_user}","gists_url":"https://api.github.com/users/themightychris/gists{/gist_id}","starred_url":"https://api.github.com/users/themightychris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/themightychris/subscriptions","organizations_url":"https://api.github.com/users/themightychris/orgs","repos_url":"https://api.github.com/users/themightychris/repos","events_url":"https://api.github.com/users/themightychris/events{/privacy}","received_events_url":"https://api.github.com/users/themightychris/received_events","type":"User","site_admin":false},"body":"Good catch, this comment is a stowaway from https://github.com/SlateFoundation/slate-cbl/blob/master/sencha-workspace/packages/slate-cbl/src/view/teacher/DashboardController.js#L289\r\n\r\nthis comment should read `// group demonstrations by skill`","created_at":"2015-03-06T18:01:14Z","updated_at":"2015-03-06T18:01:14Z","html_url":"https://github.com/SlateFoundation/slate-cbl/pull/17#discussion_r25963222","pull_request_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/comments/25963222"},"html":{"href":"https://github.com/SlateFoundation/slate-cbl/pull/17#discussion_r25963222"},"pull_request":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/17","id":30596048,"html_url":"https://github.com/SlateFoundation/slate-cbl/pull/17","diff_url":"https://github.com/SlateFoundation/slate-cbl/pull/17.diff","patch_url":"https://github.com/SlateFoundation/slate-cbl/pull/17.patch","issue_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/issues/17","number":17,"state":"open","locked":false,"title":"Full skill language rollover","user":{"login":"jmealo","id":1066536,"avatar_url":"https://avatars.githubusercontent.com/u/1066536?v=3","gravatar_id":"","url":"https://api.github.com/users/jmealo","html_url":"https://github.com/jmealo","followers_url":"https://api.github.com/users/jmealo/followers","following_url":"https://api.github.com/users/jmealo/following{/other_user}","gists_url":"https://api.github.com/users/jmealo/gists{/gist_id}","starred_url":"https://api.github.com/users/jmealo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmealo/subscriptions","organizations_url":"https://api.github.com/users/jmealo/orgs","repos_url":"https://api.github.com/users/jmealo/repos","events_url":"https://api.github.com/users/jmealo/events{/privacy}","received_events_url":"https://api.github.com/users/jmealo/received_events","type":"User","site_admin":false},"body":"https://www.wrike.com/open.htm?id=38474811\r\n\r\nThis PR also includes:\r\n* The latest stylesheets and placeholders for recent activity and graduation progress from @ryon \r\n* Student dashboard JavaScript files from WIP pull request (all progress)\r\n","created_at":"2015-03-05T21:12:05Z","updated_at":"2015-03-06T18:01:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e59a7efc53ed74b1c3079fa088d16ec1811d0eb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/17/commits","review_comments_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/17/comments","review_comment_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/issues/17/comments","statuses_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/statuses/c5a68b138c2af056630555675d979224e0e964c6","head":{"label":"jmealo:standard-overview","ref":"standard-overview","sha":"c5a68b138c2af056630555675d979224e0e964c6","user":{"login":"jmealo","id":1066536,"avatar_url":"https://avatars.githubusercontent.com/u/1066536?v=3","gravatar_id":"","url":"https://api.github.com/users/jmealo","html_url":"https://github.com/jmealo","followers_url":"https://api.github.com/users/jmealo/followers","following_url":"https://api.github.com/users/jmealo/following{/other_user}","gists_url":"https://api.github.com/users/jmealo/gists{/gist_id}","starred_url":"https://api.github.com/users/jmealo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmealo/subscriptions","organizations_url":"https://api.github.com/users/jmealo/orgs","repos_url":"https://api.github.com/users/jmealo/repos","events_url":"https://api.github.com/users/jmealo/events{/privacy}","received_events_url":"https://api.github.com/users/jmealo/received_events","type":"User","site_admin":false},"repo":{"id":31085095,"name":"slate-cbl","full_name":"jmealo/slate-cbl","owner":{"login":"jmealo","id":1066536,"avatar_url":"https://avatars.githubusercontent.com/u/1066536?v=3","gravatar_id":"","url":"https://api.github.com/users/jmealo","html_url":"https://github.com/jmealo","followers_url":"https://api.github.com/users/jmealo/followers","following_url":"https://api.github.com/users/jmealo/following{/other_user}","gists_url":"https://api.github.com/users/jmealo/gists{/gist_id}","starred_url":"https://api.github.com/users/jmealo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmealo/subscriptions","organizations_url":"https://api.github.com/users/jmealo/orgs","repos_url":"https://api.github.com/users/jmealo/repos","events_url":"https://api.github.com/users/jmealo/events{/privacy}","received_events_url":"https://api.github.com/users/jmealo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmealo/slate-cbl","description":"","fork":true,"url":"https://api.github.com/repos/jmealo/slate-cbl","forks_url":"https://api.github.com/repos/jmealo/slate-cbl/forks","keys_url":"https://api.github.com/repos/jmealo/slate-cbl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmealo/slate-cbl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmealo/slate-cbl/teams","hooks_url":"https://api.github.com/repos/jmealo/slate-cbl/hooks","issue_events_url":"https://api.github.com/repos/jmealo/slate-cbl/issues/events{/number}","events_url":"https://api.github.com/repos/jmealo/slate-cbl/events","assignees_url":"https://api.github.com/repos/jmealo/slate-cbl/assignees{/user}","branches_url":"https://api.github.com/repos/jmealo/slate-cbl/branches{/branch}","tags_url":"https://api.github.com/repos/jmealo/slate-cbl/tags","blobs_url":"https://api.github.com/repos/jmealo/slate-cbl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmealo/slate-cbl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmealo/slate-cbl/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmealo/slate-cbl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmealo/slate-cbl/statuses/{sha}","languages_url":"https://api.github.com/repos/jmealo/slate-cbl/languages","stargazers_url":"https://api.github.com/repos/jmealo/slate-cbl/stargazers","contributors_url":"https://api.github.com/repos/jmealo/slate-cbl/contributors","subscribers_url":"https://api.github.com/repos/jmealo/slate-cbl/subscribers","subscription_url":"https://api.github.com/repos/jmealo/slate-cbl/subscription","commits_url":"https://api.github.com/repos/jmealo/slate-cbl/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmealo/slate-cbl/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmealo/slate-cbl/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmealo/slate-cbl/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmealo/slate-cbl/contents/{+path}","compare_url":"https://api.github.com/repos/jmealo/slate-cbl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmealo/slate-cbl/merges","archive_url":"https://api.github.com/repos/jmealo/slate-cbl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmealo/slate-cbl/downloads","issues_url":"https://api.github.com/repos/jmealo/slate-cbl/issues{/number}","pulls_url":"https://api.github.com/repos/jmealo/slate-cbl/pulls{/number}","milestones_url":"https://api.github.com/repos/jmealo/slate-cbl/milestones{/number}","notifications_url":"https://api.github.com/repos/jmealo/slate-cbl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmealo/slate-cbl/labels{/name}","releases_url":"https://api.github.com/repos/jmealo/slate-cbl/releases{/id}","created_at":"2015-02-20T21:02:09Z","updated_at":"2015-02-20T21:02:09Z","pushed_at":"2015-03-05T21:32:50Z","git_url":"git://github.com/jmealo/slate-cbl.git","ssh_url":"git@github.com:jmealo/slate-cbl.git","clone_url":"https://github.com/jmealo/slate-cbl.git","svn_url":"https://github.com/jmealo/slate-cbl","homepage":null,"size":1104,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SlateFoundation:development","ref":"development","sha":"3a15b19d9f325ed65c4893c8b64b5f5a0b49a91d","user":{"login":"SlateFoundation","id":6454564,"avatar_url":"https://avatars.githubusercontent.com/u/6454564?v=3","gravatar_id":"","url":"https://api.github.com/users/SlateFoundation","html_url":"https://github.com/SlateFoundation","followers_url":"https://api.github.com/users/SlateFoundation/followers","following_url":"https://api.github.com/users/SlateFoundation/following{/other_user}","gists_url":"https://api.github.com/users/SlateFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/SlateFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlateFoundation/subscriptions","organizations_url":"https://api.github.com/users/SlateFoundation/orgs","repos_url":"https://api.github.com/users/SlateFoundation/repos","events_url":"https://api.github.com/users/SlateFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/SlateFoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":23195334,"name":"slate-cbl","full_name":"SlateFoundation/slate-cbl","owner":{"login":"SlateFoundation","id":6454564,"avatar_url":"https://avatars.githubusercontent.com/u/6454564?v=3","gravatar_id":"","url":"https://api.github.com/users/SlateFoundation","html_url":"https://github.com/SlateFoundation","followers_url":"https://api.github.com/users/SlateFoundation/followers","following_url":"https://api.github.com/users/SlateFoundation/following{/other_user}","gists_url":"https://api.github.com/users/SlateFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/SlateFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlateFoundation/subscriptions","organizations_url":"https://api.github.com/users/SlateFoundation/orgs","repos_url":"https://api.github.com/users/SlateFoundation/repos","events_url":"https://api.github.com/users/SlateFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/SlateFoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SlateFoundation/slate-cbl","description":"","fork":false,"url":"https://api.github.com/repos/SlateFoundation/slate-cbl","forks_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/forks","keys_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/teams","hooks_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/hooks","issue_events_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/issues/events{/number}","events_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/events","assignees_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/assignees{/user}","branches_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/branches{/branch}","tags_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/tags","blobs_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/git/refs{/sha}","trees_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/statuses/{sha}","languages_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/languages","stargazers_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/stargazers","contributors_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/contributors","subscribers_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/subscribers","subscription_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/subscription","commits_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/commits{/sha}","git_commits_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/git/commits{/sha}","comments_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/comments{/number}","issue_comment_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/issues/comments{/number}","contents_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/contents/{+path}","compare_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/merges","archive_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/downloads","issues_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/issues{/number}","pulls_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls{/number}","milestones_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/milestones{/number}","notifications_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/labels{/name}","releases_url":"https://api.github.com/repos/SlateFoundation/slate-cbl/releases{/id}","created_at":"2014-08-21T16:53:22Z","updated_at":"2015-03-03T15:42:48Z","pushed_at":"2015-03-03T15:53:53Z","git_url":"git://github.com/SlateFoundation/slate-cbl.git","ssh_url":"git@github.com:SlateFoundation/slate-cbl.git","clone_url":"https://github.com/SlateFoundation/slate-cbl.git","svn_url":"https://github.com/SlateFoundation/slate-cbl","homepage":null,"size":1330,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/17"},"html":{"href":"https://github.com/SlateFoundation/slate-cbl/pull/17"},"issue":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/issues/17"},"comments":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/SlateFoundation/slate-cbl/statuses/c5a68b138c2af056630555675d979224e0e964c6"}}}}