Phase 2: Course materials

In this phase, you will expand the application with the option to add various study materials to courses. These materials will be visible to regular users on the specific course page, so they can open or download them. They can be managed by the instructor, who must be able to add, edit, or delete them.

Types of materials

Materials are divided into two main types – files and links. There is no limit to the number of materials per course.

File

  • Required information: name, short description, uploaded file
  • Supported formats:
    • Documents: .pdf, .docx, .txt
    • Images: .png, .jpg, .jpeg, .gif
    • Videos: .mp4
    • Audio: .mp3
  • Size limit: max. 30 MB per file
  • For users: a download option is displayed

Link (URL)

  • Required information: name, address (URL), short description
  • The favicon of the target page is automatically loaded (if available)
  • For users: a clickable link with the name, description, and icon is displayed.

Location in the application

For students: materials are displayed in the course details, below the main course information.
For instructors: materials are managed in the section /dashboard → course management → course details
Here, instructors will see a list of all materials and will be able to add, delete, and edit them (i.e., rename and modify material parameters).

Materials should be displayed in order from newest to oldest.

Technical notes

  • Each material must have a unique identifier so that it can be edited or deleted later. Currently, we recommend using UUID rather than a classic numeric ID.
  • If the instructor uploads an unsupported format or a file that is too large, the API will return a 400 Bad Request error.
  • The API for uploading materials must only be accessible to instructors—if a normal user attempts to upload a document via a manual request to the endpoint, it should not go through and should return a 401 Unauthorized error.