Skip to content

Student Handbook

Mihai Baruta edited this page Nov 25, 2022 · 7 revisions

1. Repository structure

├── checker/
│   ├── checker.sh
│   ├── input/
│   │   ├── test0
│   └── output/
│       ├── test0.ref
├── Dockerfile
├── local.sh
└── src/
    └── skel.c

A typical assignment will have the above structure with the following files and folders of interest to students:

  • src/ - Here the student will develop his/hers solution according to the assignment's specification
  • local.sh - A utility script used to check the assignment locally. It simulates a Gitlab pipeline

2. Local testing

Prerequisites: Docker installed on the system and available to the user.

Simply run ./local.sh checker. It will build a local image that will run the checker in an environment similar to a Gitlab pipeline.

3. Develop through Gitlab

Developing through Gitlab is the recommended way as you will have the opportunity to learn about version control systems, such as git, and have a continuous integration pipeline at your disposal. Here is a getting started tutorial on the basics of git.

3.1. Checking the CI

After each git commit a pipeline, with a single job, will be scheduled. It will run the checker using the latest version of your homework.

You can find the current and historical pipeline runs under your project’s CI/CD → Pipelines page. More on Gitlab's pipelines here.

To check the output of the checker, from the Pipelines page select the desired pipeline id.

pipelines

Next, click on Jobs and select the first job ID.

jobs

3.2. Submitting an assignment

To submit an assignment that was solved using Gitlab you will require an access token, the branch name from where you want to retrieve your sources and the project ID of your repository.

NOTE: The access scopes for the token are: api and read_api.

NOTE: Make sure to store the access token after creating it. Once the page is closed you will not be able to retrieve the token.

access_token

Finally, go to the course's page on Moodle and fill in the VMChecker block's form, for your assignment, with the access token and project id then click submit. After a short time, your assignment will have the checker output and an archive with the files found in the /src folder of your repository.

student_fillin

3.3. Find the project ID

  1. Go to your project page
  2. The ID is found under the project name

project_id

Finally, go to your course on Moodle, fill in the token and the project ID, and click Submit. Moodle will archive all the files found in your src/ directory, run them through the Gitlab pipeline and then grade your assignment. The checker output will be added as teacher feedback.

NOTE: Do NOT create a merge request from your fork with your solution.

4. Develop locally

Archive all the files found in your src/ directory and upload them to the correct assignment on Moodle. After the submission is checked, the checker output will be added as teacher feedback