bigbluebutton_rails 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +10 -1
  4. data/CHANGELOG.md +259 -0
  5. data/Gemfile +14 -19
  6. data/Gemfile.lock +194 -188
  7. data/README.md +416 -0
  8. data/Rakefile +12 -12
  9. data/TODO.md +13 -0
  10. data/app/controllers/bigbluebutton/playback_types_controller.rb +44 -0
  11. data/app/controllers/bigbluebutton/recordings_controller.rb +17 -10
  12. data/app/controllers/bigbluebutton/rooms_controller.rb +65 -36
  13. data/app/controllers/bigbluebutton/servers_controller.rb +12 -8
  14. data/app/models/bigbluebutton_metadata.rb +1 -1
  15. data/app/models/bigbluebutton_playback_format.rb +22 -1
  16. data/app/models/bigbluebutton_playback_type.rb +29 -0
  17. data/app/models/bigbluebutton_recording.rb +38 -19
  18. data/app/models/bigbluebutton_room.rb +150 -73
  19. data/app/models/bigbluebutton_room_options.rb +10 -7
  20. data/app/models/bigbluebutton_server.rb +69 -13
  21. data/app/models/bigbluebutton_server_config.rb +49 -0
  22. data/app/views/bigbluebutton/recordings/_form.html.erb +4 -0
  23. data/app/views/bigbluebutton/recordings/_recordings.html.erb +10 -3
  24. data/app/views/bigbluebutton/rooms/_form.html.erb +18 -6
  25. data/app/views/bigbluebutton/rooms/_rooms.html.erb +6 -3
  26. data/app/views/bigbluebutton/rooms/invite.html.erb +5 -5
  27. data/app/views/bigbluebutton/rooms/show.html.erb +18 -6
  28. data/app/views/bigbluebutton/servers/_form.html.erb +1 -1
  29. data/app/views/bigbluebutton/servers/show.html.erb +5 -0
  30. data/app/workers/bigbluebutton_finish_meetings.rb +11 -0
  31. data/app/workers/bigbluebutton_update_recordings.rb +11 -0
  32. data/app/workers/bigbluebutton_update_server_configs.rb +18 -0
  33. data/bigbluebutton_rails.gemspec +8 -7
  34. data/config/locales/en.yml +52 -7
  35. data/config/locales/pt-br.yml +162 -0
  36. data/config/resque/resque.rake +27 -0
  37. data/config/resque/workers_schedule.yml +17 -0
  38. data/lib/bigbluebutton_rails.rb +30 -2
  39. data/lib/bigbluebutton_rails/background_tasks.rb +31 -0
  40. data/lib/bigbluebutton_rails/controller_methods.rb +12 -8
  41. data/lib/bigbluebutton_rails/dial_number.rb +48 -0
  42. data/lib/bigbluebutton_rails/rails/routes.rb +9 -2
  43. data/lib/bigbluebutton_rails/utils.rb +9 -2
  44. data/lib/bigbluebutton_rails/version.rb +1 -1
  45. data/lib/generators/bigbluebutton_rails/install_generator.rb +0 -8
  46. data/lib/generators/bigbluebutton_rails/templates/migration.rb +28 -6
  47. data/lib/generators/bigbluebutton_rails/templates/migration_2_0_0.rb +56 -0
  48. data/lib/tasks/bigbluebutton_rails/meetings.rake +1 -13
  49. data/lib/tasks/bigbluebutton_rails/recordings.rake +1 -12
  50. data/lib/tasks/bigbluebutton_rails/server_configs.rake +10 -0
  51. data/spec/bigbluebutton_rails_spec.rb +0 -13
  52. data/spec/controllers/bigbluebutton/playback_types_controller_spec.rb +76 -0
  53. data/spec/controllers/bigbluebutton/recordings_controller_spec.rb +109 -37
  54. data/spec/controllers/bigbluebutton/rooms_controller_exception_handling_spec.rb +1 -0
  55. data/spec/controllers/bigbluebutton/rooms_controller_json_responses_spec.rb +27 -3
  56. data/spec/controllers/bigbluebutton/rooms_controller_spec.rb +338 -77
  57. data/spec/controllers/bigbluebutton/servers_controller_json_responses_spec.rb +8 -0
  58. data/spec/controllers/bigbluebutton/servers_controller_spec.rb +182 -47
  59. data/spec/factories/bigbluebutton_meeting.rb +2 -2
  60. data/spec/factories/bigbluebutton_playback_format.rb +2 -2
  61. data/spec/factories/bigbluebutton_playback_type.rb +7 -0
  62. data/spec/factories/bigbluebutton_recording.rb +8 -0
  63. data/spec/factories/bigbluebutton_room.rb +10 -3
  64. data/spec/factories/bigbluebutton_server.rb +6 -1
  65. data/spec/factories/bigbluebutton_server_config.rb +6 -0
  66. data/spec/generators/install_generator_spec.rb +0 -16
  67. data/spec/lib/bigbluebutton_rails/background_tasks_spec.rb +61 -0
  68. data/spec/lib/bigbluebutton_rails/dial_number_spec.rb +78 -0
  69. data/spec/lib/bigbluebutton_rails/utils_spec.rb +56 -0
  70. data/spec/lib/tasks/meetings_rake_spec.rb +14 -1
  71. data/spec/lib/tasks/recordings_rake_spec.rb +14 -1
  72. data/spec/models/bigbluebutton_meeting_db_spec.rb +3 -3
  73. data/spec/models/bigbluebutton_meeting_spec.rb +4 -4
  74. data/spec/models/bigbluebutton_playback_format_db_spec.rb +0 -1
  75. data/spec/models/bigbluebutton_playback_format_spec.rb +75 -4
  76. data/spec/models/bigbluebutton_playback_type_db_spec.rb +14 -0
  77. data/spec/models/bigbluebutton_playback_type_spec.rb +76 -0
  78. data/spec/models/bigbluebutton_recording_db_spec.rb +3 -1
  79. data/spec/models/bigbluebutton_recording_spec.rb +234 -58
  80. data/spec/models/bigbluebutton_room_db_spec.rb +8 -6
  81. data/spec/models/bigbluebutton_room_options_db_spec.rb +1 -0
  82. data/spec/models/bigbluebutton_room_options_spec.rb +137 -38
  83. data/spec/models/bigbluebutton_room_spec.rb +540 -153
  84. data/spec/models/bigbluebutton_server_config_spec.rb +115 -0
  85. data/spec/models/bigbluebutton_server_spec.rb +180 -23
  86. data/spec/rails_app/app/controllers/my_playback_types_controller.rb +7 -0
  87. data/spec/rails_app/app/views/frontpage/show.html.erb +1 -0
  88. data/spec/rails_app/app/views/my_playback_types/index.html.erb +33 -0
  89. data/spec/rails_app/config/application.rb +0 -3
  90. data/spec/rails_app/config/database.yml.travis +10 -0
  91. data/spec/rails_app/config/environments/development.rb +1 -6
  92. data/spec/rails_app/config/environments/production.rb +2 -0
  93. data/spec/rails_app/config/environments/test.rb +2 -0
  94. data/spec/rails_app/config/routes.rb +5 -2
  95. data/spec/rails_app/db/seeds.rb +1 -1
  96. data/spec/rails_app/features/config.yml.example +3 -4
  97. data/spec/rails_app/features/join_rooms.feature +14 -14
  98. data/spec/rails_app/features/step_definitions/activity_monitor_servers_step.rb +2 -2
  99. data/spec/rails_app/features/step_definitions/create_rooms_steps.rb +4 -4
  100. data/spec/rails_app/features/step_definitions/destroy_rooms_steps.rb +2 -2
  101. data/spec/rails_app/features/step_definitions/join_rooms_steps.rb +10 -10
  102. data/spec/rails_app/features/step_definitions/web_steps.rb +2 -2
  103. data/spec/rails_app/features/support/configurations.rb +1 -1
  104. data/spec/rails_app/features/support/templates.rb +12 -12
  105. data/spec/rails_app/lib/tasks/db/populate.rake +19 -6
  106. data/spec/routing/bigbluebutton/custom_controllers_routing_spec.rb +1 -1
  107. data/spec/routing/bigbluebutton/recordings_only_routing_spec.rb +2 -2
  108. data/spec/routing/bigbluebutton/recordings_routing_spec.rb +2 -2
  109. data/spec/routing/bigbluebutton/rooms_only_routing_spec.rb +1 -1
  110. data/spec/routing/bigbluebutton/rooms_routing_spec.rb +15 -1
  111. data/spec/routing/bigbluebutton/servers_only_routing_spec.rb +1 -1
  112. data/spec/routing/bigbluebutton/servers_routing_spec.rb +1 -1
  113. data/spec/spec_helper.rb +23 -31
  114. data/spec/support/matchers/delegate_matcher.rb +8 -1
  115. data/spec/support/matchers/shoulda/respond_with_json_matcher.rb +2 -2
  116. data/spec/support/mocked_server.rb +2 -0
  117. data/spec/support/shared_contexts/rake.rb +23 -0
  118. data/spec/workers/bigbluebutton_finish_meetings_spec.rb +14 -0
  119. data/spec/workers/bigbluebutton_update_recordings_spec.rb +14 -0
  120. data/spec/workers/bigbluebutton_update_server_configs_spec.rb +47 -0
  121. metadata +70 -59
  122. data/CHANGELOG.rdoc +0 -111
  123. data/README.rdoc +0 -319
  124. data/TODO.rdoc +0 -16
  125. data/config/schedule.rb +0 -7
