Skip to content

Length option in freetext questions (in questionnaires) does not affect anything #153

@markkuriekkinen

Description

@markkuriekkinen

The length option has been available for freetext questions for a very long time, but it actually does not do anything. There is code that tries to use them, but it looks like the intended HTML attributes are not saved to the exercise yaml file. Since the yaml file does not contain anything about the length, of course the MOOC-Grader can not render any HTML for the corresponding HTML size attribute.

if self.height > 1:
attrs = {
'rows': self.height,
'class': self.position,
}
if self.length:
attrs['cols'] = self.length
element = aplus_nodes.html('textarea', attrs)
else:
attrs = {
'type': 'text',
'class': self.position,
}
if self.length:
attrs['size'] = self.length
element = aplus_nodes.html('input', attrs)

The node constructor:
def __init__(self, tagname, attributes={}, no_write=False, skip_html=False, *children, **other_attributes):

MOOC-Grader renders questionnaires here:

The Aplus manual includes instructions for using length even though it does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: configCourse configurationeffort: hoursThe issue seems to be small and should be doable in hours or few days.experience: moderaterequired knowledge estimatestatus: requires a priorityCurrently using this label to flag issues that need EDIT decision ASAP (even if there was priority)type: bugThis is a bug which is critical for the correct operation of the system

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions