BigBlueButton Activity Completion in Moodle

Jesus Federico
3 min readNov 24, 2020

One of the latest features available in the version 2.4 of the BigBlueButtonBN plugin for Moodle is the support for activity completion based on the feedback received from the BigBlueButton session.

There is no magic involved. Only the ability of these two applications to talk to each other through the plugin. But in order for this to be possible, there are some conditions to be meet.

  1. The first and most important is that BigBlueButton must be able to process events and send them back to a third-party application. This is a new feature that comes enabled by default in version 2.3, but it can also be added to a BigBlueButton server running on version 2.2.x.

From the BigBlueButton console, edit the bigbluebutton.properties file:

sudo vi /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties

Look up for the property keepEvents (or defaultKeepEvents in 2.4+) and change from false to true.

Restart the bbb-web component

systemctl restart bbb-web

Now for BigBlueButton 2.2 (only) comes the tricky part whcih is adding the script for performing the callback and its dependencies

Script

sudo mkdir /usr/local/bigbluebutton/core/scripts/post_eventscd /usr/local/bigbluebutton/core/scripts/post_eventssudo wget https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/develop/record-and-playback/core/scripts/post_events/post_events_analytics_callback.rbb

Dependencies

gem install bbbevents

That is all for the first step. With this, the BigBlueButton server will be enabled to process and store events once the live session has ended. Even if the meeting was not set to be recorded.

One thing to notice though is that because the script is tied to the recording processing system, the server must have recordings enabled.

2. The Moodle server must be able to receive callbacks from the BigBlueButton server. This means that if it is behind a firewall and inbound traffic is not allowed, it is not going to work.

The easiest way to test this is to perform a request to the Moodle server from the console.

curl https://yourmoodleserve.yourdomain.com

Note that the Web Server where Moodle is installed should be able to process headers `HTTP:Authorization`.

While this should normally not be a problem, at the time this article was written, it was reported that Apache by default did not pass the Authorization header through to FastCGI scripts. Also that various Apache modules (such as mod_proxy) strip the Authorization header, usually for “security reasons”.

In those cases it may be necessary to apply settings that are specific for the modules causing tyhe problem or workaround by adding rewritting rules to the same. That may be done at the Web server level, or for those without access to modify its configuration files, by adding those changes to .htaccess in the root directory of Moodle.

In Apache the rewriting rule would look like this:

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

Note that there are not known issues with Nginx and during the tests performed everything worked out of the box.

It is also known that some firewalls may remove that header for the same reasons. In these cases that rule should be modified and allow the Web Server itself to deal with the matter.

3. Finally, the plugin needs to have enabled the option Register live events. This can be done through the Plugin Settings in Moodle.

Now, in terms of how to use this new feature, it is really very simple.

When creating or editing the Activity in Moodle, there is a new option ‘Show activity as complete when conditions are met’. If selected a new group of settings will be displayed.

The basic completion is based on the time students spend in the live session, but it is also possible to make it based on participation.

If the conditions are meet, the completion is registered for the students.

The only detail to observe is that because the completion was done by a back end process instead of being done by the user, it is shown in a red square.

--

--

Jesus Federico

Senior Software Engineer & active polyglot coder. Passionate for making the applications that shape our world. Work @BlindsideNetwks @BigBlueButton