Video conference

Todo

Docstrings (module, models, utilities, plugins, exceptions)

Models

class indico.modules.vc.models.vc_rooms.VCRoom(**kwargs)

Bases: flask_sqlalchemy.Model

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

created_by_id

ID of the creator

created_by_user

The user who created the videoconference room

created_dt

Creation timestamp of the videoconference room

data

videoconference plugin-specific data

id

Videoconference room ID

locator
modified_dt

Modification timestamp of the videoconference room

name

Name of the videoconference room

plugin
status

Status of the videoconference room

type

Type of the videoconference room

class indico.modules.vc.models.vc_rooms.VCRoomEventAssociation(**kwargs)

Bases: flask_sqlalchemy.Model

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

contribution_id
data

videoconference plugin-specific data

delete(user, delete_all=False)

Deletes a VC room from an event

If the room is not used anywhere else, the room itself is also deleted.

Parameters:
  • user – the user performing the deletion
  • delete_all – if True, the room is detached from all events and deleted.
event_id

ID of the event

event_new

The associated Event

classmethod find_for_event(*args, **kwargs)

Returns a Query that retrieves the videoconference rooms for an event

Parameters:
  • event – an indico Event
  • only_linked_to_event – only retrieve the vc rooms linked to the whole event
  • kwargs – extra kwargs to pass to find()
classmethod get_linked_for_event(*args, **kwargs)

Get a dict mapping link objects to event vc rooms

id

Association ID

Type of the object the vc_room is linked to

linked_block

The linked session block (if the VC room is attached to a block)

linked_contrib

The linked contribution (if the VC room is attached to a contribution)

linked_event

The linked event (if the VC room is attached to the event itself)

linked_event_id
locator
session_block_id
show

If the vc room should be shown on the event page

vc_room

The associated :class:VCRoom

vc_room_id

ID of the videoconference room

class indico.modules.vc.models.vc_rooms.VCRoomLinkType

Bases: int, indico.util.struct.enum.IndicoEnum

block = 3
contribution = 2
event = 1
class indico.modules.vc.models.vc_rooms.VCRoomStatus

Bases: int, indico.util.struct.enum.IndicoEnum

created = 1
deleted = 2

Utilities

indico.modules.vc.util.find_event_vc_rooms(from_dt=None, to_dt=None, distinct=False)

Finds VC rooms matching certain criteria

Parameters:
  • from_dt – earliest event/contribution to include
  • to_dt – latest event/contribution to include
  • distinct – if True, never return the same (event, vcroom) more than once (even if it’s linked more than once to that event)
indico.modules.vc.util.get_linked_to_description(obj)
indico.modules.vc.util.get_managed_vc_plugins(user)

Returns the plugins the user can manage

indico.modules.vc.util.get_vc_plugins()

Returns a dict containing the available videoconference plugins.

indico.modules.vc.util.resolve_title(obj)

Plugins

class indico.modules.vc.plugins.VCPluginMixin

Bases: object

acl_settings = set([u'managers', u'acl'])
can_manage_vc(user)

Checks if a user has management rights on this VC system

can_manage_vc_room(user, room)

Checks if a user can manage a vc room

can_manage_vc_rooms(user, event)

Checks if a user can manage vc rooms on an event

category = u'Videoconference'
create_form(event, existing_vc_room=None, existing_event_vc_room=None)

Creates the videoconference room form

Parameters:
  • event – the event the videoconference room is for
  • existing_vc_room – a vc_room from which to retrieve data for the form
  • **kwargs – extra data to pass to the form if an existing vc room is passed
Returns:

an instance of an IndicoForm subclass

create_room(vc_room, event)
default_settings = {u'notification_emails': []}
friendly_name = None

the readable name of the VC plugin

get_notification_bcc_list(action, vc_room, event)
get_notification_cc_list(action, vc_room, event)
get_vc_room_attach_form_defaults(event)
get_vc_room_form_defaults(event)
icon_url
init()
logo_url
render_buttons(vc_room, event_vc_room, **kwargs)

Renders a list of plugin specific buttons (eg: Join URL, etc) in the management area

Parameters:
  • vc_room – the VC room object
  • event_vc_room – the association of an event and a VC room
  • kwargs – arguments passed to the template
render_event_buttons(vc_room, event_vc_room, **kwargs)

Renders a list of plugin specific buttons (eg: Join URL, etc) in the event page

Parameters:
  • vc_room – the VC room object
  • event_vc_room – the association of an event and a VC room
  • kwargs – arguments passed to the template
render_form(**kwargs)

Renders the videoconference room form :param kwargs: arguments passed to the template

render_info_box(vc_room, event_vc_room, event, **kwargs)

Renders the information shown in the expandable box of a VC room row :param vc_room: the VC room object :param event_vc_room: the association of an event and a VC room :param event: the event with the current VC room attached to it :param kwargs: arguments passed to the template

render_manage_event_info_box(vc_room, event_vc_room, event, **kwargs)

Renders the information shown in the expandable box on a VC room in the management area

Parameters:
  • vc_room – the VC room object
  • event_vc_room – the association of an event and a VC room
  • event – the event with the current VC room attached to it
  • kwargs – arguments passed to the template
service_name
settings_form

alias of VCPluginSettingsFormBase

strict_settings = True
update_data_association(event, vc_room, event_vc_room, data)
update_data_vc_room(vc_room, data)
vc_room_attach_form = None

the IndicoForm to use for the videoconference room attach form

vc_room_form = None

the IndicoForm to use for the videoconference room form

Exceptions

exception indico.modules.vc.exceptions.VCRoomError(message, field=None)

Bases: exceptions.Exception

exception indico.modules.vc.exceptions.VCRoomNotFoundError(message)

Bases: indico.modules.vc.exceptions.VCRoomError