Esempio n. 1
0
def list_import(attendee_list, scenarios):
    for row in attendee_list:
        attendee = Attendee()
        attendee.event_id = os.environ['EVENT_ID']
        attendee.token = row['token']
        if row['id'] == '':
            attendee.user_id = row['name']
        else:
            attendee.user_id = row['id']

        attendee.role = "audience"

        bind_scenario(row, attendee, scenarios)
Esempio n. 2
0
def list_import(attendee_list, scenarios):
    for row in attendee_list:
        attendee = Attendee()
        attendee.event_id = os.environ['EVENT_ID']
        attendee.token = row['token']
        if row['id'] == '':
            attendee.user_id = row['name']
        else:
            attendee.user_id = row['id']

        attendee.type = "audience"

        bind_scenario(row, attendee, scenarios)
Esempio n. 3
0
def staff_import(attendee_list, scenarios):
    for row in attendee_list:
        attendee = Attendee()
        attendee.event_id = os.environ['EVENT_ID']
        attendee.token = row['username']
        attendee.user_id = row['display_name']
        teams = row['groups'].split(',')

        try:
            teams.remove('工作人員')
            teams.remove('組長')
            teams.remove('股長')
        except ValueError:
            pass

        attendee.role = "speaker" if "講者" in teams else "staff"

        attendee.attr['teams'] = teams
        attendee.attr['title'] = row['title']

        bind_scenario(row, attendee, scenarios)
Esempio n. 4
0
def staff_import(attendee_list, scenarios):
    for row in attendee_list:
        attendee = Attendee()
        attendee.event_id = os.environ['EVENT_ID']
        attendee.token = row['username']
        attendee.user_id = row['display_name']
        teams = row['groups'].split(',')

        try:
            teams.remove('工作人員')
            teams.remove('組長')
            teams.remove('股長')
        except ValueError:
            pass

        attendee.type = "speaker" if "講者" in teams else "staff"

        attendee.attr['teams'] = teams
        attendee.attr['title'] = row['title']

        bind_scenario(row, attendee, scenarios)