@@ -6,10 +6,6 @@ class BigbluebuttonRoomOptions < ActiveRecord::Base
6
6
  belongs_to :room, :class_name => 'BigbluebuttonRoom'
7
7
  validates :room_id, :presence => true
8
8
 
9
- def get_available_layouts
10
- ["Default", "Video Chat", "Meeting", "Webinar", "Lecture assistant", "Lecture"]
11
- end
12
-
13
9
  # Sets the attributes from the model into the config.xml passed in the arguments.
14
10
  # If anything was modified in the XML, returns the new XML generated as string.
15
11
  # Otherwise returns false.
@@ -17,7 +13,7 @@ class BigbluebuttonRoomOptions < ActiveRecord::Base
17
13
  # xml (string):: The config.xml in which the attributes will be set
18
14
  def set_on_config_xml(xml)
19
15
  config_xml = BigBlueButton::BigBlueButtonConfigXml.new(xml)
20
- unless self.default_layout.blank?
16
+ if self.default_layout.present?
21
17
  config_xml.set_attribute("layout", "defaultLayout", self.default_layout, false)
22
18
  end
23
19
  unless self.presenter_share_only.nil?
@@ -30,6 +26,9 @@ class BigbluebuttonRoomOptions < ActiveRecord::Base
30
26
  unless self.auto_start_audio.nil?
