{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-ora2/pulls/comments/47828606","id":47828606,"diff_hunk":"@@ -310,30 +372,72 @@\n         },\n \n         /**\n-         * Submit the staff assessment.\n+         * Submit the staff assessment override.\n          *\n          * @param {string} submissionID The ID of the submission to be submitted.\n          * @param {element} rubric The rubric element to be assessed.\n+         * @param {element} scope An ancestor element for the submit button (to allow for shared\n+         *     classes in different form).\n          */\n-        submitStaffAssessment: function(submissionID, rubric) {\n-            // Send the assessment to the server\n+        submitStaffOverride: function(submissionID, rubric, scope) {\n             var view = this;\n-            var baseView = this.baseView;\n-            baseView.toggleActionError('staff', null);\n-            view.staffSubmitEnabled(false);\n-\n-            this.server.staffAssess(\n-                rubric.optionsSelected(), rubric.criterionFeedback(), rubric.overallFeedback(), submissionID\n-            ).done(function() {\n+            var successCallback = function() {\n                 // Note: we ignore any message returned from the server and instead\n                 // re-render the student info with the \"Learner's Final Grade\"\n                 // section expanded. This section will show the learner's\n                 // final grade and in the future should include details of\n                 // the staff override itself.\n                 view.loadStudentInfo({expanded_view: 'final-grade'});\n-            }).fail(function(errorMessage) {\n-                $('.staff-override-error').html(_.escape(errorMessage));\n-                view.staffSubmitEnabled(true);\n+            };\n+            this.callStaffAssess(submissionID, rubric, scope, successCallback, '.staff-override-error');\n+        },\n+\n+        /**\n+         * Submit the staff grade, and check out another learner for grading if continueGrading is true.\n+         *\n+         * @param {string} submissionID The ID of the submission to be submitted.\n+         * @param {element} rubric The rubric element to be assessed.\n+         * @param {element} scope An ancestor element for the submit button (to allow for shared\n+         *     classes in different form).\n+         * @param {boolean} continueGrading If true, another learner will be marked as \"In Progress\",\n+         *     and a new grading form will be rendered with the learner's answer.\n+         */\n+        submitStaffGrade: function(submissionID, rubric, scope, continueGrading) {\n+            var view = this;\n+            var successCallback = function() {\n+                view.staffGradeFormLoaded = false;\n+                var showFullGradeTab = function() {\n+                    // Need to show the staff grade component again, unfortunately requiring a global selector.\n+                    $('.button-staff-grading').click();\n+                    if (continueGrading) {\n+                        $('.staff__grade__title', view.element).click();\n+                    }\n+                };\n+                view.load(showFullGradeTab);\n+            };\n+            this.callStaffAssess(submissionID, rubric, scope, successCallback, '.staff-grade-error');\n+        },\n+\n+        /**\n+         * Make the server call to submit the staff assessment.\n+         *\n+         * @param {string} submissionID The ID of the submission to be submitted.\n+         * @param {element} rubric The rubric element to be assessed.\n+         * @param {element} scope An ancestor element for the submit button (to allow for shared\n+         *     classes in different form).\n+         * @param {function} successCallback A function to execute on success.\n+         * @param {string} errorSelector a CSS class selector for displaying error messages.\n+         */\n+        callStaffAssess: function(submissionID, rubric, scope, successCallback, errorSelector) {\n+            var view = this;\n+            view.staffSubmitEnabled(scope, false);\n+\n+            this.server.staffAssess(\n+                rubric.optionsSelected(), rubric.criterionFeedback(), rubric.overallFeedback(), submissionID\n+            ).done(successCallback).fail(function(errorMessage) {\n+                // TODO: this needs styling help Andy!\n+                scope.find(errorSelector).html(_.escape(errorMessage));","path":"openassessment/xblock/static/js/src/lms/oa_staff_area.js","position":259,"original_position":259,"commit_id":"983abc2adfa97f5e7b000b54f3462547e41c2a73","original_commit_id":"983abc2adfa97f5e7b000b54f3462547e41c2a73","user":{"login":"cahrens","id":484484,"avatar_url":"https://avatars.githubusercontent.com/u/484484?v=3","gravatar_id":"","url":"https://api.github.com/users/cahrens","html_url":"https://github.com/cahrens","followers_url":"https://api.github.com/users/cahrens/followers","following_url":"https://api.github.com/users/cahrens/following{/other_user}","gists_url":"https://api.github.com/users/cahrens/gists{/gist_id}","starred_url":"https://api.github.com/users/cahrens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cahrens/subscriptions","organizations_url":"https://api.github.com/users/cahrens/orgs","repos_url":"https://api.github.com/users/cahrens/repos","events_url":"https://api.github.com/users/cahrens/events{/privacy}","received_events_url":"https://api.github.com/users/cahrens/received_events","type":"User","site_admin":false},"body":"@andy-armstrong The display of the error messages all need some styling help (more padding).","created_at":"2015-12-16T20:22:15Z","updated_at":"2015-12-16T20:22:15Z","html_url":"https://github.com/edx/edx-ora2/pull/818#discussion_r47828606","pull_request_url":"https://api.github.com/repos/edx/edx-ora2/pulls/818","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/comments/47828606"},"html":{"href":"https://github.com/edx/edx-ora2/pull/818#discussion_r47828606"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/818"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-ora2/pulls/818","id":53715641,"html_url":"https://github.com/edx/edx-ora2/pull/818","diff_url":"https://github.com/edx/edx-ora2/pull/818.diff","patch_url":"https://github.com/edx/edx-ora2/pull/818.patch","issue_url":"https://api.github.com/repos/edx/edx-ora2/issues/818","number":818,"state":"open","locked":false,"title":"WIP: full grading UI","user":{"login":"cahrens","id":484484,"avatar_url":"https://avatars.githubusercontent.com/u/484484?v=3","gravatar_id":"","url":"https://api.github.com/users/cahrens","html_url":"https://github.com/cahrens","followers_url":"https://api.github.com/users/cahrens/followers","following_url":"https://api.github.com/users/cahrens/following{/other_user}","gists_url":"https://api.github.com/users/cahrens/gists{/gist_id}","starred_url":"https://api.github.com/users/cahrens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cahrens/subscriptions","organizations_url":"https://api.github.com/users/cahrens/orgs","repos_url":"https://api.github.com/users/cahrens/repos","events_url":"https://api.github.com/users/cahrens/events{/privacy}","received_events_url":"https://api.github.com/users/cahrens/received_events","type":"User","site_admin":false},"body":"@explorerleslie before we get into cleaning up the styling, can you take a look at my sandbox and let me know what you think of the UI?\r\n\r\nhttps://cahrens.sandbox.edx.org/courses/course-v1:ora+ora+ora/courseware/24b2dc977ebf497a9b4af7e6d5624707/d0589f1683c0432b9fc8552c5775e356/\r\n\r\nThe functionality should all work. Currently there is only one submitted assessment for review-- staff. honor, audit, and verified are all enrolled in the course.","created_at":"2015-12-15T15:13:45Z","updated_at":"2015-12-16T20:22:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2232e357bebf3f690bd96d310b1740715f1f3f0c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-ora2/pulls/818/commits","review_comments_url":"https://api.github.com/repos/edx/edx-ora2/pulls/818/comments","review_comment_url":"https://api.github.com/repos/edx/edx-ora2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-ora2/issues/818/comments","statuses_url":"https://api.github.com/repos/edx/edx-ora2/statuses/983abc2adfa97f5e7b000b54f3462547e41c2a73","head":{"label":"edx:christina/full-grade","ref":"christina/full-grade","sha":"983abc2adfa97f5e7b000b54f3462547e41c2a73","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":15404425,"name":"edx-ora2","full_name":"edx/edx-ora2","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-ora2","description":"Open Response Assessment Suite","fork":false,"url":"https://api.github.com/repos/edx/edx-ora2","forks_url":"https://api.github.com/repos/edx/edx-ora2/forks","keys_url":"https://api.github.com/repos/edx/edx-ora2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-ora2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-ora2/teams","hooks_url":"https://api.github.com/repos/edx/edx-ora2/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-ora2/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-ora2/events","assignees_url":"https://api.github.com/repos/edx/edx-ora2/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-ora2/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-ora2/tags","blobs_url":"https://api.github.com/repos/edx/edx-ora2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-ora2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-ora2/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-ora2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-ora2/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-ora2/languages","stargazers_url":"https://api.github.com/repos/edx/edx-ora2/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-ora2/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-ora2/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-ora2/subscription","commits_url":"https://api.github.com/repos/edx/edx-ora2/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-ora2/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-ora2/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-ora2/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-ora2/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-ora2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-ora2/merges","archive_url":"https://api.github.com/repos/edx/edx-ora2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-ora2/downloads","issues_url":"https://api.github.com/repos/edx/edx-ora2/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-ora2/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-ora2/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-ora2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-ora2/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-ora2/releases{/id}","created_at":"2013-12-23T20:54:54Z","updated_at":"2015-11-28T04:15:12Z","pushed_at":"2015-12-16T20:19:53Z","git_url":"git://github.com/edx/edx-ora2.git","ssh_url":"git@github.com:edx/edx-ora2.git","clone_url":"https://github.com/edx/edx-ora2.git","svn_url":"https://github.com/edx/edx-ora2","homepage":"","size":103879,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":8,"forks":71,"open_issues":8,"watchers":29,"default_branch":"master"}},"base":{"label":"edx:ora-staff-grading","ref":"ora-staff-grading","sha":"5cae4ead48a3fe398504ddb6d8c42ee0e6c86d3b","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":15404425,"name":"edx-ora2","full_name":"edx/edx-ora2","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-ora2","description":"Open Response Assessment Suite","fork":false,"url":"https://api.github.com/repos/edx/edx-ora2","forks_url":"https://api.github.com/repos/edx/edx-ora2/forks","keys_url":"https://api.github.com/repos/edx/edx-ora2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-ora2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-ora2/teams","hooks_url":"https://api.github.com/repos/edx/edx-ora2/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-ora2/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-ora2/events","assignees_url":"https://api.github.com/repos/edx/edx-ora2/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-ora2/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-ora2/tags","blobs_url":"https://api.github.com/repos/edx/edx-ora2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-ora2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-ora2/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-ora2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-ora2/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-ora2/languages","stargazers_url":"https://api.github.com/repos/edx/edx-ora2/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-ora2/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-ora2/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-ora2/subscription","commits_url":"https://api.github.com/repos/edx/edx-ora2/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-ora2/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-ora2/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-ora2/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-ora2/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-ora2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-ora2/merges","archive_url":"https://api.github.com/repos/edx/edx-ora2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-ora2/downloads","issues_url":"https://api.github.com/repos/edx/edx-ora2/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-ora2/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-ora2/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-ora2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-ora2/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-ora2/releases{/id}","created_at":"2013-12-23T20:54:54Z","updated_at":"2015-11-28T04:15:12Z","pushed_at":"2015-12-16T20:19:53Z","git_url":"git://github.com/edx/edx-ora2.git","ssh_url":"git@github.com:edx/edx-ora2.git","clone_url":"https://github.com/edx/edx-ora2.git","svn_url":"https://github.com/edx/edx-ora2","homepage":"","size":103879,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":8,"forks":71,"open_issues":8,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/818"},"html":{"href":"https://github.com/edx/edx-ora2/pull/818"},"issue":{"href":"https://api.github.com/repos/edx/edx-ora2/issues/818"},"comments":{"href":"https://api.github.com/repos/edx/edx-ora2/issues/818/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/818/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/818/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-ora2/statuses/983abc2adfa97f5e7b000b54f3462547e41c2a73"}}}}