From 0757712e4b2555aac90f40ff0614031e69b389b1 Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Wed, 22 Aug 2012 23:11:51 -0700 Subject: [PATCH] Get rid of inline flag for choicegroup, radiogroup, and checkboxgroup. This should be done via CSS. This change only affects radiogroup and checkboxgroup as far as changing the behavior goes --- common/lib/capa/capa/inputtypes.py | 6 +++--- common/lib/capa/capa/templates/choicegroup.html | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index f19e7555a1..ad54736359 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -185,7 +185,7 @@ def choicegroup(element, value, status, render_template, msg=''): if choice.text is not None: ctext += choice.text # TODO: fix order? choices.append((choice.get("name"), ctext)) - context = {'id': eid, 'value': value, 'state': status, 'input_type': type, 'choices': choices, 'inline': True, 'name_array_suffix': ''} + context = {'id': eid, 'value': value, 'state': status, 'input_type': type, 'choices': choices, 'name_array_suffix': ''} html = render_template("choicegroup.html", context) return etree.XML(html) @@ -226,7 +226,7 @@ def radiogroup(element, value, status, render_template, msg=''): choices = extract_choices(element) - context = {'id': eid, 'value': value, 'state': status, 'input_type': 'radio', 'choices': choices, 'inline': False, 'name_array_suffix': '[]'} + context = {'id': eid, 'value': value, 'state': status, 'input_type': 'radio', 'choices': choices, 'name_array_suffix': '[]'} html = render_template("choicegroup.html", context) return etree.XML(html) @@ -244,7 +244,7 @@ def checkboxgroup(element, value, status, render_template, msg=''): choices = extract_choices(element) - context = {'id': eid, 'value': value, 'state': status, 'input_type': 'checkbox', 'choices': choices, 'inline': False, 'name_array_suffix': '[]'} + context = {'id': eid, 'value': value, 'state': status, 'input_type': 'checkbox', 'choices': choices, 'name_array_suffix': '[]'} html = render_template("choicegroup.html", context) return etree.XML(html) diff --git a/common/lib/capa/capa/templates/choicegroup.html b/common/lib/capa/capa/templates/choicegroup.html index 3beb45e073..2bed2d875e 100644 --- a/common/lib/capa/capa/templates/choicegroup.html +++ b/common/lib/capa/capa/templates/choicegroup.html @@ -6,9 +6,6 @@ checked="true" % endif /> ${choice_description} - % if not inline: -
- % endif % endfor