CSC/ECE 517 Spring 2024 - E2403 Mentor-Meeting Management (Phase 2)

From Expertiza_Wiki
Jump to navigation Jump to search

Expertiza

Expertiza is a Ruby on Rails based open source project. Instructors have the ability to add new projects, assignments, etc., as well as edit existing ones. Later on, they can view student submissions and grade them. Students can also use Expertiza to organize into teams to work on different projects and assignments and submit their work. They can also review other students' submissions.

Introduction

This project is the continuation of E2304 for the implementation of the Mentor-meeting management in the Expertiza system for mentored teams. We are now required to add functionality to add mentors to the topics and then assign them to the teams when they pick up that topic.

Problem Statement

The following tasks are required for the project:

  1. Enhancing Code Clarity: This involves renaming methods from Project 3 with ambiguous names, optimizing loops and adding comments for unclear lines of code
  2. Reimplement Mentored teams: Reimplement the Mentored team delegate to the Assignment team to reduce complexity and to follow best principles of Object Oriented Design
  3. Reimplement Sign Up Sheet or Topics: Reimplement the SignUpSheet controller to automatically add the mentor to when a topic is created and automatically assign the same mentor to a team when they choose the topic
  4. Writing tests for mentor meetings models: More tests have to be written for Mentor Meeting model
  5. Writing tests for the mentor meetings controller: More tests should be written for Mentor meeting controller
  6. Writing tests for the signup sheet controller: Additional tests should be written for signup sheet controller to test the new functionality

Objectives

We have 3 main objectives for this project.

  • Refactoring of the Mentor-meeting model and controller created for the Project 3
  • Reimplementation of Mentored Teams model and controller for the Project 4
  • Reimplementation of SignUp Sheet controller for the Project 4 to automatically assign mentors to the topics

Design Goal

While fulfilling all the objectives, the following design rules have to be ensured:

  • Validate proper functioning of all existing and anticipated methods, making any required enhancements or adjustments.
  • Establish loose coupling and tight cohesion for the model and controller to enhance code organization and maintainability.
  • Refactor redundant code in the previous implementation's controller and model methods using DRY principle, eliminating functionality duplication already present in the Expertiza system.
  • Confirm the continued effectiveness of existing test cases following the aforementioned modifications and generate additional test cases as per the need.

Class UML Diagram

Classes and Relationships

Existing Structure

  • Every Assignment has a Node
  • Every Assignment has many AssignmentTeam and MentoredTeam
  • AssignmentTeam is inherited from Team
  • MentoredTeam is inherited from AssignmentTeam
  • Every MentoredTeam has many MentorMeeting

Proposed Structure Structure

  • MentoredTeam to be delegated from AssignmentTeam instead of inheriting from it

Implementation Plan

Modify newly created controller, model and view

mentor_meeting_controller.rb

  • Edit function names to make them more descriptive
  • Add more descriptive comments for the functions

mentor_meetings_helper.rb

  • Move the "get_dates_for_team" function to the model
  • Rename the function to make it more descriptive

_entry_assignments.html.erb

  • Add more descriptive comments for the JavaScript functions
  • Move the Ruby code from the template to a helper or the controller

mentored_team.rb

  • This file needs to be modified to implement the functionality of delegation instead of inheritance
  • The "add_member" method must function as previously intended during reimplementation

Modify existing controller model and view

teams/_team.html.erb

  • As the mentored team will now be delegated from the assignment team, we need to change the if condition on the top as we are changing MentoredTeam to be delegated from the AssignmentTeam

teams_controller.rb

  • This file has to be modified to work with the delegated MentoredTeam
  • These lines will not work as MentoredTeam will not be a model

sign_up_sheet_controller.rb

  • This controller has to be modified to automatically assign mentors or manually add mentors to the topics when they are created
  • This will be followed by a change in schema

_topic.html.erb

  • If we manually have to assign mentors to the topic, we have to include a input field to enter the mentor

schema.rb

  • As we are adding a new field to the table, we need to modify the schema
  • We need to write 1 migration to add the field to the table to update the schema file

Implementation

Test Login Credentials

  • UserId: instructor6
  • Password: password

Team

Mentor

  • Ed Gehringer (efg)

Team Members

  • Samuel Kwiatkowski-Martin (slkwiatk)
  • Tanmay Pardeshi (tpardes)
  • Bala Logesh Sudalaimuthu Pandian (bsudala)