I am new to open edx and I am trying to create an Xblock for Vimeo Video. I could have used the xblock that was already available. But my company wants an XBlock that was available only to the firm.
I created an XBlock that uploads and displays the Vimeo Video. I am trying to get the XBlock to send the viewed duration of a video by a student. I used the player.on(‘timeupdate’) event to capture the data.
But I cant figure out how to store the data in my SQL database. I have the basic idea where I have create an API function which will send the data to a different app and it will be store by the models.py in that app.
I tried to understand how API works in XBlock, but I couldnt understand how to do it. Can someone please help how to successfully send data from the XBlock to the database. Any pointers are welcome.
Thanks in advance.