Class: AdobeConnectConference

Inherits:
WebConference
  • Object
show all
Defined in:
app/models/adobe_connect_conference.rb

Constant Summary collapse

MAX_NAME_LENGTH =
60

Instance Method Summary collapse

Instance Method Details

#admin_join_url(admin, _ = nil) ⇒ Object

Public: Add an admin to the conference and create a meeting URL (required by WebConference).

admin - The user to add to the conference as an admin. _ - Included for compatibility w/ web_conference.rb

Returns a meeting URL string.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'app/models/adobe_connect_conference.rb', line 54

def admin_join_url(admin, _ = nil)
  user = add_host(admin)

  if config[:use_sis_ids] == "no"
    settings = { :username => user.username, :password => user.password,
      :domain => CanvasConnect.config[:domain] }

    service = AdobeConnect::Service.new(settings)
    service.

    "#{meeting_url}?session=#{service.session}"
  else
    meeting_url
  end
end

#conference_statusObject

Public: Determine the status of the conference (required by WebConference).

Returns conference status as a symbol (either :active or :closed).



40
41
42
43
44
45
46
# File 'app/models/adobe_connect_conference.rb', line 40

def conference_status
  if meeting_exists?
    :active
  else
    :closed
  end
end

#initiate_conferenceObject

Public: Start a new conference and return its key. (required by WebConference)

Returns a conference key string.



28
29
30
31
32
33
34
35
# File 'app/models/adobe_connect_conference.rb', line 28

def initiate_conference
  unless conference_key.present?
    create_meeting unless meeting_exists?
    save
  end

  find_conference_key
end

#participant_join_url(user, _ = nil) ⇒ Object

Public: Add a participant to the conference and create a meeting URL.

Make the user a conference admin if they have permissions to create
a conference (required by WebConference).

user - The user to add to the conference as an admin. _ - Included for compatibility w/ web_conference.rb

Returns a meeting URL string.



78
79
80
81
82
83
84
85
86
# File 'app/models/adobe_connect_conference.rb', line 78

def participant_join_url(user, _ = nil)
  if grants_right?(user, nil, :initiate)
    admin_join_url(user)
  elsif config[:use_sis_ids] == "no"
    "#{meeting_url}?guestName=#{URI.escape(user.name)}"
  else
    meeting_url
  end
end

#recordingsObject

Public: List all of the recordings for a meeting

Returns an Array of MeetingArchive, or an empty Array if there are no recordings



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'app/models/adobe_connect_conference.rb', line 91

def recordings
  if key = find_conference_key
    recordings = CanvasConnect::MeetingArchive.retrieve(key)
    recordings.each { |r| make_meeting_public(r.id) }
    recordings.map do |recording|
      {
        recording_id: recording.id,
        duration_minutes: recording.duration.to_i,
        title: recording.name,
        updated_at: recording.date_modified,
        created_at: recording.date_created,
        playback_url: "#{config[:domain]}#{recording.url_path}",
      }
    end
  else
    []
  end
end