InFiNet-Code-AB / Dojo-BE

0 stars 3 forks source link

Course Management #30

Open AnicaMitrovic opened 9 months ago

AnicaMitrovic commented 9 months ago

Allows instructors to create, manage, and categorize courses and upload course materials.

As an instructor, I want to create courses, so that I can share my knowledge.

As an instructor, I want to upload course materials, so that my students can access lectures, readings, and assignments.

As a system, I want to categorize courses, so that students can easily find courses they're interested in.

AnicaMitrovic commented 8 months ago

Image

AnicaMitrovic commented 8 months ago

Some suggestions on endpoints:

Course Management Endpoints for Instructors

POST /api/courses Instructors can create a new course with all the necessary properties.

PUT /api/courses/{courseId} Enables instructors to update details of an existing course, such as its title, description, and categories..

DELETE /api/courses/{courseId} Allows instructors to delete an existing course. This action should also handle the deletion of associated course materials and structures.

GET /api/instructors/{instructorId}/courses Retrieves a list of courses created by a specific instructor.

Course Content management Endpoints

POST /api/courses/{courseId}/materials Supports uploading various types of content to a specific course

PUT /api/courses/{courseId}/materials/{materialId} Enables instructors to update details about specific course materials.

DELETE /api/courses/{courseId}/materials/{materialId} Allows for the removal of specific course materials (lesson or module) from a course.

Course Categorization and Tagging Endpoints

POST /api/courses/{courseId}/tags Allows adding tags or categories to a course (instructors only)

DELETE /api/courses/{courseId}/tags/{tagId} Enables the removal of specific tags from a course. (instructors only)

GET /api/tags Retrieves a list of all available tags or categories that can be assigned to courses. (publicly accessible, allowing anyone on the platform to see the available course categories or tags)

Course Browsing and Access Endpoints for Students and Visitors

GET /api/courses Shows all available courses to visitors and logged-in students . This endpoint can include filters for categorization, search by title, instructor, etc.

GET /api/courses/{courseId} Provides detailed information about a course, including its title, description, instructor, and a list of materials (metadata only, not the actual content files). Access to full material details may be restricted..

AnicaMitrovic commented 8 months ago

Make sure that some endpoints are protected and can only be accessed by specific users. Course creation, update, and delete should require checks to ensure that only authorized instructors can perform these actions.

Also, implement error handling across all endpoints to return meaningful feedback for failed operations, like attempts to update non-existent courses or unauthorized access attempts or similar..

Add data validation logic to ensure that incoming data (course titles, material uploads) meets expected formats and constraints (if there are any).

AnicaMitrovic commented 8 months ago

Note: we write error messages or other string literals in English

HubTicaBB commented 8 months ago

In addition to GET /api/courses (that lists all the courses), I'd suggest a search endpoint for courses, that returns a list of courses (same return type as GET /api/courses), but filtered by different properties, such as course name, instructor id and the tags. It can be a POST request, that takes the filter options as request body.

HubTicaBB commented 8 months ago

Regarding the "tags", the usage should be similar to stack overflow. The author should be able to add/remove them, the students should be able to see them on each cours as well as filter courses by tags (see above)

image