Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using scalelite for activity completion in moodle has issue with analytics-callback by not sendig infos back to moodle #1130

Open
mwuttke opened this issue Dec 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mwuttke
Copy link

mwuttke commented Dec 6, 2024

Describe the bug
An error occurred when trying to use Moodle's activity completion tracking during a BBB session. If you enter the Scalelite/Greenligt server and its secret (LOADBALANCER_SECRET) in the configuration settings for the BBB plugin of Moodle and not directly one BBB server and its secret, the activity completion tracking for the use of BBB does not work. The call_back does not return to the Moodle server. The analytics-callback only reaches the Scalelite server.
The same behaviour results if you enter the sercrets of the individual BBB servers (LOADBALANCER_SECRETS) of the cluster in the .env config file of the Scalelite server.

Deployment:

  1. Deployment: using docker-compose for Scalelite & greenlight setup
  2. Versions: Moodle 4.1.14, Scalelite 1.6.2 and BBB 2.7.15
  3. Tools used for reproducing the issue: docker logs scalelite-api | less

Steps to reproduce the behavior:

  1. Setup a moodle course with an BBB activity and set the activity completion as a teacher with at least one or two conditions (e.g. using the chat and stay in the room for one minute minimum).
  2. Go to the moodle course as a student and start a BBB session, write a chat message and stay in the room for one minute.
  3. Wait for the analytics-callback to see as a student the successful completion of the activity.
  4. See the error log of the scalelite-api docker:
