Commit e21fabe4 by Jonathan Piacenti

Allow single question surveys (and single answer polls, for funzies)

parent ed6a2086
...@@ -159,9 +159,9 @@ class PollBase(XBlock, ResourceMixin, PublishEventMixin): ...@@ -159,9 +159,9 @@ class PollBase(XBlock, ResourceMixin, PublishEventMixin):
else: else:
items.append([key, label]) items.append([key, label])
if not len(items) > 1: if not items:
result['errors'].append( result['errors'].append(
"You must include at least two {0}s.".format(noun.lower())) "You must include at least one {0}.".format(noun.lower()))
result['success'] = False result['success'] = False
return items return items
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment