Removed old poll code snippets. Fixed #3179.

This commit is contained in:
Norman Jäckel 2017-05-22 15:51:16 +02:00
parent ed0b1cef54
commit f4c30da4a2
2 changed files with 0 additions and 36 deletions

View File

@ -432,10 +432,6 @@ class AssignmentPoll(RESTModelMixin, CollectDefaultVotesMixin,
def get_percent_base_choice(self):
return config['assignments_poll_100_percent_base']
def append_pollform_fields(self, fields):
fields.append('description')
super().append_pollform_fields(fields)
def get_slide_context(self, **context):
return super().get_slide_context(poll=self)

View File

@ -78,12 +78,6 @@ class CollectDefaultVotesMixin(models.Model):
class Meta:
abstract = True
def append_pollform_fields(self, fields):
fields.append('votesvalid')
fields.append('votesinvalid')
fields.append('votescast')
super(CollectDefaultVotesMixin, self).append_pollform_fields(fields)
def get_percent_base_choice(self):
"""
Returns one of the strings of the percent base.
@ -189,32 +183,6 @@ class BasePoll(models.Model):
values.append(vote)
return values
def get_vote_form(self, **kwargs):
"""
Returns the form for one option of the poll.
"""
from openslides.poll.forms import OptionForm
return OptionForm(extra=self.get_vote_objects_with_values(kwargs['formid']),
**kwargs)
def get_vote_forms(self, **kwargs):
"""
Returns a list of forms for the poll.
"""
forms = []
for option in self.get_options():
form = self.get_vote_form(formid=option.id, **kwargs)
form.option = option
forms.append(form)
return forms
def append_pollform_fields(self, fields):
"""
Appends additional field to a given list of fields. By default it
appends nothing.
"""
pass
def print_value(value, percent_base=0):
"""