From 1d87dab3a77468c7221a880ec631610e32e748c4 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Tue, 4 Dec 2012 17:45:51 -0500 Subject: [PATCH 1/2] remove queueing spinner and polling logic, change message - no polling, since instructors may take a long time to grade --- common/lib/capa/capa/inputtypes.py | 7 ++++--- .../lib/capa/capa/templates/openendedinput.html | 5 +---- common/lib/xmodule/xmodule/css/capa/display.scss | 15 +++++---------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 70fe5dd6c8..73056bc09e 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -746,8 +746,9 @@ class OpenEndedInput(InputTypeBase): tags = ['openendedinput'] # pulled out for testing - submitted_msg = ("Submitted. As soon as your submission is" - " graded, this message will be replaced with the grader's feedback.") + submitted_msg = ("Feedback not yet available. Reload to check again. " + "Once the problem is graded, this message will be " + "replaced with the grader's feedback") @classmethod def get_attributes(cls): @@ -781,4 +782,4 @@ class OpenEndedInput(InputTypeBase): registry.register(OpenEndedInput) -#----------------------------------------------------------------------------- \ No newline at end of file +#----------------------------------------------------------------------------- diff --git a/common/lib/capa/capa/templates/openendedinput.html b/common/lib/capa/capa/templates/openendedinput.html index 697bff8082..8cc19a2705 100644 --- a/common/lib/capa/capa/templates/openendedinput.html +++ b/common/lib/capa/capa/templates/openendedinput.html @@ -13,15 +13,12 @@ % elif status == 'incorrect': Incorrect % elif status == 'queued': - Queued - + Submitted for grading % endif % if hidden:
% endif - -

${status}

diff --git a/common/lib/xmodule/xmodule/css/capa/display.scss b/common/lib/xmodule/xmodule/css/capa/display.scss index 58ba7b00ed..bbde1063ed 100644 --- a/common/lib/xmodule/xmodule/css/capa/display.scss +++ b/common/lib/xmodule/xmodule/css/capa/display.scss @@ -121,16 +121,6 @@ section.problem { } } - &.processing { - p.status { - @include inline-block(); - background: url('../images/spinner.gif') center center no-repeat; - height: 20px; - width: 20px; - text-indent: -9999px; - } - } - &.correct, &.ui-icon-check { p.status { @include inline-block(); @@ -266,6 +256,11 @@ section.problem { margin: -7px 7px 0 0; } + .grading { + text-indent: 0px; + margin: 0px 7px 0 0; + } + p { line-height: 20px; text-transform: capitalize; From 40f34d19a3c2591c0f923effb14c45cf2a1564cb Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Tue, 4 Dec 2012 17:46:34 -0500 Subject: [PATCH 2/2] add initial mock of get_problems call --- .../src/staff_grading/staff_grading.coffee | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lms/static/coffee/src/staff_grading/staff_grading.coffee b/lms/static/coffee/src/staff_grading/staff_grading.coffee index 161fb33b7c..bca577b0c6 100644 --- a/lms/static/coffee/src/staff_grading/staff_grading.coffee +++ b/lms/static/coffee/src/staff_grading/staff_grading.coffee @@ -18,6 +18,7 @@ class StaffGradingBackend mock: (cmd, data) -> # Return a mock response to cmd and data + # TODO: needs (optional?) arg for problem location if cmd == 'get_next' @mock_cnt++ response = @@ -26,12 +27,26 @@ class StaffGradingBackend rubric: 'A rubric! ' + @mock_cnt submission_id: @mock_cnt max_score: 2 + @mock_cnt % 3 - ml_error_info : 'ML error info!' + @mock_cnt + ml_error_info : 'ML accuracy info: ' + @mock_cnt else if cmd == 'save_grade' console.log("eval: #{data.score} pts, Feedback: #{data.feedback}") response = @mock('get_next', {}) + else if cmd == 'get_problems' + # this one didn't have a name in the LMS--lookup fail + p1 = {'location': 'i4x://MITx/3.091x/problem/open_ended_demo',\ + 'name': 'i4x://MITx/3.091x/problem/open_ended_demo',\ + 'num_graded': 10,\ + 'num_to_grade': 90} + + p2 = {'location': 'i4x://MITx/3.091x/problem/open_ended_demo2',\ + 'name': 'Open ended demo',\ + 'num_graded': 42,\ + 'num_to_grade': 63} + + response = + problems: [p1, p2] else response = success: false