I, [2024-12-06T09:15:45.705685 #38]  INFO -- : [71ba1eaf-50fe-4238-8ae6-40b20f16b179] Started POST "/bigbluebutton/api/analytics_callback" for 194.94.10.71 at 2024-12-06 09:15:45 +0000
I, [2024-12-06T09:15:45.707015 #38]  INFO -- : [71ba1eaf-50fe-4238-8ae6-40b20f16b179] Processing by BigBlueButtonApiController#analytics_callback as XML
I, [2024-12-06T09:15:45.707301 #38]  INFO -- : [71ba1eaf-50fe-4238-8ae6-40b20f16b179]   Parameters: {"version"=>"1.0", "meeting_id"=>"340ab5f40f7be106eaaae5a2c7368b137b76f0ba-122619-1078[0]", "internal_meeting_id"=>"76f9a5a9e315620bbe3fb6d0fe822f9d41bd6db3-1733476346890", "data"=>{"metadata"=>{"analytics_callback_url"=>"https://greenlight.mycompany.com/bigbluebutton/api/analytics_callback", "bbb_context"=>"Playground MW", "bbb_context_id"=>"122619", "bbb_context_label"=>"testkurs 0815", "bbb_context_name"=>"Playground MW", "bbb_meeting_size_hint"=>"2", "bbb_origin"=>"Moodle", "bbb_origin_server_common_name"=>"", "bbb_origin_server_name"=>"moodle.mycompany.com", "bbb_origin_tag"=>"moodle-mod_bigbluebuttonbn (2022112800)", "bbb_origin_version"=>"4.1.14 (Build: 20241007)", "bbb_recording_description"=>"", "bbb_recording_name"=>"Testmeeting 4", "bbb_recording_tags"=>"", "is_breakout"=>"false", "meeting_name"=>"Testmeeting 4"}, "duration"=>195, "start"=>"2024-12-06T10:12:26.000+01:00", "finish"=>"2024-12-06T10:15:41.000+01:00", "attendees"=>[{"ext_user_id"=>"20117", "name"=>"MW", "moderator"=>false, "joins"=>["2024-12-06T10:12:28.000+01:00"], "leaves"=>["2024-12-06T10:14:31.000+01:00"], "duration"=>123, "recent_talking_time"=>"", "engagement"=>{"chats"=>5, "talks"=>0, "raisehand"=>0, "emojis"=>0, "poll_votes"=>0, "talk_time"=>0}, "sessions"=>[{"joins"=>[{"timestamp"=>"2024-12-06T10:12:28.000+01:00", "userid"=>"w_c4wioeouimrq", "ext_userid"=>"20117", "event"=>"join", "remove"=>false}], "lefts"=>[{"timestamp"=>"2024-12-06T10:14:31.000+01:00", "userid"=>"w_c4wioeouimrq", "ext_userid"=>"20117", "event"=>"left", "remove"=>false}]}]}], "files"=>["default.pdf"], "polls"=>[]}, "bigbluebutton_api"=>{"version"=>"1.0", "meeting_id"=>"340ab5f40f7be106eaaae5a2c7368b137b76f0ba-122619-1078[0]", "internal_meeting_id"=>"76f9a5a9e315620bbe3fb6d0fe822f9d41bd6db3-1733476346890", "data"=>{"metadata"=>{"analytics_callback_url"=>"https://greenlight.mycompany.com/bigbluebutton/api/analytics_callback", "bbb_context"=>"Playground MW", "bbb_context_id"=>"122619", "bbb_context_label"=>"testkurs 0815", "bbb_context_name"=>"Playground MW", "bbb_meeting_size_hint"=>"2", "bbb_origin"=>"Moodle", "bbb_origin_server_common_name"=>"", "bbb_origin_server_name"=>"moodle.mycompany.com", "bbb_origin_tag"=>"moodle-mod_bigbluebuttonbn (2022112800)", "bbb_origin_version"=>"4.1.14 (Build: 20241007)", "bbb_recording_description"=>"", "bbb_recording_name"=>"Testmeeting 4", "bbb_recording_tags"=>"", "is_breakout"=>"false", "meeting_name"=>"Testmeeting 4"}, "duration"=>195, "start"=>"2024-12-06T10:12:26.000+01:00", "finish"=>"2024-12-06T10:15:41.000+01:00", "attendees"=>[{"ext_user_id"=>"20117", "name"=>"MW", "moderator"=>false, "joins"=>["2024-12-06T10:12:28.000+01:00"], "leaves"=>["2024-12-06T10:14:31.000+01:00"], "duration"=>123, "recent_talking_time"=>"", "engagement"=>{"chats"=>5, "talks"=>0, "raisehand"=>0, "emojis"=>0, "poll_votes"=>0, "talk_time"=>0}, "sessions"=>[{"joins"=>[{"timestamp"=>"2024-12-06T10:12:28.000+01:00", "userid"=>"w_c4wioeouimrq", "ext_userid"=>"20117", "event"=>"join", "remove"=>false}], "lefts"=>[{"timestamp"=>"2024-12-06T10:14:31.000+01:00", "userid"=>"w_c4wioeouimrq", "ext_userid"=>"20117", "event"=>"left", "remove"=>false}]}]}], "files"=>["default.pdf"], "polls"=>[]}}}
I, [2024-12-06T09:15:45.707876 #38]  INFO -- : [71ba1eaf-50fe-4238-8ae6-40b20f16b179] Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 138)

And see the post_events_analytics_callback.log from the BBB server:

tail -f -n 200 /var/log/bigbluebutton/post_events_analytics_callback.log 
I, [2024-12-06T10:15:45.645611 #1474816]  INFO -- : Analytics Post Events for [76f9a5a9e315620bbe3fb6d0fe822f9d41bd6db3-1733476346890] starts
I, [2024-12-06T10:15:45.646085 #1474816]  INFO -- : Processing events for analytics...
I, [2024-12-06T10:15:45.688889 #1474816]  INFO -- : {"version":"1.0","meeting_id":"340ab5f40f7be106eaaae5a2c7368b137b76f0ba-122619-1078[0]","internal_meeting_id":"76f9a5a9e315620bbe3fb6d0fe822f9d41bd6db3-1733476346890","data":{"metadata":{"analytics_callback_url":"https://bbb.mycompany.com/bigbluebutton/api/analytics_callback","bbb_context":"Playground MW","bbb_context_id":"122619","bbb_context_label":"testkurs 0815","bbb_context_name":"Playground MW","bbb_meeting_size_hint":"2","bbb_origin":"Moodle","bbb_origin_server_common_name":"","bbb_origin_server_name":"moodle.mycompany.com","bbb_origin_tag":"moodle-mod_bigbluebuttonbn (2022112800)","bbb_origin_version":"4.1.14 (Build: 20241007)","bbb_recording_description":"","bbb_recording_name":"Testmeeting 4","bbb_recording_tags":"","is_breakout":"false","meeting_name":"Testmeeting 4"},"duration":195,"start":"2024-12-06T10:12:26.000+01:00","finish":"2024-12-06T10:15:41.000+01:00","attendees":[{"ext_user_id":"20117","name":"MW","moderator":false,"joins":["2024-12-06T10:12:28.000+01:00"],"leaves":["2024-12-06T10:14:31.000+01:00"],"duration":123,"recent_talking_time":"","engagement":{"chats":5,"talks":0,"raisehand":0,"emojis":0,"poll_votes":0,"talk_time":0},"sessions":[{"joins":[{"timestamp":"2024-12-06T10:12:28.000+01:00","userid":"w_c4wioeouimrq","ext_userid":"20117","event":"join","remove":false}],"lefts":[{"timestamp":"2024-12-06T10:14:31.000+01:00","userid":"w_c4wioeouimrq","ext_userid":"20117","event":"left","remove":false}]}]}],"files":["default.pdf"],"polls":[]}}
I, [2024-12-06T10:15:45.708510 #1474816]  INFO -- : <?xml version="1.0"?>
<response>
  <returncode>FAILED</returncode>
  <messageKey>unsupportedContentType</messageKey>
  <message>POST request Content-Type is missing or unsupported</message>
</response>

I, [2024-12-06T10:15:45.708528 #1474816]  INFO -- : Success
I, [2024-12-06T10:15:45.708537 #1474816]  INFO -- : Analytics Post Events for [76f9a5a9e315620bbe3fb6d0fe822f9d41bd6db3-1733476346890] ends
I, [2024-12-06T11:02:19.932621 #1476056]  INFO -- : Analytics Post Events for [c77c372f95051cf79f7c4a2f6b20093fee6f2304-1733479308736] starts

Expected behavior
As with the direct use of a BBB server, the successful completion of the BBB activity should also be visible with a Scalelite server in the centre.

@mwuttke mwuttke added the bug Something isn't working label Dec 6, 2024
@mwuttke
Copy link
Author

mwuttke commented Dec 6, 2024

@Ithanil & @ffdixon please have a look at this issue if you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant