Cloud check actions
If the code action or unit test action does not give you enough possibilities to analyse the answers of the student you can use Cloud Check, which is a very powerful mechanism to run complicated actions in the cloud based on a student's answer, without needing your own servers. Cloud Check can for example be used to run advanced unit tests for programming questions, but you can use it for a much wider range of tasks, such as your own analytics, plagiarism detection, and so on. To start using Cloud Check, add an action to the feedback and choose Cloud Check. In the Cloud Check action block and enter a Git repository. If you click the Show more button you can also specify a branch (default master if left empty) and a path (default the root folder of the git repository directory).
Whenever a student requests feedback from an exercise that has a Cloud Check action, the Git repository will be cloned, and our server will try to run two scripts that should be placed in the specified path (or the root folder if no path was specified):
- install.sh: this script should install any dependencies that you need or do other preparatory work. The install script does not have access to any data specific to the student feedback request.
- run.sh: this script will be run when a student presses the get feedback button. Before the script is run, the system will place the data of the qf object in a file called qf.json at the same location as the run.sh script. Also, all properties of the qf object are available in the script as environment variables.
While running the run.sh script, you may read from and write data to the qf.json file. Once the script is completed, the final data contained in the qf.json file will be returned as the result of the request.
For a few examples of using Cloud Check to perform unit tests with a variety of programming languages, see the sample Git repository.
Currently, there are a few limitations to Cloud Check:
- The install and run scripts are executed in a server sandbox with limited accessibility, but you have quite some freedom within the folder containing your Git repository files.
- A Cloud Check request should send a result within 30 seconds, otherwise the request will be cancelled.
- The request is run within a server environment that has a few tools installed for you. For the complete list of these tools, see the end of this article.
- Cloud Check may only be used for purposes directly related to providing feedback to students. Abuse of the Cloud Check feature for other purposes such as cryptocurrency mining or illegal file hosting will result in the immediate lockdown of your account without warning.
- In the near future, Cloud Check will have a caching feature so that cloning the Git repository and running the install script will happen only when needed.
- For Python: Python 3.8.1 and Pip
- For Java: JDK8, Maven, Gradle
- For C#: .NET SDK 3
- For C/C++: CMake, GNU C compiler >= 4.8.3