31
27
  config_xml.set_attribute("PhoneModule", "autoJoin", self.auto_start_audio, true)
32
28
  end
29
+ if self.background.present?
30
+ config_xml.set_attribute("branding", "background", self.background, false)
31
+ end
33
32
  if config_xml.is_modified?
34
33
  config_xml.as_string
35
34
  else
@@ -39,8 +38,12 @@ class BigbluebuttonRoomOptions < ActiveRecord::Base
39
38
 
40
39
  # Returns true if any of the attributes was set. Is used to check whether the options
41
40
  # have to be sent to the server (setConfigXML) or not.
41
+ # Note: have to use ".nil?" for booleans, otherwise setting it to 'false' would be
42
+ # taken as not setting it.
42
43
  def is_modified?
43
- !self.default_layout.nil? || !self.presenter_share_only.nil? || !self.auto_start_audio.nil? ||
44
- !self.auto_start_video.nil?
44
+ booleans = [ :presenter_share_only, :auto_start_audio, :auto_start_video ]
45
+ others = [ :default_layout, :background ]
46
+ booleans.any? { |method| !self.send(method).nil? } ||
47
+ others.any? { |method| self.send(method).present? }
45
48
  end
46
49
  end
@@ -13,6 +13,16 @@ class BigbluebuttonServer < ActiveRecord::Base
13
13
  :foreign_key => 'server_id',
