From d6e722a698211b2b87fd885a222198fa24a66afd Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 11 Apr 2013 09:33:23 -0400 Subject: [PATCH] Remove unnecessary check and add better textline documentation --- common/lib/capa/capa/inputtypes.py | 8 ++++++++ common/lib/capa/capa/templates/textline.html | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index b8af5a7286..cca195baac 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -457,8 +457,16 @@ class TextLine(InputTypeBase): """ A text line input. Can do math preview if "math"="1" is specified. + If "trailing_text" is set to a value, then the textline will be shown with the value after the text input. + This is useful if you would like to specify a specific type of units for the text input. + If the hidden attribute is specified, the textline is hidden and the input id is stored in a div with name equal to the value of the hidden attribute. This is used e.g. for embedding simulations turned into questions. + + Example: + + + This example will render out a text line with a math preview and the text 'm/s' after the end of the text line. """ template = "textline.html" diff --git a/common/lib/capa/capa/templates/textline.html b/common/lib/capa/capa/templates/textline.html index 9fd1bd8786..01cf4dc535 100644 --- a/common/lib/capa/capa/templates/textline.html +++ b/common/lib/capa/capa/templates/textline.html @@ -31,9 +31,7 @@ style="display:none;" % endif /> - % if trailing_text: ${trailing_text} - % endif

% if status == 'unsubmitted':