hassanhabib / OtripleS

This is an open source schooling system, dedicated to provide a better experience for schools needing a management and communication and tutoring system all in one place. This project is aiming toward directing all the software development funds and hours to families in need, the idea of the project is to allow schools to use the system as long as the software funds in the school are directed towards financially disadvantaged families and students.
325 stars 166 forks source link

Discuss Class (Course) Model #32

Closed hassanhabib closed 4 years ago

hassanhabib commented 4 years ago

This one is going to be a little tricky, because class is a reserved keyword in C# and many other languages - so we probably need to think of a different name for a Class. Here's the initial model:

using System;

public class Class {
    public Guid Id {get; set;}
    public string Name {get; set;}
    public string Description {get; set;}
    public ClassStatus Status {get; set;}
    public DateTimeOffset CreatedDate {get; set;}
    public DateTimeOffset UpdatedDate {get; set;}
    public Guid CreatedBy {get; set;}
    public Guid UpdatedBy {get; set;}
}

public enum ClassStatus {
    Active,
    Suspended,
    Inactive
}

Related entities to think about: // students // teachers // syllabus // assignments // schedules // projects // exams

Thanks @viralpandya for helping me put this model together. Team, let's discuss!

gauriramesh commented 4 years ago

I think a good alternate name could be "Course" or "Subject". I think it would be good to establish a relationship either at the model level or db level (or both) between students and classes. Would we want an ICollection in Class and an ICollection in Student and have a many-to-many relationship?

A Class could have an ICollection of Teachers too, since multiple instances of a course could be taught by more than one teacher.

Since we have multiple types of people, how do we want to handle common things like authentication/login? I wonder if we need to refactor Student and subsequent user types to implement some common IUser interface so that way an account table could have a foreign key to one entity (user). Just thinking out loud here.

ShreyasJejurkar commented 4 years ago

I think what we should really do is come with up a class diagram containing all required entities including student, class and above mentioned one. So that we can figure out the association and relationship between each entities, and that diagram will guide us moving forward and it will also helps to write code and and design database schema. Because other wise we will won't be able to finish our models at end as well. Because every single new requirements or moreover realisation is making us to edit existing models and corresponding services and exceptions as well, which is not good I think. So better we come up class diagram so that we can visualize and analyze the domain entities at high level. And also can add, remove the fields based on other models and businesses logic and features that OtripleS is going to provide in future!

tajwal commented 4 years ago

This one is going to be a little tricky, because class is a reserved keyword in C# and many other languages - so we probably need to think of a different name for a Class. Here's the initial model:

using System;

public class Class {
  public Guid Id {get; set;}
  public string Name {get; set;}
  public string Description {get; set;}
  public ClassStatus Status {get; set;}
  public DateTimeOffset CreatedDate {get; set;}
  public DateTimeOffset UpdatedDate {get; set;}
  public Guid CreatedBy {get; set;}
  public Guid UpdatedBy {get; set;}
}

public enum ClassStatus {
  Active,
  Suspended,
  Inactive
}

Related entities to think about: // students // teachers // syllabus // assignments // schedules // projects // exams

Thanks @viralpandya for helping me put this model together. Team, let's discuss!

Mr. @hassanhabib , If we put the name of the entity room and have roomtype column which will be enum and have values like. Classroom, Office, Lab, and etc.

If a school have multiple buildings, in that scenario don't you think we need entities for buildings, then floors and at the end floorId as foreign key in room/class. and and enums for class type as classes defers based on subjects teaches in there and capacity of it, we may have different class types as we have here.

a-urel commented 4 years ago

Classroom would be a better name

using System;

public class Classroom : IAuditable 
{
    public Guid Id { get; set; }
    public string Name { get; set; }
    public string Type { get; set; } // standard, lab, etc.
    public string Location { get; set; } // Building, etc.
    public int MaxStudentCount { get; set; }
    public string Description { get; set; }
    public ClassroomStatus Status { get; set; }
    public DateTimeOffset CreatedDate { get; set; }
    public DateTimeOffset UpdatedDate { get; set; }
    public Guid CreatedBy { get; set; }
    public Guid UpdatedBy { get; set; }
}