14
14
  :dependent => :nullify
15
15
 
16
+ has_one :config,
17
+ class_name: 'BigbluebuttonServerConfig',
18
+ foreign_key: 'server_id',
19
+ dependent: :destroy
20
+
21
+ delegate :update_config, to: :config
22
+ delegate :available_layouts, to: :config
23
+ delegate :available_layouts_names, to: :config
24
+ delegate :available_layouts_for_select, to: :config
25
+
16
26
  validates :name,
17
27
  :presence => true,
18
28
  :uniqueness => true,
@@ -22,14 +32,14 @@ class BigbluebuttonServer < ActiveRecord::Base
22
32
  :presence => true,
23
33
  :uniqueness => true,
24
34
  :length => { :maximum => 500 },
25
- :format => { :with => /http:\/\/.*\/bigbluebutton\/api/,
35
+ :format => { :with => /http[s]?:\/\/.*\/bigbluebutton\/api/,
26
36
  :message => I18n.t('bigbluebutton_rails.servers.errors.url_format') }
27
37
 
28
38
  validates :param,
29
39
  :presence => true,
30
40
  :uniqueness => true,
31
41
  :length => { :minimum => 3 },
32
- :format => { :with => /^[a-zA-Z\d_]+[a-zA-Z\d_-]*[a-zA-Z\d_]+$/,
42
+ :format => { :with => /\A[a-zA-Z\d_]+[a-zA-Z\d_-]*[a-zA-Z\d_]+\z/,
33
43
  :message => I18n.t('bigbluebutton_rails.servers.errors.param_format') }
34
44
 
35
45
  validates :salt,
@@ -37,8 +47,8 @@ class BigbluebuttonServer < ActiveRecord::Base
37
47
  :length => { :minimum => 1, :maximum => 500 }
38
48
 
39
49
  validates :version,
40
- :presence => true,
41
- :inclusion => { :in => ['0.7', '0.8'] }
50
+ :inclusion => { :in => ['0.8', '0.81', '0.9', '1.0'] },
51
+ :allow_blank => true
42
52
 
43
53
  # Array of <tt>BigbluebuttonMeeting</tt>
44
54
  attr_reader :meetings
@@ -46,14 +56,26 @@ class BigbluebuttonServer < ActiveRecord::Base
46
56
  after_initialize :init
47
57
  before_validation :set_param
48
58
 
59
+ after_create :create_config
60
+ after_create :update_config
61
+
62
+ before_save :check_for_version_update
63
+ after_update :check_for_config_update
64
+
65
+ # In case there's no config created yet, build one.
66
+ def config_with_initialize
67
+ config_without_initialize || build_config
68
+ end
69
+ alias_method_chain :config, :initialize
70
+
49
71
  # Returns the API object (<tt>BigBlueButton::BigBlueButtonAPI</tt> defined in
50
72
  # <tt>bigbluebutton-api-ruby</tt>) associated with this server.
51
73
  def api
52
- if @api.nil?
53
- @api = BigBlueButton::BigBlueButtonApi.new(self.url, self.salt,
54
- self.version.to_s, false)
55
- end
56
- @api
74
+ return @api if @api.present?
75
+
76
+ version = self.version
77
+ version = set_api_version_from_server if version.blank?
78
+ @api = BigBlueButton::BigBlueButtonApi.new(self.url, self.salt, version.to_s, false)
57
79
  end
58
80
 
59
81
  # Fetches the meetings currently created in the server (running or not).
@@ -72,11 +94,11 @@ class BigbluebuttonServer < ActiveRecord::Base
72
94
  # TODO: there might be more attributes returned by the API, review them all
73
95
  if room.nil?
74
96
  room = BigbluebuttonRoom.new(:server => self, :meetingid => attr[:meetingID],
75
- :name => attr[:meetingID], :attendee_password => attr[:attendeePW],
76
- :moderator_password => attr[:moderatorPW], :external => true, :private => true)
97
+ :name => attr[:meetingID], :attendee_api_password => attr[:attendeePW],
98
+ :moderator_api_password => attr[:moderatorPW], :external => true, :private => true)
77
99
  else
78
- room.update_attributes(:attendee_password => attr[:attendeePW],
79
- :moderator_password => attr[:moderatorPW])
100
+ room.update_attributes(:attendee_api_password => attr[:attendeePW],
101
+ :moderator_api_password => attr[:moderatorPW])
80
102
  end
81
103
  room.running = attr[:running]
82
104
  room.update_current_meeting
@@ -131,6 +153,20 @@ class BigbluebuttonServer < ActiveRecord::Base
131
153
  self.param
132
154
  end
133
155
 
156
+ def set_api_version_from_server
157
+ begin
158
+ # creating the object with version=nil makes the gem fetch the version from the server
159
+ api = BigBlueButton::BigBlueButtonApi.new(self.url, self.salt, nil, false)
160
+ self.version = api.version
161
+ rescue BigBlueButton::BigBlueButtonException
162
+ # we just ignore errors in case the server is not responding
163
+ # in these cases, the version will be fetched later on
164
+ Rails.logger.error "Could not fetch the API version from the server #{self.id}. The URL probably incorrect."
165
+ self.version = nil
166
+ end
167
+ self.version
168
+ end
169
+
134
170
  protected
135
171
 
136
172
  def init
@@ -145,4 +181,24 @@ class BigbluebuttonServer < ActiveRecord::Base
145
181
  end
146
182
  end
147
183
 
184
+ def create_config
185
+ BigbluebuttonServerConfig.create(server: self)
186
+ end
187
+
188
+ # Checks if we have to update the server version or not and do it if needed.
189
+ # If the user only changes the version, we assume he's trying to force an API version.
190
+ # If the user changes url/salt and the version, we also assume that he wants
191
+ # to force the API version
192
+ def check_for_version_update
193
+ if [:url, :salt, :version].any? { |k| self.changes.key?(k) }
194
+ self.set_api_version_from_server
195
+ end
196
+ end
197
+
198
+ def check_for_config_update
199
+ if [:url, :salt, :version].any?{ |k| self.changes.key?(k) }
200
+ self.update_config
201
+ end
202
+ end
203
+
148
204
  end
@@ -0,0 +1,49 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'bigbluebutton_api'
3
+
4
+ class BigbluebuttonServerConfig < ActiveRecord::Base
5
+ include ActiveModel::ForbiddenAttributesProtection
6
+
7
+ belongs_to :server, class_name: 'BigbluebuttonServer'
8
+ validates :server_id, presence: true
9
+
10
+ serialize :available_layouts, Array
11
+
12
+ # This is called when the config.xml is requested to update the info that is
13
+ # being stored locally. Currently the only info stored is about the available
14
+ # layouts. It is also called without the config_xml parameter when we are
15
+ # forcing the update (via Resque task for example).
16
+ def update_config(config_xml = nil)
17
+ begin
18
+ config_xml = self.server.api.get_default_config_xml if config_xml.nil?
19
+ layouts = self.server.api.get_available_layouts(config_xml)
20
+ self.update_attributes(available_layouts: layouts) unless layouts.nil?
21
+ rescue BigBlueButton::BigBlueButtonException
22
+ Rails.logger.error "Could not fetch configurations for the server #{self.server.id}. The URL probably incorrect."
23
+ end
24
+ end
25
+
26
+ def available_layouts_names
27
+ # Translate the keys that come from server.available_layouts.
28
+ # If it's not a valid key (e.g. it's already a name) keep it as it is.
29
+ available_layouts.map { |layout|
30
+ # Ignores everything up to the last point
31
+ # e.g. from 'bbb.layout.name.defaultlayout' to 'defaultlayout'
32
+ # e.g. from 'defaultlayout' to 'defaultlayout'
33
+ basename = layout.gsub(/(.*[.])?/, '')
34
+
35
+ # We parameterize the id since the value can be anything, possibly an invalid
36
+ # key for yml (e.g. "Reunião").
37
+ key = "bigbluebutton_rails.server_configs.layouts.#{basename.parameterize('_')}"
38
+
39
+ I18n.t(key, default: basename)
40
+ }
41
+ end
42
+
43
+ # Returns an array of arrays for showing layouts in a select.
44
+ # The first member of the internal array is the layout's name, the second is the
45
+ # layout's ID (the raw value used to set the layout in the webconf server).
46
+ def available_layouts_for_select
47
+ available_layouts_names.zip(available_layouts)
48
+ end
49
+ end
@@ -50,6 +50,10 @@
50
50
  <%= f.label :description %><br />
51
51
  <%= f.text_field :description %>
52
52
  </div>
53
+ <div class="field">
54
+ <%= f.label :size %><br />
55
+ <%= f.text_field :size %>
56
+ </div>
53
57
 
54
58
  <p>
55
59
  <b><%= BigbluebuttonRecording.human_attribute_name(:metadata) %>:</b>
@@ -1,6 +1,6 @@
1
1
  <div id="bbbrails_recordings_links">
2
2
  <%= link_to('View server list', bigbluebutton_servers_path) %><br/>
3
- <%= link_to('View room list', bigbluebutton_rooms_path) %>
3
+ <%= link_to('View room list', bigbluebutton_rooms_path) %><br/>
4
4
  </div>
5
5
 
6
6
  <ul id="bbbrails_list">
@@ -23,6 +23,7 @@
23
23
  <div class="field"><label><%= BigbluebuttonRecording.human_attribute_name(:start_time) %></label> <%= recording.start_time %></div>
24
24
  <div class="field"><label><%= BigbluebuttonRecording.human_attribute_name(:end_time) %></label> <%= recording.end_time %></div>
25
25
  <div class="field"><label><%= BigbluebuttonRecording.human_attribute_name(:description) %></label> <%= recording.description %></div>
26
+ <div class="field"><label><%= BigbluebuttonRecording.human_attribute_name(:size) %></label> <%= recording.size %></div>
26
27
  <div class="field">
27
28
  <label><%= BigbluebuttonRecording.human_attribute_name(:metadata) %></label>
28
29
  <div>
@@ -48,8 +49,14 @@
48
49
  </div>
49
50
  <div class="field"><label>Play</label>
50
51
  <%= link_to "default", play_bigbluebutton_recording_path(recording) %>
51
- <% recording.playback_formats.each do |format| %>
52
- <%= link_to format.format_type, play_bigbluebutton_recording_path(recording, :type => format.format_type) %>
52
+ |
53
+ <% recording.playback_formats.ordered.each do |format| %>
54
+ <%= link_to format.name, play_bigbluebutton_recording_path(recording, :type => format.playback_type.identifier), :title => format.description %>
55
+ <%= "(visible: #{format.visible})" %>
56
+ <% if format.default? %>
57
+ <%= "(duration: #{format.length} mins)" %>
58
+ <% end %>
59
+ |
53
60
  <% end %>
54
61
  </div>
55
62
  </li>
@@ -37,12 +37,12 @@
37
37
  <%= f.check_box :private %>
38
38
  </div>
39
39
  <div class="field">
40
- <%= f.label :attendee_password %><br />
41
- <%= f.text_field :attendee_password %>
40
+ <%= f.label :attendee_key %><br />
41
+ <%= f.text_field :attendee_key %>
42
42
  </div>
43
43
  <div class="field">
44
- <%= f.label :moderator_password %><br />
45
- <%= f.text_field :moderator_password %>
44
+ <%= f.label :moderator_key %><br />
45
+ <%= f.text_field :moderator_key %>
46
46
  </div>
47
47
  <div class="field">
48
48
  <%= f.label :welcome_msg %><br />
@@ -73,13 +73,25 @@
73
73
  <%= f.text_field :param %>
74
74
  </div>
75
75
  <div class="field">
76
- <%= f.label :record %><br />
77
- <%= f.check_box :record %>
76
+ <%= f.label :record_meeting %><br />
77
+ <%= f.check_box :record_meeting %>
78
78
  </div>
79
79
  <div class="field">
80
80
  <%= f.label :duration %><br />
81
81
  <%= f.text_field :duration %>
82
82
  </div>
83
+ <div class="field">
84
+ <%= f.label :moderator_only_message %><br />
85
+ <%= f.text_field :moderator_only_message %><br />
86
+ </div>
87
+ <div class="field">
88
+ <%= f.label :auto_start_recording %><br />
89
+ <%= f.check_box :auto_start_recording %><br />
90
+ </div>
91
+ <div class="field">
92
+ <%= f.label :allow_start_stop_recording %><br />
93
+ <%= f.check_box :allow_start_stop_recording %><br />
94
+ </div>
83
95
  <div class="field">
84
96
  <b>Metadata</b> (by default we have 10 metadata in this view, but it's not limited to it)<br />
85
97
  <%= f.fields_for :metadata do |metadata_form| %>
@@ -15,8 +15,8 @@
15
15
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:name) %></label> <%= room.name %></div>
16
16
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:meetingid) %></label> <%= room.meetingid %></div>
17
17
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:private) %></label> <%= room.private %></div>
18
- <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:attendee_password) %></label> <%= room.attendee_password %></div>
19
- <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:moderator_password) %></label> <%= room.moderator_password %></div>
18
+ <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:attendee_key) %></label> <%= room.attendee_key %></div>
19
+ <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:moderator_key) %></label> <%= room.moderator_key %></div>
20
20
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:welcome_msg) %></label> <%= room.welcome_msg %></div>
21
21
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:logout_url) %></label> <%= room.logout_url %></div>
22
22
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:dial_number) %></label> <%= room.dial_number %></div>
@@ -24,8 +24,11 @@
24
24
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:max_participants) %></label> <%= room.max_participants %></div>
25
25
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:external) %></label> <%= room.external %></div>
26
26
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:param) %></label> <%= room.param %></div>
27
- <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:record) %></label> <%= room.record %></div>
27
+ <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:record_meeting) %></label> <%= room.record_meeting %></div>
28
28
  <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:duration) %></label> <%= room.duration %></div>
