This application takes a list of Learn course_uuids, looks for any recordings in the last 24 hours, downloads them, uploads them to Panopto, and creates a link in the corresponding Learn course.
- You need Panopto user account who can create a video on Panopto system. If you don't have it, ask your organization's Panopto administrator.
- If you do not have Python 3 on your system, install the latest stable version from https://python.org
- Install external modules for this application.
pip install -r requirements.txt
- Sign in to Panopto web site
- Click your name in right-upper corner, and clikc "User Settings"
- Select "API Clients" tab
- Click "Create new API Client" button
- Enter arbitrary Client Name
- Select Server-side Web Application type.
- Enter
https://localhost
into CORS Origin URL. - Enter
http://localhost:9127/redirect
into Redirect URL. - The rest can be blank. Click "Create API Client" button.
- Note the created Client ID and Client Secret.
- Navigate to the target folder on Panopto web site
- Click gear icon at the top-right corner.
- Select Manage tab
- Find Folder ID and note it.
You should have this from your initial installation and configuration of your Collaborate Ultra integration in Learn. If not, please open a ticket with Blackboard Collaborate support and request them.
- Sign into https://developer.blackboard.com. If you do not have an account, create one.
- Click the + icon to create a new application.
- Enter a name, description, and for domain, your Learn domain without the protocol.
- Click 'Register your application and generate a key'.
- Save the application ID, key, and secret.
- Sign in as an administrator.
- Navigate to the System Admin panel.
- Click 'REST Integrations'
- Click 'Create Integration'
- Paste in the application ID (be sure you use the application ID and not the application Key)
- Assign a user with a role that includes the 'course.content.CREATE' entitlement.
- Click 'submit'
In the top-level of this project, there is a file called ConfigTemplate.py
. Copy this file to Config.py
. This is case-sensitive, so be sure to match this case exactly. In the file, you will see:
adict = {
"verify_certs" : "True",
"learn_rest_fqdn" : "learnServerUrl",
"learn_rest_key" : "learnRestKey",
"learn_rest_secret" : "learnRestSecret",
"ppto_server" : "panoptoServer",
"ppto_folder_id" : "panoptoFolderId",
"ppto_client_id" : "panoptoClientId",
"ppto_client_secret" : "panoptoClientSecret",
"ppto_username" : "panoptoUserName",
"ppto_password" : "panoptoPassword",
"collab_key": "collaborateLTIKeyFromLearnConfig",
"collab_secret": "collaborateLTISecretFromLearnConfig",
"collab_base_url": "us.bbcollab.com/collab/api/csa"
}
This is where we capture all of the information we have gathered this far:
- verify_certs: Leave this at True for production. Setting it to False will ignore SSL certificates
- learn_rest_fqdn: Set this value to the top-level domain of your learn server without the protocol, i.e
mylearn.blackboard.com
- learn_rest_key: Set this value to your REST key for Learn.Be sure to use the key and not the application ID
- learn_rest_secret: Set this value to your REST secret for Learn
- ppto_server: This is the URL to your Panopto Server, also without the protocol, i.e.
mypanopto.panapto.com
- ppto_folder_id: The folder ID that you wish to upload recordings. This initial script only supports a single folder
- ppto_client_id: The Panopto API client ID
- ppto_client_secret: The Panopto API client secret
- ppto_username: The Panopto username with appropriate permissions to upload videos to the folder. This user will be the owner and videographer
- ppto_password: The password for the Panopto username with appropriate permissions to upload videos to the folder
- collab_key: Your production LTI key for your Learn/Collaborate integration
- collab_secret: Your production LTI secret for your Learn/Collaborate integration
- collab_base_url: This is set to us.bbcollab.com by default. If you are in another region, be sure to change this to the appropriate value
Next, create a folder called downloads
at the root level of this project.
Edit Collab.py
and put the Course UUIDs you wish to process into the Python List called course_uuids
. Save the file and then from the commandline, execute python3 Collab.py
.
This is literally downloading the recording to a file and then uploading the file to Panopto, so it will take some time and require ample storage space. An hour long video with audio, video, and screen-sharing can be several hundred megabytes.
This sample application intentionally does not include error handling or retry logic in order to focus on the usage of API. As the best practice, you should have both proper error handling and reasonable retry logic in production code.
It is useful to capture the actual network traffic by the capture tool, like Fiddler on Windows and Charles on Mac, and examine it.
You should pass --skip-verify
option for that purpose, so that the appliation ignore SSL ceritificate replaced by such tool and continue to run.
UCS XML file may provide various additional metadata to construct a complicated Panopto video session. You may find the full spec as XSD file. You may modify upload_manifest_template.xml file in this example and experiment how it works.
- Panopto support document: How to Upload Files Using the API
- Panopto support document: Create OAuth2 Clients
- Universal Content Library specification: UCS XML definition and samples.
- Requests-OAuthlib: Python module to handle OAuth2 workflow on top of OAuthlib library
- Requests: HTTP library for Python