public enum ClassroomStatus 
{
    Active,
    Suspended,
    Inactive
}
Driedas commented 4 years ago

Looks like it's time to also get the vocabulary/ubiquitous language right :-) What exactly do you understand under a Class? Is that a Subject or Course (like @gauriramesh suggested) being taught as part of the curriculum - e. g. Math 1/2/3/... If so, I like the term Subject or Course better, Is a Class maybe the participation of a Student on a Subject at a certain level? I. e. an item in the Student's schedule. In my region, a Class could also mean a group of students that advance together in the system for a number of years and are taught Subjects together on the same level by the same teacher.

If this is the Subject/Course, then I think there should be a property that distinguishes the levels of the Subject/Course, or maybe that should be a separate entity on its own. Basically something that says that Math for the first grade is not the same as Math for the second grade, and potentially also requires a teacher of a different skillset. A teacher should then also not just have a list of subjects they can teach, but also the level at which they can teach it.

eriadhami commented 4 years ago

Looks like it's time to also get the vocabulary/ubiquitous language right :-) What exactly do you understand under a Class? Is that a Subject or Course (like @gauriramesh suggested) being taught as part of the curriculum - e. g. Math 1/2/3/... If so, I like the term Subject or Course better, Is a Class maybe the participation of a Student on a Subject at a certain level? I. e. an item in the Student's schedule. In my region, a Class could also mean a group of students that advance together in the system for a number of years and are taught Subjects together on the same level by the same teacher.

If this is the Subject/Course, then I think there should be a property that distinguishes the levels of the Subject/Course, or maybe that should be a separate entity on its own. Basically something that says that Math for the first grade is not the same as Math for the second grade, and potentially also requires a teacher of a different skillset. A teacher should then also not just have a list of subjects they can teach, but also the level at which they can teach it.

Also in my country (Albania), a Class means a group of students that advance together in the system for a number of years and are taught Subjects together on the same level. From the 1-4-th grade, the Students of a class are taught by only one Teacher for all the Subjects, who is also their Tutor. From 4-12 grade the Students of a Class are taught by many Teachers one Teacher per Subject and one of the Teachers is chosen as a Tutor.

JaAfghan commented 4 years ago

This one is going to be a little tricky, because class is a reserved keyword in C# and many other languages - so we probably need to think of a different name for a Class. Here's the initial model:

using System;

public class Class {
  public Guid Id {get; set;}
  public string Name {get; set;}
  public string Description {get; set;}
  public ClassStatus Status {get; set;}
  public DateTimeOffset CreatedDate {get; set;}
  public DateTimeOffset UpdatedDate {get; set;}
  public Guid CreatedBy {get; set;}
  public Guid UpdatedBy {get; set;}
}

public enum ClassStatus {
  Active,
  Suspended,
  Inactive
}

Related entities to think about: // students // teachers // syllabus // assignments // schedules // projects // exams

Thanks @viralpandya for helping me put this model together. Team, let's discuss!

Mr.@hassanhabib I think using classroom will be better option

hassanhabib commented 4 years ago

Classroom would be a better name

using System;

public class Classroom : IAuditable 
{
  public Guid Id { get; set; }
  public string Name { get; set; }
  public string Type { get; set; } // standard, lab, etc.
  public string Location { get; set; } // Building, etc.
  public int MaxStudentCount { get; set; }
  public string Description { get; set; }
  public ClassroomStatus Status { get; set; }
  public DateTimeOffset CreatedDate { get; set; }
  public DateTimeOffset UpdatedDate { get; set; }
  public Guid CreatedBy { get; set; }
  public Guid UpdatedBy { get; set; }
}

public enum ClassroomStatus 
{
  Active,
  Suspended,
  Inactive
}

@a-urel & @tajwal I think classroom is different than what a class is supposed to represent, this is like Spanish Class, it's not bound by a particular location - it's more bound by the subject being studied and the students being a part of this subject, what do you think?

Driedas commented 4 years ago

