diff --git a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss index 7f52cd9623..be86757aee 100644 --- a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss +++ b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss @@ -67,6 +67,35 @@ section.combined-open-ended-status { font-size: 1em; padding-top: 10px; } + + span { + &.unanswered { + @include inline-block(); + background: url('../images/unanswered-icon.png') center center no-repeat; + height: 14px; + position: relative; + width: 14px; + float: right; + } + + &.correct { + @include inline-block(); + background: url('../images/correct-icon.png') center center no-repeat; + height: 20px; + position: relative; + width: 25px; + float: right; + } + + &.incorrect { + @include inline-block(); + background: url('../images/incorrect-icon.png') center center no-repeat; + height: 20px; + width: 20px; + position: relative; + float: right; + } + } } div.result-container { diff --git a/common/lib/xmodule/xmodule/openendedchild.py b/common/lib/xmodule/xmodule/openendedchild.py index 5fccdee4f6..5d69323e4a 100644 --- a/common/lib/xmodule/xmodule/openendedchild.py +++ b/common/lib/xmodule/xmodule/openendedchild.py @@ -258,9 +258,9 @@ class OpenEndedChild(): return correct def is_last_response_correct(self): - score=self.get_score() + score=self.get_score()['score'] correctness = 'correct' if self.is_submission_correct(score) else 'incorrect' - return + return correctness diff --git a/lms/templates/combined_open_ended_status.html b/lms/templates/combined_open_ended_status.html index a653a84d13..34a5dd0d79 100644 --- a/lms/templates/combined_open_ended_status.html +++ b/lms/templates/combined_open_ended_status.html @@ -8,15 +8,16 @@ %endif Step ${status['task_number']} (${status['human_state']}) : ${status['score']} / ${status['max_score']} - % if state == 'initial': - Unanswered - % elif state in ['done', 'post_assessment'] and correct == 'correct': - Correct - % elif state in ['done', 'post_assessment'] and correct == 'incorrect': - Incorrect - % elif state == 'assessing': - Submitted for grading + % if status['state'] == 'initial': + + % elif status['state'] in ['done', 'post_assessment'] and status['correct'] == 'correct': + + % elif status['state'] in ['done', 'post_assessment'] and status['correct'] == 'incorrect': + + % elif status['state'] == 'assessing': + % endif + %if status['type']=="openended" and status['state'] in ['done', 'post_assessment']: