> ## Documentation Index
> Fetch the complete documentation index at: https://bigbluebutton.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration for Moodle

> Setting up BN Analytics with Moodle LMS

Today, with Moodle 4.1+, an educator can specify activity completion conditions for each BigBlueButton Activity.

The BigBlueButton plugin for Moodle has built-in Activity Completion that can mark the activity as completed when certain thresholds are reached.

For example, in the screen shot below, the educator has indicated to Moodle (specifically to the BigBlueButton activity in Moodle) to mark the activity as completed when both of these conditions are met:

1. The student has been present for more than 90 minutes in a class, and
2. Has raised their hand at least once.

<img src="https://mintcdn.com/testcompany-0e915c76/CTWBM_qaLBzerzCL/images/analytics/image_006.png?fit=max&auto=format&n=CTWBM_qaLBzerzCL&q=85&s=87c3721fcbbb0693da2244671a63ebc1" alt="Setting Completion conditions in Moodle" width="1552" height="768" data-path="images/analytics/image_006.png" />

## How Activity Completion Works

With activity completion enabled, after each BigBlueButton session concludes, the BigBlueButton server will aggregate all the events for the user and send them back to Moodle.

<img src="https://mintcdn.com/testcompany-0e915c76/CTWBM_qaLBzerzCL/images/analytics/image_007.png?fit=max&auto=format&n=CTWBM_qaLBzerzCL&q=85&s=27b4b6fa35b9fe8b8806b3d08383b242" alt="Analytics Callback to Moodle" width="1148" height="1550" data-path="images/analytics/image_007.png" />

In Blindside Networks's hosting for BigBlueButton, you can install a new plugin **BN Reports** that will capture this data and populate Moodle's database.

BN Reports will intercept the Analytics Callback and populate Moodle's database tables with this data.

<img src="https://mintcdn.com/testcompany-0e915c76/CTWBM_qaLBzerzCL/images/analytics/image_008.png?fit=max&auto=format&n=CTWBM_qaLBzerzCL&q=85&s=edde7d5b8a7d6373c2c542c323291bd9" alt="BN Reports intercepting the Analytics Callback and writing to Moodle's database tables" width="2048" height="1229" data-path="images/analytics/image_008.png" />

<img src="https://mintcdn.com/testcompany-0e915c76/CTWBM_qaLBzerzCL/images/analytics/image_009.png?fit=max&auto=format&n=CTWBM_qaLBzerzCL&q=85&s=bd0ca9bd230ca8799e4ec336447c69bb" alt="BN Reports sub-plugin populating Moodle's database" width="1910" height="1506" data-path="images/analytics/image_009.png" />

To see details of what data is returned, see [BN Hosting Analytics Callback](https://docs.google.com/document/d/1m2Edk1bwDkvqGUbrgS84hE6PF72ywEW0ffZTux9QAPw/edit?usp=sharing).

With this unified data, Moodle Administrator and educators can now create reports that link together student's activities across Moodle and BigBlueButton.

An example of such a report would be an Attendance Report.

<img src="https://mintcdn.com/testcompany-0e915c76/CTWBM_qaLBzerzCL/images/analytics/image_010.png?fit=max&auto=format&n=CTWBM_qaLBzerzCL&q=85&s=a3735891a6a97a655986363950a59e24" alt="Unified report showing each user's attendance along with Elapsed time in session" width="2048" height="1057" data-path="images/analytics/image_010.png" />

## BN Analytics in BigBlueButton (Moodle)

As shown above, the BN Analytics in Moodle can display:

1. Absentee students
2. LMS Analytics on individual students
3. LMS Alerts on individual students

When the BigBlueButton session starts, if your account is configured to have the LMS plugin, it will make a callback to the LMS, or to an endpoint that proxies the LMS, to retrieve the roster, student analytics, and student alerts.

<img src="https://mintcdn.com/testcompany-0e915c76/G7bHBSBcgWk6s-4M/images/analytics/image_011.png?fit=max&auto=format&n=G7bHBSBcgWk6s-4M&q=85&s=4bac9325660ae48e6fef4489c848dc7e" alt="BigBlueButton session start callback to the LMS retrieving roster, student analytics, and alerts" width="1834" height="1510" data-path="images/analytics/image_011.png" />
