Bug: Classrooms can be created with no certifications
Currently, it is possible to create a classroom without any certifications. This results in empty classroom pages being created, which would be confusing for teachers.
Classroom page with no certifications:
Desired solution:
When a teacher is creating a class, the "Create" button should be disabled when there are no certifications selected. If the teacher hovers over the "Create" button, hover text will appear saying, "Please select a certification."
Steps to reproduce the issue:
- Make sure you can successfully log in via Github (use the Github sign-in option, not Auth0)
- Run "npx prisma studio" in the terminal, navigate to the "Users" table, change the role of your user to "TEACHER"
- Make sure you click "Save changes" in prisma studio
- Sign out of the Classroom app and then sign back in
- Press the "Classes" button on the top navbar
- Create a class without selecting a certification
Hi! I'd love to contribute. Could you assign this issue to me? Happy to get started right away.
Hey! I have created PR. Could you check if any other changes are needed?
Hi freeCodeCamp team,
I'm Diya Jatar, an aspiring Software Engineer interested in React, backend development, and building reliable web applications.
I'd like to contribute to the classroom validation issue. Is someone already working on it, or can a new contributor take it up? I'll review the project's contribution guidelines and tests before proposing a fix.
Thank you for maintaining this project!
Hi, I would like to work on this.
I previously contributed to this repository in 2022 (PR #173 / commit e084a4c), where I helped add the styled toast notification for the “Copy Invite Code” action. I understand that this was a long time ago.
I am happy to implement the certification requirement against the current codebase and open a pull request if the issue is still open.
This issue has been resolved. We decided to allow classes with no certifications, but fix issues that arose out of classes having no certifications.