List of speakers - OpenSlides/OpenSlides GitHub Wiki

A list of speakers (LOS) can hold many speakers. A speaker is a model connecting a user with a list of speakers. Some times a "speaker" refers to the underlying user instead of the actual speaker model (depends on the context). E.g. when saying "The speaker needs some permission" the user is meant in contrast to "The speakers are ordered by weight" which refers to the speaker/weight field.

A list of speakers contains all speakers with list_of_speakers/speaker_ids. These speakers are divided into three groups:

  • waiting speakers: All speakers with begin_time and end_time set to null. These speakers are sorted with speaker/weight.
  • current speaker: A speaker with begin_time set to a timestamp and end_time begin null. There can be at most one current speaker.
  • finished speakers: All speakers with a timestamp in begin_time and end_time. They are sorted by their end time.

A list of speakers is not a stand-alone model. It always has a list_of_speakers/content_object and is auto created and deleted: If a valid content object (see valid collections) is created or deleted, the corresponding list of speakers is also created or deleted.

On creation, the value of meeting/list_of_speakers_initially_closed is used for list_of_speakers/closed.

Point of order

A speaker has a flag point_of_order if it is a point of order speaker (POOS). When creating a speaker, this flag can be given. It is only valid for self-additions, meaning the user given in user_id (see speaker.create) must be the request user. If this is not the case, an error will be returned.

If meeting/list_of_speakers_enable_point_of_order_speakers is false, a user cannot be a POOS.

If a user adds himself as a POOS, the user may not have list_of_speaker.can_be_speaker as well as it can be done on closed lists of speakers.

The POO-feature lets a user be twice in the list of waiting speakers: Once as a non-POOS and once as a POOS. So if a user creates a speaker as a POOS and the user is already on the waiting list as a POOS, the request is denied. This includes, that adding normal speakers it must be checked, if the user is already waiting with point_of_order=False.

2 sort algorithms for point-of-order-speakers

The standard algorithm inserts the new point-of-order speaker in front of the first waiting speaker not beeing a POO speaker. The second algorithm is used if meeting.list_of_speakers_enable_point_of_order_categories is set true and the weight calculation depends on the category of the PoOS.

Weight calculation standard

The new speaker must be sorted into the list of waiting speakers. If the first waiting speaker is not a POO speaker, the new speaker is inserted before the first speaker. Else, the new speaker is inserted before the first non-poo speaker. It follows, that if there is no first non-poo speaker, the new speaker will be the last one.

Example 1:

  • Speakers (id, weight, poo): (1, 1, n), (2, 2, y), (3, 3, n)
  • insert speaker with id 4 and poo=y
  • result: (4, 1, y), (1, 2, n), (2, 3, y), (3, 4, n)

Example 2:

  • Speakers (id, weight, poo): (1, 1, y), (2, 2, n),
  • insert speaker with id 3 and poo=y
  • result: (1, 1, y), (3, 2, y), (2, 3, n)

Note that the weight of all waiting speakers must be unique.

Weight calculation with point_of_order_category

This weight calculation will be used, if point_of_order_category_enabled is true for this meeting. In this case the point_of_order_category_id is required in the speaker. A new point-of-order speaker will be inserted after the first poo-speaker with a lower or equal point_of_order rank, beginning the search at the end of the waiting speakers. If there is no speaker with a lower or equal rank, the new speaker will be inserted at the first position.

Example:

  • waiting Speakers (id, weight, poo, rank): (1, 1, y, 2), (2, 2, y, 3), (3, 3, n, -), (4, 4, y, 5)
  • insert speaker with id 5 and poo=y with rank 3
  • result: (1, 1, y, 2), (2, 2, y, 3), (5, 3, y, 3), (3, 4, n, -), (4, 5, y, 5)

Steps to reproduce:

  1. Will not be inserted after speaker with id=4, because rank 3 of the new speaker is lower than the 5 of the speaker with id=4
  2. Will not be inserted after speaker with id=3, because this is not a point-of-order-speaker
  3. Will be inserted after speaker with id=2, because rank 3 from speaker/2 is lower or equal than the rank 3 of the new user
⚠️ **GitHub.com Fallback** ⚠️