Go to navigation

Homework Assignments

Throughout the semester, students are expected to complete homework assignments and submit them to their instructor for review. The assignment specification is the same for all students in the course or tutorial group. The instructor may provide feedback on submitted solutions (code review), discuss the solution with the student, request corrections, and iterate further on the submission.

Preparation

Create a project for homework assignments in your course group (e.g., MI-XYZ), such as homeworks or assignments. Prepare the individual assignments there (e.g., assignment text, solution skeleton, tests, etc.), each in a separate directory.

Example Configuration

student-projects.yml
{course-code}/B172:  1
  description: Student projects for {course-code} in semester {semester}.
  projects:
    - create_for:
        students_of:
          - { course: {course-code}.16, semester: {semester} }  2
        users:  3
          - marshsta
          - brofloky
      path: "%{username}"  4
      student_role: developer  5
      project_settings:
        description: Homeworks for course {course-code}.
        tag_list: [{course-code}, homeworks]
        visibility: private  6
      protected_branches:
        master:  7
          push_access_level: master
          merge_access_level: master
      source_project:
        path: {course-code}/homeworks  8
        branches:
          - { src: master, sync: true }  9 10
  1. Vytvářet projekty v podskupině B172 skupiny MI-XYZ.
  2. Vytvořit/synchronizovat projekt pro každého studenta zapsaného na předmět BI-XYZ.16 v semestru B172…​
  3. …​a navíc pro studenty s uživatelskými jmény marshsta a brofloky.
  4. Studentský projekt bude mít identifikátor odpovídající uživatelskému jménu studenta.
  5. Assign the student the developer role in their project.
  6. Set the student project’s visibility to private so that other students cannot access it.
  7. Configure the master branch in the student’s repository as protected, preventing the student from pushing to it.
  8. Use the MI-XYZ/homeworks repository as the template for creating student repositories…​
  9. src: Clone the master branch from the MI-XYZ/homeworks repository into the student repository.
  10. sync: Automatically synchronize all changes from the master branch of the MI-XYZ/homeworks repository into the student repository.
Result

Each student has their own project (repository) prepared under the MI-XYZ/B172 group (e.g., MI-XYZ/B172/brofloky). In the master branch (the default branch), they will find the assignments provided by the instructor. This branch is automatically updated from the assignment repository (e.g., MI-XYZ/homeworks), and students do not have permission to write to it. All course instructors automatically have access to these student projects through the permissions assigned in the MI-XYZ group.

Assignment Submission Procedure for Students

  1. Clone the MI-XYZ/B172/<username> repository to your computer, or perform a pull of the master branch if you have already cloned the repository.
  2. Create a new branch from master named task-XX, where XX is the assignment number.
  3. Work on the assignment, commit your changes to the task-XX branch, and push them to the server as needed.
  4. Once the assignment is complete, open a merge request (MR) from your task-XX branch into your master branch and assign your instructor as a Reviewer.

If the instructor is not satisfied with the solution and requests changes, make the requested modifications, commit them, and push them to the same branch.

Important:

Do not close the MR and create a new one for the same assignment if an MR already exists!

Doing so is completely unnecessary and would only confuse the instructor. Any commits that you push to the branch after creating the MR will automatically appear in the MR.

Assignment Review Procedure for Instructors

At https://gitlab.fit.cvut.cz/groups/MI-XYZ/B172/merge_requests you can find an overview of all merge requests ("submitted assignments" awaiting review) for the MI-XYZ course in semester B172.

You can easily filter merge requests (MRs) assigned to you as the Reviewer. Once a student assigns you as the Reviewer, GitLab will send you an email notification (unless you have disabled notifications).

  1. Select an MR to review.
  2. Click Changes and review the changes made by the student. You can add comments to any modified line.
  3. If you are satisfied with the submission, leave a comment for the student and close the MR by clicking Close merge request (below the comment form).
Important:

Do not merge the MR (do not click the green Merge button)!

Doing so would unnecessarily create conflicts in the master branch.