<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Avdoshi</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Avdoshi"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Avdoshi"/>
	<updated>2026-09-16T18:08:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163438</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163438"/>
		<updated>2025-04-07T20:18:12Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* teams_controller.rb: Method / API calls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== TeamsController.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TeamsHelper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
'''Template Method Pattern'''&lt;br /&gt;
&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure. It defines the foundation of fundamental team-related processes in a base class. This pattern is especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but implements its own unique logic.&lt;br /&gt;
&lt;br /&gt;
'''Where Will It Be Used?''' &amp;lt;br&amp;gt;&lt;br /&gt;
'''Base Class: Team'''  &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like `add_member`, `remove_member`, `copy_to`, and `empty?` will be defined by the `Team` class. These methods will use placeholder or hook methods, such as `validate_participant_type` or `handle_special_roles`, which will be implemented by subclasses, while adhering to a standard structure.&lt;br /&gt;
&lt;br /&gt;
'''Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam''' &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviors by overriding the hook methods:&lt;br /&gt;
* `CourseTeam` will validate participants in the course.&lt;br /&gt;
* `AssignmentTeam` will define assignment-specific logic.&lt;br /&gt;
* `MentoredTeam` will take precedence over the member addition rationale to handle mentor responsibilities.&lt;br /&gt;
&lt;br /&gt;
'''Reason for Using Template Method:'''&lt;br /&gt;
* Promotes code reuse by including shared functionality in the main `Team` class.&lt;br /&gt;
* Enforces a consistent framework for all team operations.&lt;br /&gt;
* Allows customizable behavior in subclasses without duplicating code.&lt;br /&gt;
* Simplifies future enhancements by offering a scalable and maintainable solution (e.g., when introducing new team types).&lt;br /&gt;
&lt;br /&gt;
=== SOLID Principles ===&lt;br /&gt;
&lt;br /&gt;
'''Open/Closed Principle (OCP)'''&amp;lt;br&amp;gt;&lt;br /&gt;
The Open/Closed Principle states that software entities should be open for extension but closed for modification. This principle will be a core part of the Team hierarchy reimplementation.&amp;lt;br&amp;gt;&lt;br /&gt;
The Team base class in this project will be created so that when more team kinds are added, it doesn't need to be changed. Instead, by constructing subclasses like CourseTeam, AssignmentTeam, and MentoredTeam, developers will be able to expand the current structure.&amp;lt;br&amp;gt;&lt;br /&gt;
Without changing the shared logic specified in the Team base class, each subclass will extend or override particular methods (such as add_member, validate_participant_type, or copy_to). With this design, the basic class will continue to be dependable and robust while providing room for expansion and personalisation&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
&lt;br /&gt;
=== TeamsController ===&lt;br /&gt;
'''Inherits From:''' ApplicationController&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
The TeamsController is our main interface for handling team-related requests. It orchestrates creating, showing, updating, and removing teams while also providing actions for specific operations like copying teams to assignments. By extending ApplicationController, it leverages Rails conventions for RESTful endpoints.&lt;br /&gt;
&lt;br /&gt;
'''Key Actions (as referenced in the diagram):'''&lt;br /&gt;
* '''add / add_member:''' Prepares data for adding a new team or adding members to an existing team.&lt;br /&gt;
* '''show:''' Retrieves and displays a team’s details.&lt;br /&gt;
* '''create:''' Persists a new team record.&lt;br /&gt;
* '''remove / remove_member:''' Handles deletion of teams or the removal of a specific member from a team.&lt;br /&gt;
* '''copy_to_assignment:''' Allows teams to be copied or migrated into the context of an assignment.&lt;br /&gt;
* '''empty:''' Checks if a team currently has no members, useful for certain validations or cleanup tasks.&lt;br /&gt;
&lt;br /&gt;
=== TeamsHelper ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
TeamsHelper provides shared view or utility methods that can be reused across different views related to teams. This might include form helpers, formatting functions, or any specialized logic that doesn’t belong directly in the controller or model. By extracting these methods into a helper, we keep our controllers lean and our views consistent.&lt;br /&gt;
&lt;br /&gt;
=== Validation / Utility ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
These are modules or classes that encapsulate common validation logic or utility functions. For example, methods may ensure that team size constraints are met or that certain data formats are respected. The TeamsController can call these utilities to keep business logic separate from controller actions.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Team is our base model, defining attributes and behaviors common to all team types. It maintains core relationships (like having many members) and implements fundamental methods that child classes can inherit or override.&lt;br /&gt;
&lt;br /&gt;
'''Key Methods:'''&lt;br /&gt;
* '''add_member(user):''' Adds a user to the team, performing basic checks like duplicate membership.&lt;br /&gt;
* '''remove_member(user):''' Removes a user from the team.&lt;br /&gt;
* '''size:''' Returns the current count of team members.&lt;br /&gt;
* '''empty?:''' Checks whether the team has no members, useful for validating if a team is still active or viable.&lt;br /&gt;
&lt;br /&gt;
Because Team is the parent class, it keeps the shared logic centralized, ensuring consistency across specialized team models.&lt;br /&gt;
&lt;br /&gt;
=== AssignmentTeam ===&lt;br /&gt;
'''Inherits From:''' Team&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
AssignmentTeam is designed for short-term or one-off teams formed specifically for an assignment. It enforces membership rules based on assignment criteria, such as whether a user is actually participating in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''add_assignment_member(user):''' Ensures the user is eligible for the assignment before joining.&lt;br /&gt;
* '''validate_team:''' Checks constraints like maximum size or required roles for an assignment.&lt;br /&gt;
&lt;br /&gt;
By keeping assignment-specific logic here, we avoid mixing it with course-level concerns.&lt;br /&gt;
&lt;br /&gt;
=== MentoredTeam ===&lt;br /&gt;
'''Inherits From:''' AssignmentTeam&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
MentoredTeam extends AssignmentTeam by adding a designated mentor role. This can be especially helpful for assignments requiring expert oversight or guidance.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''assign_mentor(user):''' Sets a mentor for the team after confirming they meet certain criteria (e.g., correct privileges or expertise).&lt;br /&gt;
* '''remove_mentor:''' Allows for unassigning a mentor if needed.&lt;br /&gt;
* '''mentor_validation:''' Ensures that the chosen mentor is valid for the assignment.&lt;br /&gt;
* '''view_team_with_mentor:''' Presents a combined view of the team members and mentor details.&lt;br /&gt;
&lt;br /&gt;
By placing mentor logic in its own subclass, we keep assignment-level functionality clean while MentoredTeam handles the extra mentorship features.&lt;br /&gt;
&lt;br /&gt;
=== Participant ===&lt;br /&gt;
'''Associations:'''&lt;br /&gt;
* '''belongs_to :team'''&lt;br /&gt;
* '''belongs_to :user'''&lt;br /&gt;
* '''belongs_to :assignment''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Participant acts as a linking model in some contexts, ensuring we can track which user belongs to which team for a given assignment or course. This model helps us keep membership records organized and may include additional data (like submission status or peer reviews).&lt;br /&gt;
&lt;br /&gt;
=== Final Notes ===&lt;br /&gt;
* '''Implementation &amp;amp; Testing:'''  &lt;br /&gt;
We have not yet implemented or tested the classes and methods described here. Once we begin coding, we will follow these designs closely and write RSpec tests to ensure all functionalities work as intended.&lt;br /&gt;
&lt;br /&gt;
* '''Code Readability &amp;amp; Documentation:'''  &lt;br /&gt;
We plan to maintain thorough inline documentation and adopt clear method names. This will make it easier for new contributors to understand and modify our team hierarchy.&lt;br /&gt;
&lt;br /&gt;
* '''Project Mentorship:'''  &lt;br /&gt;
Sahithi Ammana is providing guidance throughout this project, ensuring that our approach aligns with best practices and remains scalable for future needs.&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163437</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163437"/>
		<updated>2025-04-07T20:17:55Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* teams_helper.rb methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TeamsHelper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
'''Template Method Pattern'''&lt;br /&gt;
&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure. It defines the foundation of fundamental team-related processes in a base class. This pattern is especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but implements its own unique logic.&lt;br /&gt;
&lt;br /&gt;
'''Where Will It Be Used?''' &amp;lt;br&amp;gt;&lt;br /&gt;
'''Base Class: Team'''  &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like `add_member`, `remove_member`, `copy_to`, and `empty?` will be defined by the `Team` class. These methods will use placeholder or hook methods, such as `validate_participant_type` or `handle_special_roles`, which will be implemented by subclasses, while adhering to a standard structure.&lt;br /&gt;
&lt;br /&gt;
'''Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam''' &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviors by overriding the hook methods:&lt;br /&gt;
* `CourseTeam` will validate participants in the course.&lt;br /&gt;
* `AssignmentTeam` will define assignment-specific logic.&lt;br /&gt;
* `MentoredTeam` will take precedence over the member addition rationale to handle mentor responsibilities.&lt;br /&gt;
&lt;br /&gt;
'''Reason for Using Template Method:'''&lt;br /&gt;
* Promotes code reuse by including shared functionality in the main `Team` class.&lt;br /&gt;
* Enforces a consistent framework for all team operations.&lt;br /&gt;
* Allows customizable behavior in subclasses without duplicating code.&lt;br /&gt;
* Simplifies future enhancements by offering a scalable and maintainable solution (e.g., when introducing new team types).&lt;br /&gt;
&lt;br /&gt;
=== SOLID Principles ===&lt;br /&gt;
&lt;br /&gt;
'''Open/Closed Principle (OCP)'''&amp;lt;br&amp;gt;&lt;br /&gt;
The Open/Closed Principle states that software entities should be open for extension but closed for modification. This principle will be a core part of the Team hierarchy reimplementation.&amp;lt;br&amp;gt;&lt;br /&gt;
The Team base class in this project will be created so that when more team kinds are added, it doesn't need to be changed. Instead, by constructing subclasses like CourseTeam, AssignmentTeam, and MentoredTeam, developers will be able to expand the current structure.&amp;lt;br&amp;gt;&lt;br /&gt;
Without changing the shared logic specified in the Team base class, each subclass will extend or override particular methods (such as add_member, validate_participant_type, or copy_to). With this design, the basic class will continue to be dependable and robust while providing room for expansion and personalisation&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
&lt;br /&gt;
=== TeamsController ===&lt;br /&gt;
'''Inherits From:''' ApplicationController&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
The TeamsController is our main interface for handling team-related requests. It orchestrates creating, showing, updating, and removing teams while also providing actions for specific operations like copying teams to assignments. By extending ApplicationController, it leverages Rails conventions for RESTful endpoints.&lt;br /&gt;
&lt;br /&gt;
'''Key Actions (as referenced in the diagram):'''&lt;br /&gt;
* '''add / add_member:''' Prepares data for adding a new team or adding members to an existing team.&lt;br /&gt;
* '''show:''' Retrieves and displays a team’s details.&lt;br /&gt;
* '''create:''' Persists a new team record.&lt;br /&gt;
* '''remove / remove_member:''' Handles deletion of teams or the removal of a specific member from a team.&lt;br /&gt;
* '''copy_to_assignment:''' Allows teams to be copied or migrated into the context of an assignment.&lt;br /&gt;
* '''empty:''' Checks if a team currently has no members, useful for certain validations or cleanup tasks.&lt;br /&gt;
&lt;br /&gt;
=== TeamsHelper ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
TeamsHelper provides shared view or utility methods that can be reused across different views related to teams. This might include form helpers, formatting functions, or any specialized logic that doesn’t belong directly in the controller or model. By extracting these methods into a helper, we keep our controllers lean and our views consistent.&lt;br /&gt;
&lt;br /&gt;
=== Validation / Utility ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
These are modules or classes that encapsulate common validation logic or utility functions. For example, methods may ensure that team size constraints are met or that certain data formats are respected. The TeamsController can call these utilities to keep business logic separate from controller actions.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Team is our base model, defining attributes and behaviors common to all team types. It maintains core relationships (like having many members) and implements fundamental methods that child classes can inherit or override.&lt;br /&gt;
&lt;br /&gt;
'''Key Methods:'''&lt;br /&gt;
* '''add_member(user):''' Adds a user to the team, performing basic checks like duplicate membership.&lt;br /&gt;
* '''remove_member(user):''' Removes a user from the team.&lt;br /&gt;
* '''size:''' Returns the current count of team members.&lt;br /&gt;
* '''empty?:''' Checks whether the team has no members, useful for validating if a team is still active or viable.&lt;br /&gt;
&lt;br /&gt;
Because Team is the parent class, it keeps the shared logic centralized, ensuring consistency across specialized team models.&lt;br /&gt;
&lt;br /&gt;
=== AssignmentTeam ===&lt;br /&gt;
'''Inherits From:''' Team&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
AssignmentTeam is designed for short-term or one-off teams formed specifically for an assignment. It enforces membership rules based on assignment criteria, such as whether a user is actually participating in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''add_assignment_member(user):''' Ensures the user is eligible for the assignment before joining.&lt;br /&gt;
* '''validate_team:''' Checks constraints like maximum size or required roles for an assignment.&lt;br /&gt;
&lt;br /&gt;
By keeping assignment-specific logic here, we avoid mixing it with course-level concerns.&lt;br /&gt;
&lt;br /&gt;
=== MentoredTeam ===&lt;br /&gt;
'''Inherits From:''' AssignmentTeam&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
MentoredTeam extends AssignmentTeam by adding a designated mentor role. This can be especially helpful for assignments requiring expert oversight or guidance.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''assign_mentor(user):''' Sets a mentor for the team after confirming they meet certain criteria (e.g., correct privileges or expertise).&lt;br /&gt;
* '''remove_mentor:''' Allows for unassigning a mentor if needed.&lt;br /&gt;
* '''mentor_validation:''' Ensures that the chosen mentor is valid for the assignment.&lt;br /&gt;
* '''view_team_with_mentor:''' Presents a combined view of the team members and mentor details.&lt;br /&gt;
&lt;br /&gt;
By placing mentor logic in its own subclass, we keep assignment-level functionality clean while MentoredTeam handles the extra mentorship features.&lt;br /&gt;
&lt;br /&gt;
=== Participant ===&lt;br /&gt;
'''Associations:'''&lt;br /&gt;
* '''belongs_to :team'''&lt;br /&gt;
* '''belongs_to :user'''&lt;br /&gt;
* '''belongs_to :assignment''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Participant acts as a linking model in some contexts, ensuring we can track which user belongs to which team for a given assignment or course. This model helps us keep membership records organized and may include additional data (like submission status or peer reviews).&lt;br /&gt;
&lt;br /&gt;
=== Final Notes ===&lt;br /&gt;
* '''Implementation &amp;amp; Testing:'''  &lt;br /&gt;
We have not yet implemented or tested the classes and methods described here. Once we begin coding, we will follow these designs closely and write RSpec tests to ensure all functionalities work as intended.&lt;br /&gt;
&lt;br /&gt;
* '''Code Readability &amp;amp; Documentation:'''  &lt;br /&gt;
We plan to maintain thorough inline documentation and adopt clear method names. This will make it easier for new contributors to understand and modify our team hierarchy.&lt;br /&gt;
&lt;br /&gt;
* '''Project Mentorship:'''  &lt;br /&gt;
Sahithi Ammana is providing guidance throughout this project, ensuring that our approach aligns with best practices and remains scalable for future needs.&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163436</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163436"/>
		<updated>2025-04-07T20:15:03Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
