bscli) at Radboud Universitybscli is a command line interface for Brightspace, developed at Radboud University (but not limited to it).
As the name suggests, it provides the ability to download assignment submissions via your command line (which is fast)
instead of using the web interface (which is slow).
Perhaps other administrative tasks may be implemented as well, in the future.
Additionally, bscli is able to (semi-)automate grading and distribution of homework assignments.
It is able to download submissions, process them and distribute them to graders.
These graders can then grade the assignments and upload their grades back to Brightspace.
For people familiar with it, bscli replaces the old bsscripts, which provided similar functionality.
To install bscli, you need to have Python 3.10 or higher installed on your system.
You can install bscli using pip:
We will not go into details about how to install Python, but you can find more information in the Python documentation or in various online tutorials.
You may want to use pyenv to manage different Python versions on your system, especially if you have multiple projects that require different Python versions.
You may also want to use a virtual environment, but you can also install it globally.
We will also not go into details about virtual environments here.
If you want to use bscli for automatically processing homework assignments, you also need to install some additional OS packages:
We will not go into details about how to install these, but you may want to use apt for Ubuntu or brew for macOS.
Before you can use bscli, you need to configure it with your Brightspace instance and FileSender credentials.
To use bscli, you need to configure it with API credentials specific to your Brightspace instance.
You should receive these credentials from your Brightspace administrator.
You can configure bscli by running the following command:
This will prompt you for the necessary credentials and save them in a configuration file on your system (by default in ~/.config/bscli/bsapi.json).
Below are the credentials to use with the Radboud University Brightspace instance.
If you want to use bscli for distributing homework assignments to graders, you also need to configure FileSender credentials.
FileSender is a service that allows you to send large files securely and bscli is able to upload files to FileSender directly.
To configure FileSender, you need to have an account on a FileSender service and obtain the API credentials.
You can configure bscli for FileSender by running the following command:
This will prompt you for the necessary credentials and save them in a configuration file (by default in ~/.config/bscli/filesender.json).
You can use the SURF FileSender instance and acquire the credentials via https://filesender.surf.nl/?s=user.
You need a username (which can be a random string), email address, and api key (also a long random string).
Most commands in bscli require authentication to access Brightspace on your behalf.
bscli will prompt you to authenticate when you run a command that requires it.
You can also authenticate manually by running the following command:
This will open a web browser where you can log in to Brightspace and authorize bscli to access your account.
If you have already authenticated, bscli will use the existing authentication token as long as it is valid.
This is typically a few hours, depending on your Brightspace instance configuration (this is not controlled by bscli).
bscli is an actual command line interface with subcommands, similar to git or docker.
For a list of available commands, you can run:
For example, to list all courses you have access to, you can run:
To list all assignments in a specific course, you can run:
or if you have a course.json file in your current directory (see below), you can simply run:
Then, to download all submissions for a specific assignment, you can run:
or if you have a course.json file in your current directory specifying the alias A01 for a specific assignment, you can run:
Most commands are related to a specific Brightspace course.
Though you can specify the course ID explicitly using the --course-id option, it is often more convenient to create a course.json file in your current directory (containing anything related for a specific course, such as aliases for assignments).
By default, bscli will look for a course.json file in the current directory and use it for all commands.
In this course.json file, you can specify the course ID and other course-specific grading settings for distributing assignments.
Typically, one grader coordinator creates this file for a course and shares it with whoever needs it.
You can create a course.json file by running:
This will prompt you for all kinds of course-specific settings and aliases and save them in a course.json
You can also edit the file manually.
The README of bscli contains more information about the format of this file and the available options.
If you want to distribute assignments to graders, you can use the bscli distribute command.
This command will:
Privacy Notice: For privacy, the submissions should be encrypted with a password before uploading to FileSender.
This password can be set in the course configuration file (course.json) for each assignment.
Graders will need to input this password to download the submissions from FileSender.
This password is not sent via email to the graders (SURF does not allow it), so it needs to be communicated separately (e.g. in person).
If you do not set a password, bscli will not encrypt the submissions and will upload them directly to FileSender.
Notice that this is not recommended!
If you want to upload feedback and grades back to Brightspace, you can use the bscli feedback upload command.
This command will look for a feedback.txt file in the current directory, parse its contents and upload the feedback and grades to Brightspace.
A template feedback.txt file will automatically be created when you run the bscli distribute command.