Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
markkuriekkinen opened this issue Nov 30, 2022 · 0 comments
Labels
area: config Course configuration effort: hours The issue seems to be small and should be doable in hours or few days. experience: moderate required knowledge estimate status: requires a priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority) type: bug This is a bug which is critical for the correct operation of the system

Comments

@markkuriekkinen
Copy link
Contributor

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.

@markkuriekkinen markkuriekkinen added type: bug This is a bug which is critical for the correct operation of the system area: config Course configuration effort: hours The issue seems to be small and should be doable in hours or few days. experience: moderate required knowledge estimate status: requires a priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority) labels Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: config Course configuration effort: hours The issue seems to be small and should be doable in hours or few days. experience: moderate required knowledge estimate status: requires a priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority) type: bug This is a bug which is critical for the correct operation of the system
Projects
Status: Todo
Development

No branches or pull requests

1 participant