'''Template Method Pattern'''&lt;br /&gt;
&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure. It defines the foundation of fundamental team-related processes in a base class. This pattern is especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but implements its own unique logic.&lt;br /&gt;
&lt;br /&gt;
'''Where Will It Be Used?''' &amp;lt;br&amp;gt;&lt;br /&gt;
'''Base Class: Team'''  &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like `add_member`, `remove_member`, `copy_to`, and `empty?` will be defined by the `Team` class. These methods will use placeholder or hook methods, such as `validate_participant_type` or `handle_special_roles`, which will be implemented by subclasses, while adhering to a standard structure.&lt;br /&gt;
&lt;br /&gt;
'''Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam''' &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviors by overriding the hook methods:&lt;br /&gt;
* `CourseTeam` will validate participants in the course.&lt;br /&gt;
* `AssignmentTeam` will define assignment-specific logic.&lt;br /&gt;
* `MentoredTeam` will take precedence over the member addition rationale to handle mentor responsibilities.&lt;br /&gt;
&lt;br /&gt;
'''Reason for Using Template Method:'''&lt;br /&gt;
* Promotes code reuse by including shared functionality in the main `Team` class.&lt;br /&gt;
* Enforces a consistent framework for all team operations.&lt;br /&gt;
* Allows customizable behavior in subclasses without duplicating code.&lt;br /&gt;
* Simplifies future enhancements by offering a scalable and maintainable solution (e.g., when introducing new team types).&lt;br /&gt;
&lt;br /&gt;
=== SOLID Principles ===&lt;br /&gt;
&lt;br /&gt;
'''Open/Closed Principle (OCP)'''&amp;lt;br&amp;gt;&lt;br /&gt;
The Open/Closed Principle states that software entities should be open for extension but closed for modification. This principle will be a core part of the Team hierarchy reimplementation.&amp;lt;br&amp;gt;&lt;br /&gt;
The Team base class in this project will be created so that when more team kinds are added, it doesn't need to be changed. Instead, by constructing subclasses like CourseTeam, AssignmentTeam, and MentoredTeam, developers will be able to expand the current structure.&amp;lt;br&amp;gt;&lt;br /&gt;
Without changing the shared logic specified in the Team base class, each subclass will extend or override particular methods (such as add_member, validate_participant_type, or copy_to). With this design, the basic class will continue to be dependable and robust while providing room for expansion and personalisation&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
&lt;br /&gt;
=== TeamsController ===&lt;br /&gt;
'''Inherits From:''' ApplicationController&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
The TeamsController is our main interface for handling team-related requests. It orchestrates creating, showing, updating, and removing teams while also providing actions for specific operations like copying teams to assignments. By extending ApplicationController, it leverages Rails conventions for RESTful endpoints.&lt;br /&gt;
&lt;br /&gt;
'''Key Actions (as referenced in the diagram):'''&lt;br /&gt;
* '''add / add_member:''' Prepares data for adding a new team or adding members to an existing team.&lt;br /&gt;
* '''show:''' Retrieves and displays a team’s details.&lt;br /&gt;
* '''create:''' Persists a new team record.&lt;br /&gt;
* '''remove / remove_member:''' Handles deletion of teams or the removal of a specific member from a team.&lt;br /&gt;
* '''copy_to_assignment:''' Allows teams to be copied or migrated into the context of an assignment.&lt;br /&gt;
* '''empty:''' Checks if a team currently has no members, useful for certain validations or cleanup tasks.&lt;br /&gt;
&lt;br /&gt;
=== TeamsHelper ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
TeamsHelper provides shared view or utility methods that can be reused across different views related to teams. This might include form helpers, formatting functions, or any specialized logic that doesn’t belong directly in the controller or model. By extracting these methods into a helper, we keep our controllers lean and our views consistent.&lt;br /&gt;
&lt;br /&gt;
=== Validation / Utility ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
These are modules or classes that encapsulate common validation logic or utility functions. For example, methods may ensure that team size constraints are met or that certain data formats are respected. The TeamsController can call these utilities to keep business logic separate from controller actions.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Team is our base model, defining attributes and behaviors common to all team types. It maintains core relationships (like having many members) and implements fundamental methods that child classes can inherit or override.&lt;br /&gt;
&lt;br /&gt;
'''Key Methods:'''&lt;br /&gt;
* '''add_member(user):''' Adds a user to the team, performing basic checks like duplicate membership.&lt;br /&gt;
* '''remove_member(user):''' Removes a user from the team.&lt;br /&gt;
* '''size:''' Returns the current count of team members.&lt;br /&gt;
* '''empty?:''' Checks whether the team has no members, useful for validating if a team is still active or viable.&lt;br /&gt;
&lt;br /&gt;
Because Team is the parent class, it keeps the shared logic centralized, ensuring consistency across specialized team models.&lt;br /&gt;
&lt;br /&gt;
=== AssignmentTeam ===&lt;br /&gt;
'''Inherits From:''' Team&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
AssignmentTeam is designed for short-term or one-off teams formed specifically for an assignment. It enforces membership rules based on assignment criteria, such as whether a user is actually participating in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''add_assignment_member(user):''' Ensures the user is eligible for the assignment before joining.&lt;br /&gt;
* '''validate_team:''' Checks constraints like maximum size or required roles for an assignment.&lt;br /&gt;
&lt;br /&gt;
By keeping assignment-specific logic here, we avoid mixing it with course-level concerns.&lt;br /&gt;
&lt;br /&gt;
=== MentoredTeam ===&lt;br /&gt;
'''Inherits From:''' AssignmentTeam&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
MentoredTeam extends AssignmentTeam by adding a designated mentor role. This can be especially helpful for assignments requiring expert oversight or guidance.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''assign_mentor(user):''' Sets a mentor for the team after confirming they meet certain criteria (e.g., correct privileges or expertise).&lt;br /&gt;
* '''remove_mentor:''' Allows for unassigning a mentor if needed.&lt;br /&gt;
* '''mentor_validation:''' Ensures that the chosen mentor is valid for the assignment.&lt;br /&gt;
* '''view_team_with_mentor:''' Presents a combined view of the team members and mentor details.&lt;br /&gt;
&lt;br /&gt;
By placing mentor logic in its own subclass, we keep assignment-level functionality clean while MentoredTeam handles the extra mentorship features.&lt;br /&gt;
&lt;br /&gt;
=== Participant ===&lt;br /&gt;
'''Associations:'''&lt;br /&gt;
* '''belongs_to :team'''&lt;br /&gt;
* '''belongs_to :user'''&lt;br /&gt;
* '''belongs_to :assignment''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Participant acts as a linking model in some contexts, ensuring we can track which user belongs to which team for a given assignment or course. This model helps us keep membership records organized and may include additional data (like submission status or peer reviews).&lt;br /&gt;
&lt;br /&gt;
=== Final Notes ===&lt;br /&gt;
* '''Implementation &amp;amp; Testing:'''  &lt;br /&gt;
We have not yet implemented or tested the classes and methods described here. Once we begin coding, we will follow these designs closely and write RSpec tests to ensure all functionalities work as intended.&lt;br /&gt;
&lt;br /&gt;
* '''Code Readability &amp;amp; Documentation:'''  &lt;br /&gt;
We plan to maintain thorough inline documentation and adopt clear method names. This will make it easier for new contributors to understand and modify our team hierarchy.&lt;br /&gt;
&lt;br /&gt;
* '''Project Mentorship:'''  &lt;br /&gt;
Sahithi Ammana is providing guidance throughout this project, ensuring that our approach aligns with best practices and remains scalable for future needs.&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163435</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163435"/>
		<updated>2025-04-07T20:14:36Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
'''Template Method Pattern'''&lt;br /&gt;
&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure. It defines the foundation of fundamental team-related processes in a base class. This pattern is especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but implements its own unique logic.&lt;br /&gt;
&lt;br /&gt;
'''Where Will It Be Used?'''&lt;br /&gt;
'''Base Class: Team'''  &lt;br /&gt;
Generic methods like `add_member`, `remove_member`, `copy_to`, and `empty?` will be defined by the `Team` class. These methods will use placeholder or hook methods, such as `validate_participant_type` or `handle_special_roles`, which will be implemented by subclasses, while adhering to a standard structure.&lt;br /&gt;
&lt;br /&gt;
'''Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam'''  &lt;br /&gt;
These subclasses will define unique validations and behaviors by overriding the hook methods:&lt;br /&gt;
* `CourseTeam` will validate participants in the course.&lt;br /&gt;
* `AssignmentTeam` will define assignment-specific logic.&lt;br /&gt;
* `MentoredTeam` will take precedence over the member addition rationale to handle mentor responsibilities.&lt;br /&gt;
&lt;br /&gt;
'''Reason for Using Template Method:'''&lt;br /&gt;
* Promotes code reuse by including shared functionality in the main `Team` class.&lt;br /&gt;
* Enforces a consistent framework for all team operations.&lt;br /&gt;
* Allows customizable behavior in subclasses without duplicating code.&lt;br /&gt;
* Simplifies future enhancements by offering a scalable and maintainable solution (e.g., when introducing new team types).&lt;br /&gt;
&lt;br /&gt;
=== SOLID Principles ===&lt;br /&gt;
&lt;br /&gt;
'''Open/Closed Principle (OCP)'''&amp;lt;br&amp;gt;&lt;br /&gt;
The Open/Closed Principle states that software entities should be open for extension but closed for modification. This principle will be a core part of the Team hierarchy reimplementation.&amp;lt;br&amp;gt;&lt;br /&gt;
The Team base class in this project will be created so that when more team kinds are added, it doesn't need to be changed. Instead, by constructing subclasses like CourseTeam, AssignmentTeam, and MentoredTeam, developers will be able to expand the current structure.&amp;lt;br&amp;gt;&lt;br /&gt;
Without changing the shared logic specified in the Team base class, each subclass will extend or override particular methods (such as add_member, validate_participant_type, or copy_to). With this design, the basic class will continue to be dependable and robust while providing room for expansion and personalisation&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
&lt;br /&gt;
=== TeamsController ===&lt;br /&gt;
'''Inherits From:''' ApplicationController&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
The TeamsController is our main interface for handling team-related requests. It orchestrates creating, showing, updating, and removing teams while also providing actions for specific operations like copying teams to assignments. By extending ApplicationController, it leverages Rails conventions for RESTful endpoints.&lt;br /&gt;
&lt;br /&gt;
'''Key Actions (as referenced in the diagram):'''&lt;br /&gt;
* '''add / add_member:''' Prepares data for adding a new team or adding members to an existing team.&lt;br /&gt;
* '''show:''' Retrieves and displays a team’s details.&lt;br /&gt;
* '''create:''' Persists a new team record.&lt;br /&gt;
* '''remove / remove_member:''' Handles deletion of teams or the removal of a specific member from a team.&lt;br /&gt;
* '''copy_to_assignment:''' Allows teams to be copied or migrated into the context of an assignment.&lt;br /&gt;
* '''empty:''' Checks if a team currently has no members, useful for certain validations or cleanup tasks.&lt;br /&gt;
&lt;br /&gt;
=== TeamsHelper ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
TeamsHelper provides shared view or utility methods that can be reused across different views related to teams. This might include form helpers, formatting functions, or any specialized logic that doesn’t belong directly in the controller or model. By extracting these methods into a helper, we keep our controllers lean and our views consistent.&lt;br /&gt;
&lt;br /&gt;
=== Validation / Utility ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
These are modules or classes that encapsulate common validation logic or utility functions. For example, methods may ensure that team size constraints are met or that certain data formats are respected. The TeamsController can call these utilities to keep business logic separate from controller actions.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Team is our base model, defining attributes and behaviors common to all team types. It maintains core relationships (like having many members) and implements fundamental methods that child classes can inherit or override.&lt;br /&gt;
&lt;br /&gt;
'''Key Methods:'''&lt;br /&gt;
* '''add_member(user):''' Adds a user to the team, performing basic checks like duplicate membership.&lt;br /&gt;
* '''remove_member(user):''' Removes a user from the team.&lt;br /&gt;
* '''size:''' Returns the current count of team members.&lt;br /&gt;
* '''empty?:''' Checks whether the team has no members, useful for validating if a team is still active or viable.&lt;br /&gt;
&lt;br /&gt;
Because Team is the parent class, it keeps the shared logic centralized, ensuring consistency across specialized team models.&lt;br /&gt;
&lt;br /&gt;
=== AssignmentTeam ===&lt;br /&gt;
'''Inherits From:''' Team&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
AssignmentTeam is designed for short-term or one-off teams formed specifically for an assignment. It enforces membership rules based on assignment criteria, such as whether a user is actually participating in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''add_assignment_member(user):''' Ensures the user is eligible for the assignment before joining.&lt;br /&gt;
* '''validate_team:''' Checks constraints like maximum size or required roles for an assignment.&lt;br /&gt;
&lt;br /&gt;
By keeping assignment-specific logic here, we avoid mixing it with course-level concerns.&lt;br /&gt;
&lt;br /&gt;
=== MentoredTeam ===&lt;br /&gt;
'''Inherits From:''' AssignmentTeam&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
MentoredTeam extends AssignmentTeam by adding a designated mentor role. This can be especially helpful for assignments requiring expert oversight or guidance.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''assign_mentor(user):''' Sets a mentor for the team after confirming they meet certain criteria (e.g., correct privileges or expertise).&lt;br /&gt;
* '''remove_mentor:''' Allows for unassigning a mentor if needed.&lt;br /&gt;
* '''mentor_validation:''' Ensures that the chosen mentor is valid for the assignment.&lt;br /&gt;
* '''view_team_with_mentor:''' Presents a combined view of the team members and mentor details.&lt;br /&gt;
&lt;br /&gt;
By placing mentor logic in its own subclass, we keep assignment-level functionality clean while MentoredTeam handles the extra mentorship features.&lt;br /&gt;
&lt;br /&gt;
=== Participant ===&lt;br /&gt;
'''Associations:'''&lt;br /&gt;
* '''belongs_to :team'''&lt;br /&gt;
* '''belongs_to :user'''&lt;br /&gt;
* '''belongs_to :assignment''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Participant acts as a linking model in some contexts, ensuring we can track which user belongs to which team for a given assignment or course. This model helps us keep membership records organized and may include additional data (like submission status or peer reviews).&lt;br /&gt;
&lt;br /&gt;
=== Final Notes ===&lt;br /&gt;
* '''Implementation &amp;amp; Testing:'''  &lt;br /&gt;
We have not yet implemented or tested the classes and methods described here. Once we begin coding, we will follow these designs closely and write RSpec tests to ensure all functionalities work as intended.&lt;br /&gt;
&lt;br /&gt;
* '''Code Readability &amp;amp; Documentation:'''  &lt;br /&gt;
We plan to maintain thorough inline documentation and adopt clear method names. This will make it easier for new contributors to understand and modify our team hierarchy.&lt;br /&gt;
&lt;br /&gt;
* '''Project Mentorship:'''  &lt;br /&gt;
Sahithi Ammana is providing guidance throughout this project, ensuring that our approach aligns with best practices and remains scalable for future needs.&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163434</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163434"/>
		<updated>2025-04-07T20:14:01Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
