canvas_connect 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ class AdobeConnectConference < WebConference
22
22
  #
23
23
  # Returns a conference key string.
24
24
  def initiate_conference
25
- unless @conference_key.present?
25
+ unless conference_key.present?
26
26
  create_meeting unless meeting_exists?
27
27
  save
28
28
  end
@@ -51,14 +51,16 @@ class AdobeConnectConference < WebConference
51
51
  # Returns a meeting URL string.
52
52
  def admin_join_url(admin, _ = nil)
53
53
  user = add_host(admin)
54
- connect_settings = {
55
- :username => user.username,
56
- :password => user.password,
57
- :domain => CanvasConnect.config[:domain]
58
- }
59
- ac_service = AdobeConnect::Service.new(connect_settings)
60
- ac_service.log_in
61
- "#{meeting_url}?session=#{ac_session.session}"
54
+ settings = { :username => user.username, :password => user.password,
55
+ :domain => CanvasConnect.config[:domain] }
56
+
57
+ Rails.logger.info "USERNAME: #{user.username}"
58
+ Rails.logger.info "PASSWORD: #{user.password}"
59
+
60
+ service = AdobeConnect::Service.new(settings)
61
+ service.log_in
62
+
63
+ "#{meeting_url}?session=#{service.session}"
62
64
  end
63
65
 
64
66
  # Public: Add a participant to the conference and create a meeting URL.
@@ -82,12 +84,15 @@ class AdobeConnectConference < WebConference
82
84
  #
83
85
  # Returns an SCO-ID string.
84
86
  def find_conference_key
85
- unless @conference_key.present?
86
- response = connect_service.sco_by_url(:url_path => meeting_url_suffix)
87
- @conference_key = response.body.xpath('//sco[@sco-id]').attr('sco-id').value
87
+ unless conference_key.present?
88
+ self.conference_key = meeting_folder.
89
+ contents.
90
+ xpath("//sco[name=#{meeting_name.inspect}]").
91
+ attr('sco-id').
92
+ value
88
93
  end
89
94
 
90
- @conference_key
95
+ conference_key
91
96
  end
92
97
 
93
98
  # Internal: Register a participant as a host.
@@ -178,7 +183,6 @@ class AdobeConnectConference < WebConference
178
183
  end
179
184
 
180
185
  private
181
-
182
186
  # Internal: Create a unique meeting name from the course and conference IDs.
183
187
  #
184
188
  # Returns a meeting name string.
@@ -190,10 +194,13 @@ class AdobeConnectConference < WebConference
190
194
  else
191
195
  'Canvas'
192
196
  end
197
+
193
198
  "#{course_code}: #{self.title} [#{self.id}]"
194
199
  end
195
200
 
196
201
  # Internal: Generate the base URL for the meeting.
202
+ #
203
+ # Returns a meeting string.
197
204
  def generate_meeting_url
198
205
  "#{config[:domain]}/#{meeting_url_suffix}"
199
206
  end
@@ -18,6 +18,6 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = %w{app lib}
19
19
 
20
20
  gem.add_dependency 'rake', '>= 0.9.6'
21
- gem.add_dependency 'adobe_connect', '>= 0.0.6'
21
+ gem.add_dependency 'adobe_connect', '>= 0.0.7'
22
22
  end
23
23
 
@@ -1,3 +1,3 @@
1
1
  module CanvasConnect
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-13 00:00:00.000000000 Z
12
+ date: 2013-02-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: 0.0.6
37
+ version: 0.0.7
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: 0.0.6
45
+ version: 0.0.7
46
46
  description: Canvas Connect is an Adobe Connect plugin for the Instructure Canvas
47
47
  LMS. It allows teachers and administrators to create and launch Connect conferences
48
48
  directly from their courses.