freeCodeCamp / freeCodeCamp/classroom

Add multiple teachers to a classroom

Open
#166 8 comments 0 reactions 1 assignee Claimed by @theGaryLarson View on GitHub
Dominant language
JavaScript
Stars
155
Forks
138
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

We only support one teacher/instructor per class, however, this may not fit all use cases. We would like to be able to have multiple teachers (limit yet to be discussed). The first step would require us to change the Prisma schema / database to support multiple teachers for a given classroom.

Here is how you can approach this task:
1. Open [ schema.prisma](https://github.com/freeCodeCamp/classroom/blob/main/prisma/schema.prisma)
2. Update the Classroom model ==> classroomTeacherId should take an array of Strings. Afterwards you will need to do a [prisma migration](https://www.prisma.io/docs/concepts/components/prisma-migrate/get-started) or wipe the DB and start from scratch.
3. Search the codebase for all [references](https://sourcegraph.com/search?q=context%3Aglobal+repo%3A%5Egithub%5C.com%2FfreeCodeCamp%2Fclassroom%24%40main+classroomTeacherId&patternType=standard&sm=1&groupBy=path) to classroomTeacherId in **javascript** files. Update the code so that works with an array. For example, you may want to append to the classroomTeacherId array instead of setting it directly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.