Module: ConferenceManager::Models::ConferenceManagerEvent::InstanceMethods

Defined in:
lib/conference_manager/models/conference_manager_event.rb

Instance Method Summary collapse

Instance Method Details

#cm_eventObject



133
134
135
136
137
138
139
140
141
142
# File 'lib/conference_manager/models/conference_manager_event.rb', line 133

def cm_event
  unless self.cm_event_id
    return nil
  end
  begin
    @cm_event ||= ConferenceManager::Event.find(self.cm_event_id)
  rescue
    nil
  end
end

#cm_event?Boolean

Returns:

  • (Boolean)


144
145
146
# File 'lib/conference_manager/models/conference_manager_event.rb', line 144

def cm_event?
  cm_event.present?
end

#cm_modeObject

The conference manager mode



111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/conference_manager/models/conference_manager_event.rb', line 111

def cm_mode
  case vc_mode_sym
  when :telemeeting
    'meeting'
  when :teleconference
    'conference'
  when :teleclass
    'class'
  else
  raise "Unknown Conference Manager mode: #{ vc_mode_sym }"
  end
end

#get_entry_being_recordedObject

method to ask the conference manager the id of the entry being recorded returns nil if nothing is being recorded



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/conference_manager/models/conference_manager_event.rb', line 229

def get_entry_being_recorded
  begin
    @event_status ||= ConferenceManager::EventStatus.find("event-status", :params => { :event_id => cm_event_id})
    unless @event_status.nil?
      if @event_status.attributes["recording_session"]
        ae = ::AgendaEntry.find_by_cm_session_id(@event_status.attributes["recording_session"])
        if ae.event == self
        return ae.id
        end
      end
    end
    return nil
  rescue
    nil
  end
end

#httplivestreaming_urlObject



160
161
162
# File 'lib/conference_manager/models/conference_manager_event.rb', line 160

def httplivestreaming_url
  cm_event.try(:httplivestreaming_url)
end

#isabel_urlObject



156
157
158
# File 'lib/conference_manager/models/conference_manager_event.rb', line 156

def isabel_url
  cm_event.try(:isabel_url)
end

#sip_urlObject



152
153
154
# File 'lib/conference_manager/models/conference_manager_event.rb', line 152

def sip_url
  cm_event.try(:sip_url)
end

#start!Object



219
220
221
222
223
224
225
# File 'lib/conference_manager/models/conference_manager_event.rb', line 219

def start!
  begin
    ConferenceManager::Start.create(:event_id => cm_event_id)
  rescue  StandardError => e
    errors.add_to_base(e.to_s)
  end
end

#uses_conference_manager?Boolean

Returns:

  • (Boolean)


124
125
126
127
128
129
130
131
# File 'lib/conference_manager/models/conference_manager_event.rb', line 124

def uses_conference_manager?
  case vc_mode_sym
  when :telemeeting, :teleconference, :teleclass
    true
  else
  false
  end
end

#web(username, width = '640', height = '480') ⇒ Object



183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/conference_manager/models/conference_manager_event.rb', line 183

def web(username, width = '640', height = '480')
  begin
    cm_web ||=
    ConferenceManager::Web.find(:web,
    :params => { :username => username,
      :width => width,
      :height => height,
      :event_id => cm_event_id })
    cm_web.html
  rescue
    nil
  end
end

#web_urlObject



148
149
150
# File 'lib/conference_manager/models/conference_manager_event.rb', line 148

def web_url
  cm_event.try(:web_url)
end

#webmapObject



208
209
210
211
212
213
214
215
216
217
# File 'lib/conference_manager/models/conference_manager_event.rb', line 208

def webmap
  begin
    cm_webmap ||=
    ConferenceManager::Webmap.find(:webmap,
    :params => { :event_id => cm_event_id })
    cm_webmap.html
  rescue
    nil
  end
end

#webstatsObject



197
198
199
200
201
202
203
204
205
206
# File 'lib/conference_manager/models/conference_manager_event.rb', line 197

def webstats
  begin
    cm_webstats ||=
    ConferenceManager::Webstats.find(:webstat,
    :params => { :event_id => cm_event_id })
    cm_webstats.html
  rescue
    nil
  end
end