From e841f29352536e290e7c02270b48d3027c818b47 Mon Sep 17 00:00:00 2001 From: Will Daly Date: Thu, 7 Mar 2013 10:17:03 -0500 Subject: [PATCH 1/2] Updated CSS and template for choicegroup response so that: a) checks/x marks appear after each option for radio buttons, b) checks/x marks appear for the entire problem (not individual options) for checkbox buttons. Also fixed issue with checks appearing on the next line by changing to display:inline instead of display:block --- .../lib/capa/capa/templates/choicegroup.html | 63 ++++++++++--------- .../lib/xmodule/xmodule/css/capa/display.scss | 11 +++- 2 files changed, 43 insertions(+), 31 deletions(-) diff --git a/common/lib/capa/capa/templates/choicegroup.html b/common/lib/capa/capa/templates/choicegroup.html index b9d8164321..68aa254ca1 100644 --- a/common/lib/capa/capa/templates/choicegroup.html +++ b/common/lib/capa/capa/templates/choicegroup.html @@ -1,37 +1,40 @@
- -
- % for choice_id, choice_description in choices: - +
- % endfor - -
+ % for choice_id, choice_description in choices: + + % endfor + +
diff --git a/common/lib/xmodule/xmodule/css/capa/display.scss b/common/lib/xmodule/xmodule/css/capa/display.scss index b705f5146e..8880722887 100644 --- a/common/lib/xmodule/xmodule/css/capa/display.scss +++ b/common/lib/xmodule/xmodule/css/capa/display.scss @@ -42,6 +42,14 @@ section.problem { label.choicegroup_correct{ &:after{ content: url('../images/correct-icon.png'); + margin-left:15px + } + } + + label.choicegroup_incorrect{ + &:after{ + content: url('../images/incorrect-icon.png'); + margin-left:15px; } } @@ -52,6 +60,7 @@ section.problem { .indicator_container { float: left; width: 25px; + height: 1px; margin-right: 15px; } @@ -69,7 +78,7 @@ section.problem { } text { - display: block; + display: inline; margin-left: 25px; } } From 8d83d2fb4efceb9f21f6adaae6e85b0ddae70be7 Mon Sep 17 00:00:00 2001 From: Will Daly Date: Thu, 7 Mar 2013 10:52:19 -0500 Subject: [PATCH 2/2] Added handling of condition when no multiple choice item selected, but the answer is incorrect. --- common/lib/capa/capa/templates/choicegroup.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/capa/capa/templates/choicegroup.html b/common/lib/capa/capa/templates/choicegroup.html index 68aa254ca1..8816933075 100644 --- a/common/lib/capa/capa/templates/choicegroup.html +++ b/common/lib/capa/capa/templates/choicegroup.html @@ -1,6 +1,6 @@
- % if input_type == 'checkbox': + % if input_type == 'checkbox' or not value: % if status == 'unsubmitted': % elif status == 'correct':