maybe use it in a sentence :-) is it "I'm taking a Spanish class this year"(i. e. a Subject) or is it "I have a Spanish class in 5 minutes, better hurry" (i. e. an item on my Schedule) or "I'm taking a Spanish class with these other 20 Students" - an occurence of a Subject being taught this year

a-urel commented 4 years ago

@hassanhabib @tajwal @Driedas Fortunately deciding the meanings of the terms is easier than it seems. There are standards like PowerSchool API and OneRoster API. Our data structure should be compatible with these standards, so that OtripleS can easily cooperate with other tools and platforms like Microsoft Teams (see: https://www.youtube.com/watch?v=I74_onNivJw).

I think we need these foundational entities for the beginning:

AgentEnder commented 4 years ago

If we can keep compatibility with these that would be a major win, and using their terms would help a lot (not to mention I generally agree with them).

hassanhabib commented 4 years ago

Thank you all for your feedback, I think Course is definitely a better term. here's our finalized model and our assignments for this week:

using System;

public class Course {
    public Guid Id {get; set;}
    public string Name {get; set;}
    public string Description {get; set;}
    public CourseStatus Status {get; set;}
    public DateTimeOffset CreatedDate {get; set;}
    public DateTimeOffset UpdatedDate {get; set;}
    public Guid CreatedBy {get; set;}
    public Guid UpdatedBy {get; set;}
}

public enum CourseStatus {
    Available,
    Unavailable
}

Now, let's talk about assignments:

Setup

Broker

Service

Controller

Acceptance Tests

Contribution Rules:

  1. If you have a service task, make sure you commit a failing test, then commit making it pass and so on until your feature is complete (watch this video for reference: https://youtu.be/FLsHIDe3cNs)
  2. All CRUD operations now have similar functionality in the StudentService, Broker and Controller - please follow the same pattern and guidelines.
  3. This WIP Coding Standard https://github.com/hassanhabib/CSharpCodingStandard will be our guidance, it is a work in progress but it should give you a pretty good idea bout how our code should look like from guidelines and standardization standpoint.
  4. Do not start your task before the designated time and make sure you finalize it at the expected time so others can build on top of your work.

If you haven't had an assignment this week please make sure you engage in discussion for next week so I know you are active in this repo and you are going to be able to contribute to the project.

As soon as all these tasks are done, this issue will be closed.

Thank you all from the bottom of my heart <3 for your contributions, if you are stuck or unsure how to do a task, reach out to me literally on any social media platform you like, LinkedIn, Facebook, Whatsapp, Twitter or even Instagram or just ping me on gitter and I will be sure to response within 2 - 4 hours max.

Mohamad-ali-8 commented 4 years ago

Hi @hassanhabib, I can help with the controller work, unfortunately, last week I couldn't.

hassanhabib commented 4 years ago

Hi @hassanhabib, I can help with the controller work, unfortunately, last week I couldn't.

@Mohamad-ali-8 you have an assignment now, thank you for your contributions.

chaouanabil commented 4 years ago

I think Class would be better to be used to mean for example Class 1 year Biology, 2 year Computer Science Ect et is has a list of couses. A class has a list of couses. A student is assigned to a class. A course could be teached by multiple teachers. A course is teached by one teacher for a class. course session is scheduled for a Class (or class group, class could be divided in group of students) in a classroom.

eriadhami commented 4 years ago

Setup

  • Course Model Setup & Migrations with EF Core @HatemGamal Monday 12:00 AM - 11:59 PM PST

@HatemGamal if you want i will be happy to help with this

HatemGamal commented 4 years ago

Thanks @eriadhami, appreciated ;). My apologies for the delay.

devmanzur commented 4 years ago

I will start working on the acceptance test as soon as the get all endpoint is merged.

JaAfghan commented 4 years ago

acceptance test is ready from our side we are waiting once the Update endpoint is merged

tajwal commented 4 years ago

My assignment, Course Post Acceptance Test done, If @a-urel is busy me and @JaAfghan will happy to help you on the controller methods.

devmanzur commented 4 years ago

the acceptance tests are already implemented :(