29
+ <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:moderator_only_message) %></label> <%= room.moderator_only_message %></div>
30
+ <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:auto_start_recording) %></label> <%= room.auto_start_recording %></div>
31
+ <div class="field"><label><%= BigbluebuttonRoom.human_attribute_name(:allow_start_stop_recording) %></label> <%= room.allow_start_stop_recording %></div>
29
32
  <div class="field">
30
33
  <label><%= BigbluebuttonRoom.human_attribute_name(:metadata) %></label>
31
34
  <div>
@@ -43,7 +43,7 @@ $(document).ready(function(){
43
43
  <% end %>
44
44
  </div>
45
45
 
46
- <p><%= @room.name %> requires a name and/or password to join:</p>
46
+ <p><%= @room.name %> requires a name and/or key to join:</p>
47
47
  <%= form_tag join_bigbluebutton_room_path(@room, :mobile => params[:mobile]) do %>
48
48
 
49
49
  <div class="field">
@@ -55,13 +55,13 @@ $(document).ready(function(){
55
55
  <% end %>
56
56
  </div>
57
57
  <div class="field">
58
- <label for="user_password">Password:</label><br />
58
+ <label for="user_key">Key:</label><br />
59
59
  <% if @user_role == :attendee %>
60
- <%= password_field_tag "user[password]", @room.attendee_password, :readonly => true %>
60
+ <%= password_field_tag "user[key]", @room.attendee_key, :readonly => true %>
61
61
  <% elsif @user_role == :moderator %>
62
- <%= password_field_tag "user[password]", @room.moderator_password, :readonly => true %>
62
+ <%= password_field_tag "user[key]", @room.moderator_key, :readonly => true %>
63
63
  <% else %>
64
- <%= password_field_tag "user[password]", "" %>
64
+ <%= password_field_tag "user[key]", "" %>
65
65
  <% end %>
66
66
  </div>
67
67
 
@@ -21,12 +21,12 @@
21
21
  <%= @room.private %>
22
22
  </p>
23
23
  <p>
24
- <b><%= BigbluebuttonRoom.human_attribute_name(:attendee_password) %>:</b>
25
- <%= @room.attendee_password %>
24
+ <b><%= BigbluebuttonRoom.human_attribute_name(:attendee_key) %>:</b>
25
+ <%= @room.attendee_key %>
26
26
  </p>
27
27
  <p>
28
- <b><%= BigbluebuttonRoom.human_attribute_name(:moderator_password) %>:</b>
29
- <%= @room.moderator_password %>
28
+ <b><%= BigbluebuttonRoom.human_attribute_name(:moderator_key) %>:</b>
29
+ <%= @room.moderator_key %>
30
30
  </p>
31
31
  <p>
32
32
  <b><%= BigbluebuttonRoom.human_attribute_name(:welcome_msg) %>:</b>
@@ -57,13 +57,25 @@
57
57
  <%= @room.param %>
58
58
  </p>
59
59
  <p>
60
- <b><%= BigbluebuttonRoom.human_attribute_name(:record) %>:</b>
61
- <%= @room.record %>
60
+ <b><%= BigbluebuttonRoom.human_attribute_name(:record_meeting) %>:</b>
61
+ <%= @room.record_meeting %>
62
62
  </p>
63
63
  <p>
64
64
  <b><%= BigbluebuttonRoom.human_attribute_name(:duration) %>:</b>
65
65
  <%= @room.duration %>
66
66
  </p>
67
+ <p>
68
+ <b><%= BigbluebuttonRoom.human_attribute_name(:moderator_only_message) %>:</b>
69
+ <%= @room.moderator_only_message %>
70
+ </p>
71
+ <p>
72
+ <b><%= BigbluebuttonRoom.human_attribute_name(:auto_start_recording) %>:</b>
73
+ <%= @room.auto_start_recording %>
74
+ </p>
75
+ <p>
76
+ <b><%= BigbluebuttonRoom.human_attribute_name(:allow_start_stop_recording) %>:</b>
77
+ <%= @room.allow_start_stop_recording %>
78
+ </p>
67
79
  <p>
68
80
  <b><%= BigbluebuttonRoom.human_attribute_name(:metadata) %></b>
69
81
  <% @room.metadata.each do |metadata| %>
@@ -28,7 +28,7 @@
28
28
  </div>
29
29
  <div class="field">
30
30
  <%= f.label :version %><br />
31
- <%= f.text_field :version %>
31
+ <%= f.text_field :version, :disabled => true %>
32
32
  </div>
33
33
  <div class="field">
34
34
  <%= f.label :param %><br />
@@ -59,6 +59,11 @@
59
59
  <%= @server.param %>
60
60
  </p>
61
61
 
62
+ <p>
63
+ <b><%= BigbluebuttonServerConfig.human_attribute_name(:available_layouts) %></b>
64
+ <%= @server.config.available_layouts %>
65
+ </p>
66
+
62
67
  <p>
63
68
  <span>Access:</span>
64
69
  <%= link_to 'Edit', edit_bigbluebutton_server_path(@server) %> |
@@ -0,0 +1,11 @@
1
+ # A resque worker to check for meetings that already finished and mark
2
+ # them as finished.
3
+ # Same as "rake bigbluebutton_rails:meetings:finish".
4
+ class BigbluebuttonFinishMeetings
5
+ @queue = :bigbluebutton_rails
6
+
7
+ def self.perform
8
+ Rails.logger.info "BigbluebuttonFinishMeetings worker running"
9
+ BigbluebuttonRails::BackgroundTasks.finish_meetings
10
+ end
11
+ end