'''Template Method Pattern'''&lt;br /&gt;
&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure. It defines the foundation of fundamental team-related processes in a base class. This pattern is especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but implements its own unique logic.&lt;br /&gt;
&lt;br /&gt;
'''Where Will It Be Used?'''&lt;br /&gt;
# '''Base Class: Team'''  &lt;br /&gt;
Generic methods like `add_member`, `remove_member`, `copy_to`, and `empty?` will be defined by the `Team` class. These methods will use placeholder or hook methods, such as `validate_participant_type` or `handle_special_roles`, which will be implemented by subclasses, while adhering to a standard structure.&lt;br /&gt;
&lt;br /&gt;
# '''Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam'''  &lt;br /&gt;
These subclasses will define unique validations and behaviors by overriding the hook methods:&lt;br /&gt;
* `CourseTeam` will validate participants in the course.&lt;br /&gt;
* `AssignmentTeam` will define assignment-specific logic.&lt;br /&gt;
* `MentoredTeam` will take precedence over the member addition rationale to handle mentor responsibilities.&lt;br /&gt;
&lt;br /&gt;
'''Reason for Using Template Method:'''&lt;br /&gt;
* Promotes code reuse by including shared functionality in the main `Team` class.&lt;br /&gt;
* Enforces a consistent framework for all team operations.&lt;br /&gt;
* Allows customizable behavior in subclasses without duplicating code.&lt;br /&gt;
* Simplifies future enhancements by offering a scalable and maintainable solution (e.g., when introducing new team types).&lt;br /&gt;
&lt;br /&gt;
=== SOLID Principles ===&lt;br /&gt;
&lt;br /&gt;
'''Open/Closed Principle (OCP)'''&amp;lt;br&amp;gt;&lt;br /&gt;
The Open/Closed Principle states that software entities should be open for extension but closed for modification. This principle will be a core part of the Team hierarchy reimplementation.&amp;lt;br&amp;gt;&lt;br /&gt;
The Team base class in this project will be created so that when more team kinds are added, it doesn't need to be changed. Instead, by constructing subclasses like CourseTeam, AssignmentTeam, and MentoredTeam, developers will be able to expand the current structure.&amp;lt;br&amp;gt;&lt;br /&gt;
Without changing the shared logic specified in the Team base class, each subclass will extend or override particular methods (such as add_member, validate_participant_type, or copy_to). With this design, the basic class will continue to be dependable and robust while providing room for expansion and personalisation&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
&lt;br /&gt;
=== TeamsController ===&lt;br /&gt;
'''Inherits From:''' ApplicationController&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
The TeamsController is our main interface for handling team-related requests. It orchestrates creating, showing, updating, and removing teams while also providing actions for specific operations like copying teams to assignments. By extending ApplicationController, it leverages Rails conventions for RESTful endpoints.&lt;br /&gt;
&lt;br /&gt;
'''Key Actions (as referenced in the diagram):'''&lt;br /&gt;
* '''add / add_member:''' Prepares data for adding a new team or adding members to an existing team.&lt;br /&gt;
* '''show:''' Retrieves and displays a team’s details.&lt;br /&gt;
* '''create:''' Persists a new team record.&lt;br /&gt;
* '''remove / remove_member:''' Handles deletion of teams or the removal of a specific member from a team.&lt;br /&gt;
* '''copy_to_assignment:''' Allows teams to be copied or migrated into the context of an assignment.&lt;br /&gt;
* '''empty:''' Checks if a team currently has no members, useful for certain validations or cleanup tasks.&lt;br /&gt;
&lt;br /&gt;
=== TeamsHelper ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
TeamsHelper provides shared view or utility methods that can be reused across different views related to teams. This might include form helpers, formatting functions, or any specialized logic that doesn’t belong directly in the controller or model. By extracting these methods into a helper, we keep our controllers lean and our views consistent.&lt;br /&gt;
&lt;br /&gt;
=== Validation / Utility ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
These are modules or classes that encapsulate common validation logic or utility functions. For example, methods may ensure that team size constraints are met or that certain data formats are respected. The TeamsController can call these utilities to keep business logic separate from controller actions.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Team is our base model, defining attributes and behaviors common to all team types. It maintains core relationships (like having many members) and implements fundamental methods that child classes can inherit or override.&lt;br /&gt;
&lt;br /&gt;
'''Key Methods:'''&lt;br /&gt;
* '''add_member(user):''' Adds a user to the team, performing basic checks like duplicate membership.&lt;br /&gt;
* '''remove_member(user):''' Removes a user from the team.&lt;br /&gt;
* '''size:''' Returns the current count of team members.&lt;br /&gt;
* '''empty?:''' Checks whether the team has no members, useful for validating if a team is still active or viable.&lt;br /&gt;
&lt;br /&gt;
Because Team is the parent class, it keeps the shared logic centralized, ensuring consistency across specialized team models.&lt;br /&gt;
&lt;br /&gt;
=== AssignmentTeam ===&lt;br /&gt;
'''Inherits From:''' Team&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
AssignmentTeam is designed for short-term or one-off teams formed specifically for an assignment. It enforces membership rules based on assignment criteria, such as whether a user is actually participating in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''add_assignment_member(user):''' Ensures the user is eligible for the assignment before joining.&lt;br /&gt;
* '''validate_team:''' Checks constraints like maximum size or required roles for an assignment.&lt;br /&gt;
&lt;br /&gt;
By keeping assignment-specific logic here, we avoid mixing it with course-level concerns.&lt;br /&gt;
&lt;br /&gt;
=== MentoredTeam ===&lt;br /&gt;
'''Inherits From:''' AssignmentTeam&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
MentoredTeam extends AssignmentTeam by adding a designated mentor role. This can be especially helpful for assignments requiring expert oversight or guidance.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''assign_mentor(user):''' Sets a mentor for the team after confirming they meet certain criteria (e.g., correct privileges or expertise).&lt;br /&gt;
* '''remove_mentor:''' Allows for unassigning a mentor if needed.&lt;br /&gt;
* '''mentor_validation:''' Ensures that the chosen mentor is valid for the assignment.&lt;br /&gt;
* '''view_team_with_mentor:''' Presents a combined view of the team members and mentor details.&lt;br /&gt;
&lt;br /&gt;
By placing mentor logic in its own subclass, we keep assignment-level functionality clean while MentoredTeam handles the extra mentorship features.&lt;br /&gt;
&lt;br /&gt;
=== Participant ===&lt;br /&gt;
'''Associations:'''&lt;br /&gt;
* '''belongs_to :team'''&lt;br /&gt;
* '''belongs_to :user'''&lt;br /&gt;
* '''belongs_to :assignment''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Participant acts as a linking model in some contexts, ensuring we can track which user belongs to which team for a given assignment or course. This model helps us keep membership records organized and may include additional data (like submission status or peer reviews).&lt;br /&gt;
&lt;br /&gt;
=== Final Notes ===&lt;br /&gt;
* '''Implementation &amp;amp; Testing:'''  &lt;br /&gt;
We have not yet implemented or tested the classes and methods described here. Once we begin coding, we will follow these designs closely and write RSpec tests to ensure all functionalities work as intended.&lt;br /&gt;
&lt;br /&gt;
* '''Code Readability &amp;amp; Documentation:'''  &lt;br /&gt;
We plan to maintain thorough inline documentation and adopt clear method names. This will make it easier for new contributors to understand and modify our team hierarchy.&lt;br /&gt;
&lt;br /&gt;
* '''Project Mentorship:'''  &lt;br /&gt;
Sahithi Ammana is providing guidance throughout this project, ensuring that our approach aligns with best practices and remains scalable for future needs.&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163433</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163433"/>
		<updated>2025-04-07T20:12:54Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Overview of classes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
'''Template method pattern'''&amp;lt;br&amp;gt;&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure while defining the foundation of fundamental team-related processes in a base class. This pattern will be especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but has its own unique logic. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Where Will It Be Used? &amp;lt;br&amp;gt;&lt;br /&gt;
1. Base Class: Team &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like add_member, remove_member, copy_to, and empty? will be defined by the Team class. These methods will use placeholder or hook methods, such as validate_participant_type or handle_special_roles, which will be implemented by subclasses, and will adhere to a standard structure. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
2. Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviours by overriding the hook methods: &amp;lt;br&amp;gt;&lt;br /&gt;
- Participants in the course will be validated by CourseTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- Assignment-specific logic will be defined by AssignmentTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- To assign mentor responsibilities, MentoredTeam will take precedence over the member addition rationale. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Reason for using Template method: &amp;lt;br&amp;gt;&lt;br /&gt;
- Because the main Team class will include shared functionality, it will encourage code duplication. &amp;lt;br&amp;gt;&lt;br /&gt;
- For all team operations, it will impose a uniform framework. &amp;lt;br&amp;gt;&lt;br /&gt;
- Without needing code duplication, it will enable subclasses to exhibit customisable behaviour. &amp;lt;br&amp;gt;&lt;br /&gt;
- It will simplify future additions (for example, if more team types are developed) by offering a scalable and maintainable solution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SOLID Principles ===&lt;br /&gt;
&lt;br /&gt;
'''Open/Closed Principle (OCP)'''&amp;lt;br&amp;gt;&lt;br /&gt;
The Open/Closed Principle states that software entities should be open for extension but closed for modification. This principle will be a core part of the Team hierarchy reimplementation.&amp;lt;br&amp;gt;&lt;br /&gt;
The Team base class in this project will be created so that when more team kinds are added, it doesn't need to be changed. Instead, by constructing subclasses like CourseTeam, AssignmentTeam, and MentoredTeam, developers will be able to expand the current structure.&amp;lt;br&amp;gt;&lt;br /&gt;
Without changing the shared logic specified in the Team base class, each subclass will extend or override particular methods (such as add_member, validate_participant_type, or copy_to). With this design, the basic class will continue to be dependable and robust while providing room for expansion and personalisation&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
&lt;br /&gt;
=== TeamsController ===&lt;br /&gt;
'''Inherits From:''' ApplicationController&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
The TeamsController is our main interface for handling team-related requests. It orchestrates creating, showing, updating, and removing teams while also providing actions for specific operations like copying teams to assignments. By extending ApplicationController, it leverages Rails conventions for RESTful endpoints.&lt;br /&gt;
&lt;br /&gt;
'''Key Actions (as referenced in the diagram):'''&lt;br /&gt;
* '''add / add_member:''' Prepares data for adding a new team or adding members to an existing team.&lt;br /&gt;
* '''show:''' Retrieves and displays a team’s details.&lt;br /&gt;
* '''create:''' Persists a new team record.&lt;br /&gt;
* '''remove / remove_member:''' Handles deletion of teams or the removal of a specific member from a team.&lt;br /&gt;
* '''copy_to_assignment:''' Allows teams to be copied or migrated into the context of an assignment.&lt;br /&gt;
* '''empty:''' Checks if a team currently has no members, useful for certain validations or cleanup tasks.&lt;br /&gt;
&lt;br /&gt;
=== TeamsHelper ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
TeamsHelper provides shared view or utility methods that can be reused across different views related to teams. This might include form helpers, formatting functions, or any specialized logic that doesn’t belong directly in the controller or model. By extracting these methods into a helper, we keep our controllers lean and our views consistent.&lt;br /&gt;
&lt;br /&gt;
=== Validation / Utility ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
These are modules or classes that encapsulate common validation logic or utility functions. For example, methods may ensure that team size constraints are met or that certain data formats are respected. The TeamsController can call these utilities to keep business logic separate from controller actions.&lt;br /&gt;
&lt;br /&gt;
=== Team ===&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Team is our base model, defining attributes and behaviors common to all team types. It maintains core relationships (like having many members) and implements fundamental methods that child classes can inherit or override.&lt;br /&gt;
&lt;br /&gt;
'''Key Methods:'''&lt;br /&gt;
* '''add_member(user):''' Adds a user to the team, performing basic checks like duplicate membership.&lt;br /&gt;
* '''remove_member(user):''' Removes a user from the team.&lt;br /&gt;
* '''size:''' Returns the current count of team members.&lt;br /&gt;
* '''empty?:''' Checks whether the team has no members, useful for validating if a team is still active or viable.&lt;br /&gt;
&lt;br /&gt;
Because Team is the parent class, it keeps the shared logic centralized, ensuring consistency across specialized team models.&lt;br /&gt;
&lt;br /&gt;
=== AssignmentTeam ===&lt;br /&gt;
'''Inherits From:''' Team&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
AssignmentTeam is designed for short-term or one-off teams formed specifically for an assignment. It enforces membership rules based on assignment criteria, such as whether a user is actually participating in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''add_assignment_member(user):''' Ensures the user is eligible for the assignment before joining.&lt;br /&gt;
* '''validate_team:''' Checks constraints like maximum size or required roles for an assignment.&lt;br /&gt;
&lt;br /&gt;
By keeping assignment-specific logic here, we avoid mixing it with course-level concerns.&lt;br /&gt;
&lt;br /&gt;
=== MentoredTeam ===&lt;br /&gt;
'''Inherits From:''' AssignmentTeam&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
MentoredTeam extends AssignmentTeam by adding a designated mentor role. This can be especially helpful for assignments requiring expert oversight or guidance.&lt;br /&gt;
&lt;br /&gt;
'''Possible Additions/Overrides:'''&lt;br /&gt;
* '''assign_mentor(user):''' Sets a mentor for the team after confirming they meet certain criteria (e.g., correct privileges or expertise).&lt;br /&gt;
* '''remove_mentor:''' Allows for unassigning a mentor if needed.&lt;br /&gt;
* '''mentor_validation:''' Ensures that the chosen mentor is valid for the assignment.&lt;br /&gt;
* '''view_team_with_mentor:''' Presents a combined view of the team members and mentor details.&lt;br /&gt;
&lt;br /&gt;
By placing mentor logic in its own subclass, we keep assignment-level functionality clean while MentoredTeam handles the extra mentorship features.&lt;br /&gt;
&lt;br /&gt;
=== Participant ===&lt;br /&gt;
'''Associations:'''&lt;br /&gt;
* '''belongs_to :team'''&lt;br /&gt;
* '''belongs_to :user'''&lt;br /&gt;
* '''belongs_to :assignment''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
'''Purpose:'''  &lt;br /&gt;
Participant acts as a linking model in some contexts, ensuring we can track which user belongs to which team for a given assignment or course. This model helps us keep membership records organized and may include additional data (like submission status or peer reviews).&lt;br /&gt;
&lt;br /&gt;
=== Final Notes ===&lt;br /&gt;
* '''Implementation &amp;amp; Testing:'''  &lt;br /&gt;
We have not yet implemented or tested the classes and methods described here. Once we begin coding, we will follow these designs closely and write RSpec tests to ensure all functionalities work as intended.&lt;br /&gt;
&lt;br /&gt;
* '''Code Readability &amp;amp; Documentation:'''  &lt;br /&gt;
We plan to maintain thorough inline documentation and adopt clear method names. This will make it easier for new contributors to understand and modify our team hierarchy.&lt;br /&gt;
&lt;br /&gt;
* '''Project Mentorship:'''  &lt;br /&gt;
Sahithi Ammana is providing guidance throughout this project, ensuring that our approach aligns with best practices and remains scalable for future needs.&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163432</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163432"/>
		<updated>2025-04-07T20:08:05Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Overview of classes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
'''Template method pattern'''&amp;lt;br&amp;gt;&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure while defining the foundation of fundamental team-related processes in a base class. This pattern will be especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but has its own unique logic. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Where Will It Be Used? &amp;lt;br&amp;gt;&lt;br /&gt;
1. Base Class: Team &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like add_member, remove_member, copy_to, and empty? will be defined by the Team class. These methods will use placeholder or hook methods, such as validate_participant_type or handle_special_roles, which will be implemented by subclasses, and will adhere to a standard structure. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
2. Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviours by overriding the hook methods: &amp;lt;br&amp;gt;&lt;br /&gt;
- Participants in the course will be validated by CourseTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- Assignment-specific logic will be defined by AssignmentTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- To assign mentor responsibilities, MentoredTeam will take precedence over the member addition rationale. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Reason for using Template method: &amp;lt;br&amp;gt;&lt;br /&gt;
- Because the main Team class will include shared functionality, it will encourage code duplication. &amp;lt;br&amp;gt;&lt;br /&gt;
- For all team operations, it will impose a uniform framework. &amp;lt;br&amp;gt;&lt;br /&gt;
- Without needing code duplication, it will enable subclasses to exhibit customisable behaviour. &amp;lt;br&amp;gt;&lt;br /&gt;
- It will simplify future additions (for example, if more team types are developed) by offering a scalable and maintainable solution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SOLID Principles ===&lt;br /&gt;
&lt;br /&gt;
'''Open/Closed Principle (OCP)'''&amp;lt;br&amp;gt;&lt;br /&gt;
The Open/Closed Principle states that software entities should be open for extension but closed for modification. This principle will be a core part of the Team hierarchy reimplementation.&amp;lt;br&amp;gt;&lt;br /&gt;
The Team base class in this project will be created so that when more team kinds are added, it doesn't need to be changed. Instead, by constructing subclasses like CourseTeam, AssignmentTeam, and MentoredTeam, developers will be able to expand the current structure.&amp;lt;br&amp;gt;&lt;br /&gt;
Without changing the shared logic specified in the Team base class, each subclass will extend or override particular methods (such as add_member, validate_participant_type, or copy_to). With this design, the basic class will continue to be dependable and robust while providing room for expansion and personalisation&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163431</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163431"/>
		<updated>2025-04-07T20:06:55Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
'''Template method pattern'''&amp;lt;br&amp;gt;&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure while defining the foundation of fundamental team-related processes in a base class. This pattern will be especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but has its own unique logic. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Where Will It Be Used? &amp;lt;br&amp;gt;&lt;br /&gt;
1. Base Class: Team &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like add_member, remove_member, copy_to, and empty? will be defined by the Team class. These methods will use placeholder or hook methods, such as validate_participant_type or handle_special_roles, which will be implemented by subclasses, and will adhere to a standard structure. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
2. Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviours by overriding the hook methods: &amp;lt;br&amp;gt;&lt;br /&gt;
- Participants in the course will be validated by CourseTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- Assignment-specific logic will be defined by AssignmentTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- To assign mentor responsibilities, MentoredTeam will take precedence over the member addition rationale. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Reason for using Template method: &amp;lt;br&amp;gt;&lt;br /&gt;
- Because the main Team class will include shared functionality, it will encourage code duplication. &amp;lt;br&amp;gt;&lt;br /&gt;
- For all team operations, it will impose a uniform framework. &amp;lt;br&amp;gt;&lt;br /&gt;
- Without needing code duplication, it will enable subclasses to exhibit customisable behaviour. &amp;lt;br&amp;gt;&lt;br /&gt;
- It will simplify future additions (for example, if more team types are developed) by offering a scalable and maintainable solution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SOLID Principles ===&lt;br /&gt;
&lt;br /&gt;
'''Open/Closed Principle (OCP)'''&amp;lt;br&amp;gt;&lt;br /&gt;
The Open/Closed Principle states that software entities should be open for extension but closed for modification. This principle will be a core part of the Team hierarchy reimplementation.&amp;lt;br&amp;gt;&lt;br /&gt;
The Team base class in this project will be created so that when more team kinds are added, it doesn't need to be changed. Instead, by constructing subclasses like CourseTeam, AssignmentTeam, and MentoredTeam, developers will be able to expand the current structure.&amp;lt;br&amp;gt;&lt;br /&gt;
Without changing the shared logic specified in the Team base class, each subclass will extend or override particular methods (such as add_member, validate_participant_type, or copy_to). With this design, the basic class will continue to be dependable and robust while providing room for expansion and personalisation&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163430</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163430"/>
		<updated>2025-04-07T20:05:02Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
Template method pattern: &amp;lt;br&amp;gt;&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure while defining the foundation of fundamental team-related processes in a base class. This pattern will be especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but has its own unique logic. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Where Will It Be Used? &amp;lt;br&amp;gt;&lt;br /&gt;
1. Base Class: Team &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like add_member, remove_member, copy_to, and empty? will be defined by the Team class. These methods will use placeholder or hook methods, such as validate_participant_type or handle_special_roles, which will be implemented by subclasses, and will adhere to a standard structure. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
2. Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviours by overriding the hook methods: &amp;lt;br&amp;gt;&lt;br /&gt;
- Participants in the course will be validated by CourseTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- Assignment-specific logic will be defined by AssignmentTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- To assign mentor responsibilities, MentoredTeam will take precedence over the member addition rationale. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Reason for using Template method: &amp;lt;br&amp;gt;&lt;br /&gt;
- Because the main Team class will include shared functionality, it will encourage code duplication. &amp;lt;br&amp;gt;&lt;br /&gt;
- For all team operations, it will impose a uniform framework. &amp;lt;br&amp;gt;&lt;br /&gt;
- Without needing code duplication, it will enable subclasses to exhibit customisable behaviour. &amp;lt;br&amp;gt;&lt;br /&gt;
- It will simplify future additions (for example, if more team types are developed) by offering a scalable and maintainable solution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163429</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163429"/>
		<updated>2025-04-07T20:04:27Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
Template method pattern: &amp;lt;br&amp;gt;&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure while defining the foundation of fundamental team-related processes in a base class. This pattern will be especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but has its own unique logic. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Where Will It Be Used? &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
1. Base Class: Team &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like add_member, remove_member, copy_to, and empty? will be defined by the Team class. These methods will use placeholder or hook methods, such as validate_participant_type or handle_special_roles, which will be implemented by subclasses, and will adhere to a standard structure. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
2. Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviours by overriding the hook methods: &amp;lt;br&amp;gt;&lt;br /&gt;
- Participants in the course will be validated by CourseTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- Assignment-specific logic will be defined by AssignmentTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- To assign mentor responsibilities, MentoredTeam will take precedence over the member addition rationale. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Reason for using Template method: &amp;lt;br&amp;gt;&lt;br /&gt;
- Because the main Team class will include shared functionality, it will encourage code duplication. &amp;lt;br&amp;gt;&lt;br /&gt;
- For all team operations, it will impose a uniform framework. &amp;lt;br&amp;gt;&lt;br /&gt;
- Without needing code duplication, it will enable subclasses to exhibit customisable behaviour. &amp;lt;br&amp;gt;&lt;br /&gt;
- It will simplify future additions (for example, if more team types are developed) by offering a scalable and maintainable solution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163428</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163428"/>
		<updated>2025-04-07T20:03:59Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patterns ===&lt;br /&gt;
&lt;br /&gt;
Template method pattern: &amp;lt;br&amp;gt;&lt;br /&gt;
This project will use the Template Method Pattern, which allows subclasses to override certain stages without changing the general structure while defining the foundation of fundamental team-related processes in a base class. This pattern will be especially useful for creating a uniform but adaptable team hierarchy architecture, where each team type adheres to the same overall process but has its own unique logic. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Where Will It Be Used? &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Base Class: Team &amp;lt;br&amp;gt;&lt;br /&gt;
Generic methods like add_member, remove_member, copy_to, and empty? will be defined by the Team class. These methods will use placeholder or hook methods, such as validate_participant_type or handle_special_roles, which will be implemented by subclasses, and will adhere to a standard structure. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Subclasses: CourseTeam, AssignmentTeam, and MentoredTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
These subclasses will define unique validations and behaviours by overriding the hook methods: &amp;lt;br&amp;gt;&lt;br /&gt;
- Participants in the course will be validated by CourseTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- Assignment-specific logic will be defined by AssignmentTeam. &amp;lt;br&amp;gt;&lt;br /&gt;
- To assign mentor responsibilities, MentoredTeam will take precedence over the member addition rationale. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Reason for using Template method: &amp;lt;br&amp;gt;&lt;br /&gt;
- Because the main Team class will include shared functionality, it will encourage code duplication. &amp;lt;br&amp;gt;&lt;br /&gt;
- For all team operations, it will impose a uniform framework. &amp;lt;br&amp;gt;&lt;br /&gt;
- Without needing code duplication, it will enable subclasses to exhibit customisable behaviour. &amp;lt;br&amp;gt;&lt;br /&gt;
- It will simplify future additions (for example, if more team types are developed) by offering a scalable and maintainable solution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163427</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163427"/>
		<updated>2025-04-07T19:58:39Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* teams_helper.rb methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
1.	Valid_member?(user, team_type) – It will check if a user is valid for a given team type (e.g., participant type matches).&amp;lt;br&amp;gt;&lt;br /&gt;
2.	team_full?(team) – It will cehck if the team has reached max size.&amp;lt;br&amp;gt;&lt;br /&gt;
3.	sanitize_team_params() – It will ensure only permitted params are accepted for team creation.&amp;lt;br&amp;gt;&lt;br /&gt;
4.	mentor_of?(user, team) – It will check if a user is the designated mentor (MentoredTeam only).&amp;lt;br&amp;gt;&lt;br /&gt;
5.	copy_team_structure() – It will be used for copying team members and metadata.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163426</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163426"/>
		<updated>2025-04-07T19:57:28Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== teams_helper.rb methods ===&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163425</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163425"/>
		<updated>2025-04-07T19:56:35Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* teams_controller.rb: Method / API calls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! # !! Method !! Endpoint !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || index || GET /teams/:type || Return a list of teams of a specific type (CourseTeam / AssignmentTeam)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || show || GET /teams/:id || Return details of a specific team&lt;br /&gt;
|-&lt;br /&gt;
| 3 || create || POST /teams || Create a new team&lt;br /&gt;
|-&lt;br /&gt;
| 4 || add_members || PATCH /teams/:id/add_member || Add a participant to a team&lt;br /&gt;
|-&lt;br /&gt;
| 5 || remove_member || DELETE /teams/:id/remove_member/:participant_id || Remove a participant from a team&lt;br /&gt;
|-&lt;br /&gt;
| 6 || copy_to_assignment || POST /teams/:id/copy_to_assignment/:assignment_id || Copy a course team to a new assignment team&lt;br /&gt;
|-&lt;br /&gt;
| 7 || check_size || GET /teams/:id/size || Return current size of the team&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Empty || GET /teams/:id/empty || Returns true/false if the team has no members&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163423</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163423"/>
		<updated>2025-04-07T19:55:18Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* teams_controller.rb: Method / API calls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
=== teams_controller.rb: Method / API calls ===&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163422</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163422"/>
		<updated>2025-04-07T19:55:02Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
== teams_controller.rb: Method / API calls ==&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163421</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163421"/>
		<updated>2025-04-07T19:54:10Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
[[File:E2533 ControllerDiagram.jpg|center|500px|Controller, Helper, and Model Interaction Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E2533_ControllerDiagram.jpg&amp;diff=163420</id>
		<title>File:E2533 ControllerDiagram.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E2533_ControllerDiagram.jpg&amp;diff=163420"/>
		<updated>2025-04-07T19:52:01Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163419</id>
		<title>CSC/ECE 517 Spring 2025 - E2533. ​​Reimplement the Team hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2025_-_E2533._%E2%80%8B%E2%80%8BReimplement_the_Team_hierarchy&amp;diff=163419"/>
		<updated>2025-04-07T19:51:24Z</updated>

		<summary type="html">&lt;p&gt;Avdoshi: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki page for E2533 - reimplementing the Team hierarchy&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
 &lt;br /&gt;
'''Expertiza''' is an open-source platform developed with the Ruby on Rails MVC framework, aimed at supporting peer review and group-based learning. Over time, the project has evolved through several updates, with current work centered on restructuring the code to boost maintainability, performance, and scalability. There are also plans to develop a redesigned version of Expertiza to modernize its architecture and expand its features.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Team hierarchy consists of classes that manage student teams within Expertiza. These teams can reserve topics and submit assignments. The hierarchy includes four classes: Team (the superclass), CourseTeam, AssignmentTeam, and MentoredTeam. Since all functional teams belong to one of the three subclasses, direct instances of the Team superclass should never be created.&lt;br /&gt;
&lt;br /&gt;
CourseTeams remain intact throughout a course, collaborating on all assignments. While some instructors opt not to use them, others find CourseTeams beneficial, especially in Team-Based Learning environments. These teams can be converted into AssignmentTeams (and vice versa) as needed.&lt;br /&gt;
&lt;br /&gt;
AssignmentTeams are formed specifically for individual assignments. However, if an assignment is configured to automatically assign mentors, teams are instantiated as MentoredTeams—a subclass of AssignmentTeam with a designated mentor guiding the group.&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
This project seeks to modernize and streamline Expertiza’s Team hierarchy, transforming it into a leaner, more intuitive system by eliminating legacy inefficiencies. The current design suffers from code bloat, tangled dependencies, and duplicated logic, particularly in the Team and AssignmentTeam classes, which host numerous overlapping methods. By rearchitecting the hierarchy, we will enforce cleaner inheritance, remove redundant functions, and introduce a more flexible team membership model—shifting from Users to Participants for better alignment with the platform’s evolving structure. The overhaul will emphasize modularity, maintainability, and scalability, ensuring a robust foundation for future enhancements. Through principled object-oriented design, we will redefine relationships between CourseTeam, AssignmentTeam, and MentoredTeam, optimizing their interactions while preserving functionality. The end goal is a decluttered, high-performance team management system that supports seamless collaboration across courses and assignments.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The project requires the implementation of a well-structured team hierarchy with clearly defined responsibilities. First, a Base Team Class must be created to serve as the parent class, encapsulating core team functionality such as managing members (adding/removing), checking team size, and verifying if a team is empty. Specialized subclasses — CourseTeam.rb (persisting throughout a course), AssignmentTeam,rb (assignment-specific), and MentoredTeam.rb (mentor-included variant of AssignmentTeam) must be implemented with distinct behaviors while inheriting shared logic. Team membership rules must enforce valid user assignments, ensuring course participants are correctly mapped to CourseTeams and assignment participants to AssignmentTeams. Additionally, team operations must support copying teams between categories (e.g., converting a CourseTeam to an AssignmentTeam) while maintaining data integrity. Comprehensive RSpec tests must validate all team operations, including edge cases like exceeding team limits or handling empty teams. Finally, code readability and documentation are critical—methods should be self-documenting with clear naming conventions, supplemented by detailed comments explaining complex logic. The implementation must prioritize modularity, maintainability, and adherence to object-oriented principles to ensure long-term scalability.&lt;br /&gt;
&lt;br /&gt;
== Existing Issues ==&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
=== Controller diagram ===&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the interaction between the controller, helper, and models in the proposed Team hierarchy reimplementation. The controller acts as the main entry point for all team-related API calls, delegating logic to helpers and interacting with the appropriate Team subclass.&lt;br /&gt;
&lt;br /&gt;
== Overview of classes ==&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor''' &amp;lt;/br&amp;gt;&lt;br /&gt;
Sahithi Ammana&lt;br /&gt;
&lt;br /&gt;
'''Team Members '''&lt;br /&gt;
* Dhruv Soni (dbsoni)&lt;br /&gt;
* Ananya Doshi (avdoshi)&lt;br /&gt;
* Udita Raychaudhury (uraycha)&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;/div&gt;</summary>
		<author><name>Avdoshi</name></author>
	</entry>
</feed>