<?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=Gwteague</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=Gwteague"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Gwteague"/>
	<updated>2026-09-30T09:48:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2485._Allow_reviewers_to_bid_on_what_to_review&amp;diff=160832</id>
		<title>CSC/ECE 517 Fall 2024 - E2485. Allow reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2485._Allow_reviewers_to_bid_on_what_to_review&amp;diff=160832"/>
		<updated>2024-12-05T04:18:28Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* Refactor ReviewBid Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project Overview ==&lt;br /&gt;
&lt;br /&gt;
This project will fix the defects and improve the functionality in Expertiza of the Reviewer Bidding feature, a process where reviewers can bid for assignments they want to review. It will make the functionality smoother, more reliable, and align with Expertiza's collaborative learning objectives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;iii.-problem-statements&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statements ==&lt;br /&gt;
&lt;br /&gt;
Assigning reviews to users on Expertiza involves a complex bidding algorithm that requires optimization before production deployment. Below are key areas we plan to address as per the project requirements:&lt;br /&gt;
* Code Refactoring and Best Practices&lt;br /&gt;
** '''Utilize Authentication Utilities''': Modify the &amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; function in the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; to use existing authentication utilities, enhancing code reusability and adhering to the Single Responsibility Principle (SRP) and Separation of Concerns (SoC).&lt;br /&gt;
** '''Eliminate Code Duplication''': Refactor &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; to comply with the Don't Repeat Yourself (DRY) principle.&lt;br /&gt;
** '''Rename Functions for Clarity''': Change &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; to better reflect its purpose.&lt;br /&gt;
** '''Refactor Methods in '''&amp;lt;code&amp;gt;review_bid.rb&amp;lt;/code&amp;gt;''':''': Convert class methods to instance methods or relocate them to helper classes for improved code organization.&lt;br /&gt;
* Functionality Enhancements&lt;br /&gt;
** '''Handle Missing Bids Gracefully''': Adjust the bidding algorithm to accommodate students who do not bid, allowing them to select from the remaining options.&lt;br /&gt;
** '''Support Both Individual and Team Assignments''': Ensure the code functions correctly for participant and team-based assignments when signing up for topics.&lt;br /&gt;
* User Interface Improvements&lt;br /&gt;
** '''Increase Transparency in the Bidding Process''': Display messages indicating how many students are eligible to bid, how many have submitted bids, and the deadline.&lt;br /&gt;
** '''Accurate Bid Status Indicators''': Ensure topic colors change correctly based on the number of outstanding bids, providing clear visual feedback to users.&lt;br /&gt;
* Testing and Validation&lt;br /&gt;
** '''Exhaustive Edge Case Testing''': Conduct thorough testing for edge cases not previously covered, adding additional test cases as needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;iv.-design-goals&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
&lt;br /&gt;
While addressing the existing defects and enhancing the Reviewer Bidding feature, we plan to adhere to the following design guidelines:&lt;br /&gt;
&lt;br /&gt;
* Code Quality and Maintainability&lt;br /&gt;
** '''Improve Code Structure: '''Implement refactoring strategies to enhance code readability and maintainability, ensuring adherence to best practices like the DRY principle.&lt;br /&gt;
** '''Standardize Authentication Logic: '''Utilize a centralized authentication utility to promote consistency and reusability across the application.&lt;br /&gt;
* System Stability and Flexibility&lt;br /&gt;
** '''Enhance Algorithm Robustness: '''Modify the bidding algorithm to handle scenarios where students do not bid, ensuring the system remains stable under all conditions.&lt;br /&gt;
** '''Ensure Assignment Versatility: '''Design the system to seamlessly support both individual and team assignments without additional configuration.&lt;br /&gt;
* User Experience Enhancements&lt;br /&gt;
** '''Increase Bidding Transparency: '''Develop user interface elements that clearly display bidding status, deadlines, and participation metrics.&lt;br /&gt;
** '''Implement Dynamic Visual Feedback: '''Use real-time visual cues, such as color changes, to inform users about the bidding status instantly.&lt;br /&gt;
* Testing and Validation&lt;br /&gt;
** '''Develop Comprehensive Test Suites: '''Create extensive automated tests covering edge cases and critical functionalities to guarantee reliable system behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;v.-uml-diagram&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UML Diagram ==&lt;br /&gt;
&lt;br /&gt;
Below is a visual representation of the models associated with the review bids functionality, depicting the data structures and their relationships.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml class diagram2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi.-implementation&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
'''ReviewBid: '''The &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; manages the bidding process, where participants indicate their preferences for reviewing different topics or assignments. This helps distribute review tasks fairly based on participants' interests.&lt;br /&gt;
&lt;br /&gt;
'''Assignment: '''The &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; model represents team or individual assignments in Expertiza. It stores all the essential information required to keep the assignment process organized, like managing participants, setting due dates, forming teams, and overseeing the review process.&lt;br /&gt;
&lt;br /&gt;
'''SignUpTopic: '''The &amp;lt;code&amp;gt;SignUpTopic&amp;lt;/code&amp;gt; model identifies specific topics or areas within an assignment for which participants can sign up. It manages the availability of these topics, tracks bids, coordinates team sign-ups, and assigns topics based on both bids and participant availability. &lt;br /&gt;
&lt;br /&gt;
'''Participant: '''The &amp;lt;code&amp;gt;Participant&amp;lt;/code&amp;gt; model is about the individual users who participate in an assignment. This includes students, instructors, teaching assistants, or other relevant roles. This model is responsible for managing key user information, monitoring interactions with the assignment, keeping track of team memberships, and recording things like badges and review grades.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-1.-decoupling-authorization-logic-from-reviewbidscontroller&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Decoupling Authorization Logic from &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| '''&amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; needs to use the authentication utilities'''&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; should use the available authentication utilities to support the Single Responsibility Principle and Separation of Concerns and to support code reusability.&lt;br /&gt;
&lt;br /&gt;
| '''Authentication Consistency:''' Remove authentication logic in the controller and call logic in the authentication utility class instead to ensure consistent use of the same logic across the application, foster reusability, and eliminate DRY.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
==== Authorization Flow Before Refactoring ====&lt;br /&gt;
The sequence diagram depicts the authorization process within the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt;. When a user invokes an action, the controller checks if the action is allowed by verifying the user's role through the &amp;lt;code&amp;gt;current_role_name()&amp;lt;/code&amp;gt; method in the &amp;lt;code&amp;gt;ApplicationController&amp;lt;/code&amp;gt;. Depending on the action and the user's role, the controller either authorizes the user to proceed or denies access, ultimately executing the action logic if authorized and responding to the user.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml sequence 1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-1-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We simplified the &amp;lt;code&amp;gt;action_allowed?&amp;lt;/code&amp;gt; method by decoupling authorization logic from the controller to use helper methods in the &amp;lt;code&amp;gt;AuthorizationHelper&amp;lt;/code&amp;gt; module. The &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; should not handle authentication, which is a violation of SRP. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;vertical-align:top;&amp;quot; | Original Code !! style=&amp;quot;vertical-align:top;&amp;quot; | Refactored Code&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div style=&amp;quot;vertical-align:top;&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
def action_allowed?&lt;br /&gt;
  case params[:action]&lt;br /&gt;
  when 'show', 'set_priority', 'index'&lt;br /&gt;
    ['Instructor',&lt;br /&gt;
     'Teaching Assistant',&lt;br /&gt;
     'Administrator',&lt;br /&gt;
     'Super-Administrator',&lt;br /&gt;
     'Student'].include? current_role_name and&lt;br /&gt;
        ((%w[list].include? action_name) ? are_needed_authorizations_present?(params[:id], &amp;quot;participant&amp;quot;, &amp;quot;reader&amp;quot;, &amp;quot;submitter&amp;quot;, &amp;quot;reviewer&amp;quot;) : true)&lt;br /&gt;
  else&lt;br /&gt;
    ['Instructor',&lt;br /&gt;
     'Teaching Assistant',&lt;br /&gt;
     'Administrator',&lt;br /&gt;
     'Super-Administrator'].include? current_role_name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|| &amp;lt;div style=&amp;quot;vertical-align:top;&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
def action_allowed?&lt;br /&gt;
  case params[:action]&lt;br /&gt;
  when 'show', 'set_priority', 'index', 'list'&lt;br /&gt;
    current_user_has_student_privileges? &amp;amp;&amp;amp; list_authorization_check&lt;br /&gt;
  else&lt;br /&gt;
    current_user_has_ta_privileges?&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Optimize &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; Functionality ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; is a DRY violation'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The function &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; violates DRY.&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-1.-signupsheetcontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
The ReviewBidsController's index method renders the review_bids_others_work action in &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt;. However, the &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; does not include the controller action for this view. We need to find the old implementation of the controller action, add it back, and review and update it for any DRY violations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # provides variables for reviewing page located at views/review_bids/others_work.html.erb&lt;br /&gt;
  def index&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
&lt;br /&gt;
    # Finding how many reviews have been completed&lt;br /&gt;
    @num_reviews_completed = 0&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      @num_reviews_completed += 1 if !map.response.empty? &amp;amp;&amp;amp; map.response.last.is_submitted&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # render view for completing reviews after review bidding has been completed&lt;br /&gt;
    render 'sign_up_sheet/review_bids_others_work'&lt;br /&gt;
  end  &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-2.-reviewbidsotherswork-view-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;review_bids_others_work.html.erb&amp;lt;/code&amp;gt; View Updates ====&lt;br /&gt;
&lt;br /&gt;
The code only contains a view with this name and no associated controller action. Reviewing the code in the view, we noticed some SRP violations where there is much logic in the presentation layer. Set up helper methods in the controller to handle some of that logic or see if the model can handle some of that logic.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-3.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rename &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; method ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; should be &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt;&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:''' Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The primary activity here is to refactor the method name &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; and fix the hardcoded URL. However, the match topic bidding algorithm no longer works since Heroku is no longer free, per the professor. The reference link below has detailed information about the web service that we can leverage to gain that understanding.&lt;br /&gt;
&lt;br /&gt;
Reference Link for Webservice Details: [https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2085._Allow_reviewers_to_bid_on_what_to_review &amp;lt;u&amp;gt;match_topics webservice link details&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-3-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to rename the &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; method to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; to make the functionality of the method clear. We also plan to verify that the method is working appropriately by mocking up the service call since it is no longer working.&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # Other methods&lt;br /&gt;
&lt;br /&gt;
  # Call webserver for running the assigning algorithm&lt;br /&gt;
  # Passing to webserver:&lt;br /&gt;
  # - student_ids&lt;br /&gt;
  # - topic_ids&lt;br /&gt;
  # - student_preferences&lt;br /&gt;
  # - time_stamps&lt;br /&gt;
  # Webserver returns:&lt;br /&gt;
  # - matched assignments as JSON body&lt;br /&gt;
  def run_bidding_algorithm(bidding_data)&lt;br /&gt;
    url = 'http://app-csc517.herokuapp.com/match_topics' # Hard coding for the time being&lt;br /&gt;
    response = RestClient.post url, bidding_data.to_json, content_type: 'application/json', accept: :json&lt;br /&gt;
    JSON.parse(response.body)&lt;br /&gt;
  rescue StandardError =&amp;gt; e&lt;br /&gt;
    Rails.logger.error &amp;quot;Bidding algorithm failed: #{e.message}&amp;quot;&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Updated Implementation ====&lt;br /&gt;
We implemented an update using mocked data and a service as placeholders until a new URL is in place. We did not end up refactoring to rename this method as we found that the name describes the functionality quite well.&lt;br /&gt;
&lt;br /&gt;
==== review_bids_controller ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
  def run_bidding_algorithm&lt;br /&gt;
    review_bid = ReviewBid.new&lt;br /&gt;
    bidding_data = review_bid.bidding_data&lt;br /&gt;
    matched_topics = BiddingAlgorithmService.new(bidding_data).run&lt;br /&gt;
    raise ArgumentError, 'Failed to assign reviewers. Please try again later.' unless matched_topics&lt;br /&gt;
&lt;br /&gt;
    matched_topics&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== bidding_algorithm_service ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
# frozen_string_literal: true&lt;br /&gt;
&lt;br /&gt;
# The `BiddingAlgorithmService` run the bid assignment algorithm&lt;br /&gt;
# Sends student IDs, topic IDs, student preferences, and timestamps to the web service&lt;br /&gt;
# The web service returns the matched assignments in the JSON response body&lt;br /&gt;
class BiddingAlgorithmService&lt;br /&gt;
  SERVICE_URL = 'http://app-csc517.herokuapp.com/match_topics'.freeze&lt;br /&gt;
&lt;br /&gt;
  # MOCK_DATA is based on the documentation detailing how the webservice behaves.&lt;br /&gt;
  # Reference: https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2085._Allow_reviewers_to_bid_on_what_to_review#Webservice&lt;br /&gt;
  MOCK_DATA = {&lt;br /&gt;
    36239 =&amp;gt; [3970, 3972, 3975],&lt;br /&gt;
    36240 =&amp;gt; [3973, 3974, 3972],&lt;br /&gt;
    36241 =&amp;gt; [3969, 3971, 3972],&lt;br /&gt;
    36242 =&amp;gt; [3969, 3971, 3973],&lt;br /&gt;
    36243 =&amp;gt; [3969, 3970, 3971]&lt;br /&gt;
  }.freeze&lt;br /&gt;
&lt;br /&gt;
  def initialize(bidding_data)&lt;br /&gt;
    @bidding_data = bidding_data&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def run&lt;br /&gt;
    return MOCK_DATA if Rails.application.config.use_mock_bidding_algorithm&lt;br /&gt;
&lt;br /&gt;
    perform_request&lt;br /&gt;
  rescue RestClient::ExceptionWithResponse, JSON::ParserError&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  private&lt;br /&gt;
&lt;br /&gt;
  def perform_request&lt;br /&gt;
    response = RestClient.post(&lt;br /&gt;
      SERVICE_URL,&lt;br /&gt;
      @bidding_data.to_json,&lt;br /&gt;
      content_type: :json,&lt;br /&gt;
      accept: :json&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    validate_response(response)&lt;br /&gt;
    JSON.parse(response.body)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def validate_response(response)&lt;br /&gt;
    raise 'Invalid response format' unless response.headers[:content_type] &amp;amp;&amp;amp; response.headers[:content_type].include?('application/json')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-3-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve Functionality Issues for Non Bidders ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Currently it doesn't work if some student does not bid. In this case, algorithm needs to be fixed to ignore anyone who didn’t bid, and let them choose from what’s left over.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to do several things within this controller. We will set a default state for non-bidders that we can point to to give them options to select topics to review from the leftovers. We will consolidate &amp;lt;code&amp;gt;@sign_up_topics&amp;lt;/code&amp;gt; to resolve the DRY violation. Lastly, we will remove business logic from the show method and push it to a new helper to conform to the SRP.&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # Additional method&lt;br /&gt;
&lt;br /&gt;
  # Provides variables for review bidding page&lt;br /&gt;
  def show&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id].to_i)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where(assignment_id: @assignment.id, private_to: nil)&lt;br /&gt;
    my_topic = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @sign_up_topics -= SignUpTopic.where(assignment_id: @assignment.id, id: my_topic)&lt;br /&gt;
    @num_participants = AssignmentParticipant.where(parent_id: @assignment.id).count&lt;br /&gt;
    @selected_topics = nil # This is used to list the topics assigned to review (i.e., select == assigned)&lt;br /&gt;
    @bids = ReviewBid.where(participant_id: @participant, assignment_id: @assignment.id)&lt;br /&gt;
    signed_up_topics = []&lt;br /&gt;
    &lt;br /&gt;
    @bids.each do |bid|&lt;br /&gt;
      sign_up_topic = SignUpTopic.find_by(id: bid.signuptopic_id)&lt;br /&gt;
      signed_up_topics &amp;lt;&amp;lt; sign_up_topic if sign_up_topic&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    signed_up_topics &amp;amp;= @sign_up_topics&lt;br /&gt;
    @sign_up_topics -= signed_up_topics&lt;br /&gt;
    @bids = signed_up_topics&lt;br /&gt;
    @num_of_topics = @sign_up_topics.size&lt;br /&gt;
    @assigned_review_maps = []&lt;br /&gt;
&lt;br /&gt;
    ReviewResponseMap.where(reviewed_object_id: @assignment.id, reviewer_id: @participant.id).each do |review_map|&lt;br /&gt;
      @assigned_review_maps &amp;lt;&amp;lt; review_map&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # Explicitly render view since it's in the sign up sheet views&lt;br /&gt;
    render 'sign_up_sheet/review_bids_show'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Additional methods&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-2.-reviewbidshelper-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Updated Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
 # Assigns bidding topics to reviewers&lt;br /&gt;
  def assign_bidding&lt;br /&gt;
      assignment = validate_assignment(params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
      reviewers = validate_reviewers(assignment.id)&lt;br /&gt;
      reviewer_ids = reviewers.map(&amp;amp;:id)&lt;br /&gt;
&lt;br /&gt;
      matched_topics = run_bidding_algorithm&lt;br /&gt;
&lt;br /&gt;
      if matched_topics.blank?&lt;br /&gt;
        flash[:alert] = 'Topic or assignment is missing'&lt;br /&gt;
        redirect_back fallback_location: root_path &amp;amp;&amp;amp; return&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      leftover_topics = find_leftover_topics(assignment.id, matched_topics)&lt;br /&gt;
      assign_leftover_topics(reviewer_ids, matched_topics, leftover_topics)&lt;br /&gt;
&lt;br /&gt;
      ReviewBid.new.assign_review_topics(matched_topics)&lt;br /&gt;
      assignment.update!(can_choose_topic_to_review: false)&lt;br /&gt;
&lt;br /&gt;
      flash[:notice] = 'Reviewers were successfully assigned to topics.'&lt;br /&gt;
      redirect_back fallback_location: root_path&lt;br /&gt;
    rescue ArgumentError =&amp;gt; e&lt;br /&gt;
      Rails.logger.error &amp;quot;ArgumentError: #{e.message}&amp;quot;&lt;br /&gt;
      redirect_back fallback_location: root_path, alert: e.message&lt;br /&gt;
    rescue ActiveRecord::RecordInvalid =&amp;gt; e&lt;br /&gt;
      Rails.logger.error &amp;quot;ActiveRecord::RecordInvalid: #{e.message}&amp;quot;&lt;br /&gt;
      redirect_back fallback_location: root_path, alert: 'Failed to assign reviewers due to database error. Please try again later.'&lt;br /&gt;
    rescue ActiveRecord::ActiveRecordError =&amp;gt; e&lt;br /&gt;
      Rails.logger.error &amp;quot;ActiveRecord::ActiveRecordError: #{e.message}&amp;quot;&lt;br /&gt;
      redirect_back fallback_location: root_path, alert: 'Failed to assign reviewers due to database error. Please try again later.'&lt;br /&gt;
    rescue StandardError =&amp;gt; e&lt;br /&gt;
      Rails.logger.error &amp;quot;StandardError: #{e.message}&amp;quot;&lt;br /&gt;
      redirect_back fallback_location: root_path, alert: 'Failed to assign reviewers. Please try again later.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
  private&lt;br /&gt;
&lt;br /&gt;
  #service methods here ...&lt;br /&gt;
&lt;br /&gt;
  def find_leftover_topics(assignment_id, matched_topics)&lt;br /&gt;
    all_topic_ids = SignUpTopic.where(assignment_id: assignment_id).pluck(:id)&lt;br /&gt;
    assigned_topic_ids = matched_topics.map { |match| match[:topic_id] }&lt;br /&gt;
&lt;br /&gt;
    # Calculate leftover topics&lt;br /&gt;
    all_topic_ids - assigned_topic_ids&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def assign_leftover_topics(reviewer_ids, matched_topics, leftover_topics)&lt;br /&gt;
    return if leftover_topics.blank?&lt;br /&gt;
&lt;br /&gt;
    # Find non-bidders by excluding already matched reviewers&lt;br /&gt;
    non_bidders = reviewer_ids - matched_topics.keys&lt;br /&gt;
&lt;br /&gt;
    # Assign leftover topics to non-bidders in a round-robin fashion&lt;br /&gt;
    non_bidders.each_with_index do |reviewer_id, index|&lt;br /&gt;
      topic_id = leftover_topics[index % leftover_topics.length]&lt;br /&gt;
      ReviewBid.create(priority: 1, signuptopic_id: topic_id, participant_id: reviewer_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-3.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Confirm Functionality for Single-person Teams ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Make sure your code works on individual assignments, i.e., assignments where participants sign up for topics instead of teams. In this case, a team is created for each participant when they sign up. So the code should work for assignments to which either individuals or teams submit.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to make an update to focus on topic rather than team or have it where teams are updated based on topic id.We will probably utilize sign up topic or a similar object to accomplish this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-5-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bid Status Messaging ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| To make the functionality more intuitive, include a message to say how many students are eligible to submit bids, how many have submitted their bids, when the deadline for submitting bids is.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section-1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
The logic for these messages will go into the helper file. It is effectively the same reasoning as our migration of other business/functionality code from the controller to the helper to conform to the SRP. It will go hand in hand with the SignUpTopic portion of the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-6-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refactor &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; Model ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Why are the methods in review_bid.rb class methods? Can we change them to instance methods or move it to helpers?&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-1.-reviewbid-model-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; Model Updates ====&lt;br /&gt;
Since the current class methods are tied to &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model instances, we will change them to instance methods. There is no need to move them to helpers.&lt;br /&gt;
&lt;br /&gt;
===== Review Bid Model Flow Before Refactoring =====&lt;br /&gt;
This sequence diagram describes how the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; interacts with the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model in assigning review topics to reviewers according to their bids. Once the &amp;lt;code&amp;gt;assign_bidding&amp;lt;/code&amp;gt; action is initiated by the user, the controller gathers the IDs of reviewers and calls &amp;lt;code&amp;gt;ReviewBid.bidding_data&amp;lt;/code&amp;gt; to gather bidding information. That is sent out to an external bidding algorithm, and the matched topics that come back are used by &amp;lt;code&amp;gt;ReviewBid.assign_review_topics&amp;lt;/code&amp;gt; to create &amp;lt;code&amp;gt;ReviewResponseMap&amp;lt;/code&amp;gt; entries, assigning topics to reviewers for the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml sequence 2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBid &amp;lt; ApplicationRecord&lt;br /&gt;
  belongs_to :topic, class_name: 'SignUpTopic'&lt;br /&gt;
  belongs_to :participant, class_name: 'Participant'&lt;br /&gt;
  belongs_to :assignment, class_name: 'Assignment'&lt;br /&gt;
&lt;br /&gt;
  # method to get bidding data&lt;br /&gt;
  # returns the bidding data needed for the assigning algorithm&lt;br /&gt;
  # student_ids, topic_ids, student_preferences, topic_preferences, max reviews allowed&lt;br /&gt;
&lt;br /&gt;
  def self.bidding_data(assignment_id, reviewer_ids)&lt;br /&gt;
    # create basic hash and set basic hash data&lt;br /&gt;
    bidding_data = { 'tid' =&amp;gt; [], 'users' =&amp;gt; {}, 'max_accepted_proposals' =&amp;gt; [] }&lt;br /&gt;
    bidding_data['tid'] = SignUpTopic.where(assignment_id: assignment_id).ids&lt;br /&gt;
    bidding_data['max_accepted_proposals'] = Assignment.where(id: assignment_id).pluck(:num_reviews_allowed).first&lt;br /&gt;
&lt;br /&gt;
    # loop through reviewer_ids to get reviewer specific bidding data&lt;br /&gt;
    reviewer_ids.each do |reviewer_id|&lt;br /&gt;
      bidding_data['users'][reviewer_id] = reviewer_bidding_data(reviewer_id, assignment_id)&lt;br /&gt;
    end&lt;br /&gt;
    bidding_data&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # assigns topics to reviews as matched by the webservice algorithm&lt;br /&gt;
  def self.assign_review_topics(assignment_id, reviewer_ids, matched_topics, _min_num_reviews = 2)&lt;br /&gt;
    # if review response map already created, delete it&lt;br /&gt;
    if ReviewResponseMap.where(reviewed_object_id: assignment_id)&lt;br /&gt;
      ReviewResponseMap.where(reviewed_object_id: assignment_id).destroy_all&lt;br /&gt;
    end&lt;br /&gt;
    # loop through reviewer_ids to assign reviews to each reviewer&lt;br /&gt;
    reviewer_ids.each do |reviewer_id|&lt;br /&gt;
      topics_to_assign = matched_topics[reviewer_id.to_s]&lt;br /&gt;
      topics_to_assign.each do |topic|&lt;br /&gt;
        assign_topic_to_reviewer(assignment_id, reviewer_id, topic)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # method to assign a single topic to a reviewer&lt;br /&gt;
  def self.assign_topic_to_reviewer(assignment_id, reviewer_id, topic)&lt;br /&gt;
    team_to_review = SignedUpTeam.where(topic_id: topic).pluck(:team_id).first&lt;br /&gt;
    team_to_review.nil? ? [] : ReviewResponseMap.create(reviewed_object_id: assignment_id, reviewer_id: reviewer_id, reviewee_id: team_to_review, type: 'ReviewResponseMap')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # method for getting individual reviewer_ids bidding data&lt;br /&gt;
  # returns user's bidding data hash&lt;br /&gt;
  def self.reviewer_bidding_data(reviewer_id, assignment_id)&lt;br /&gt;
    reviewer_user_id = AssignmentParticipant.find(reviewer_id).user_id&lt;br /&gt;
    self_topic = SignedUpTeam.topic_id(assignment_id, reviewer_user_id)&lt;br /&gt;
    bidding_data = { 'tid' =&amp;gt; [], 'otid' =&amp;gt; self_topic, 'priority' =&amp;gt; [], 'time' =&amp;gt; [] }&lt;br /&gt;
    bids = ReviewBid.where(participant_id: reviewer_id)&lt;br /&gt;
&lt;br /&gt;
    # loop through each bid for a topic to get specific data&lt;br /&gt;
    bids.each do |bid|&lt;br /&gt;
      bidding_data['tid'] &amp;lt;&amp;lt; bid.signuptopic_id&lt;br /&gt;
      bidding_data['priority'] &amp;lt;&amp;lt; bid.priority&lt;br /&gt;
      bidding_data['time'] &amp;lt;&amp;lt; bid.updated_at&lt;br /&gt;
    end&lt;br /&gt;
    bidding_data&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Updated Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBid &amp;lt; ApplicationRecord&lt;br /&gt;
  belongs_to :topic, class_name: 'SignUpTopic'&lt;br /&gt;
  belongs_to :participant, class_name: 'Participant'&lt;br /&gt;
&lt;br /&gt;
  # method to get bidding data&lt;br /&gt;
  # returns the bidding data needed for the assigning algorithm&lt;br /&gt;
  # student_ids, topic_ids, student_preferences, topic_preferences, max reviews allowed&lt;br /&gt;
&lt;br /&gt;
  # Instance method to get bidding data for this review bid&lt;br /&gt;
  def bidding_data&lt;br /&gt;
    {&lt;br /&gt;
      'tid' =&amp;gt; topic_ids,&lt;br /&gt;
      'otid' =&amp;gt; self_topic,&lt;br /&gt;
      'priority' =&amp;gt; priorities,&lt;br /&gt;
      'time' =&amp;gt; updated_times&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # bid object to limit db touches for similar data acquisitions&lt;br /&gt;
  def bids&lt;br /&gt;
    @bids ||= ReviewBid.where(participant_id: participant_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def topic_ids&lt;br /&gt;
    bids.pluck(:signuptopic_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def priorities&lt;br /&gt;
    bids.pluck(:priority)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def updated_times&lt;br /&gt;
    bids.pluck(:updated_at)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self_topic&lt;br /&gt;
    return nil unless topic &amp;amp;&amp;amp; topic.assignment_id&lt;br /&gt;
&lt;br /&gt;
    SignedUpTeam.topic_id(topic.assignment_id, participant.user_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Assign topics to reviews&lt;br /&gt;
  def assign_review_topics(matched_topics)&lt;br /&gt;
    validate_topics_and_assignment!(matched_topics)&lt;br /&gt;
&lt;br /&gt;
    ReviewResponseMap.where(reviewed_object_id: topic.assignment_id).destroy_all&lt;br /&gt;
&lt;br /&gt;
    matched_topics.each do |reviewer_id, topics|&lt;br /&gt;
      Array(topics).each { |topic_id| assign_topic_to_reviewer(reviewer_id, topic_id) }&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Assign a single topic to a reviewer&lt;br /&gt;
  def assign_topic_to_reviewer(reviewer_id, topic_id)&lt;br /&gt;
    team_to_review = SignedUpTeam.where(topic_id: topic_id).pluck(:team_id).first&lt;br /&gt;
    return if team_to_review.nil?&lt;br /&gt;
&lt;br /&gt;
    ReviewResponseMap.create(&lt;br /&gt;
      reviewed_object_id: topic.assignment_id,&lt;br /&gt;
      reviewer_id: reviewer_id,&lt;br /&gt;
      reviewee_id: team_to_review,&lt;br /&gt;
      type: 'ReviewResponseMap'&lt;br /&gt;
    )&lt;br /&gt;
    # error handling&lt;br /&gt;
  rescue StandardError =&amp;gt; e&lt;br /&gt;
    Rails.logger.error(&amp;quot;Failed to assign topic #{topic_id} to reviewer #{reviewer_id}: #{e.message}&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  private&lt;br /&gt;
&lt;br /&gt;
  def validate_topics_and_assignment!(matched_topics)&lt;br /&gt;
    raise ArgumentError, 'Topic or assignment is missing' if topic.nil? || topic.assignment_id.nil?&lt;br /&gt;
    raise ArgumentError, 'Matched topics must be a Hash' unless matched_topics.is_a?(Hash)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
Once we change them to instance methods, we’ll need to modify their use in the code to instantiate the object first.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Placeholder for implementation screenshots (before and after)&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-3.-schema.db-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;Schema.db&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We also need to remove the foreign key reference to &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model since the &amp;lt;code&amp;gt;Participant&amp;lt;/code&amp;gt; model already has access to &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt;, and that is the &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; we should be referencing. This will also involve modifying the database to remove the foreign key reference to the &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Steps required:&lt;br /&gt;
&lt;br /&gt;
# Review the records in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; table in the database to see if there are any records and if those records have values for &amp;lt;code&amp;gt;assignment_id&amp;lt;/code&amp;gt;&lt;br /&gt;
# Create a migration file using the command: &amp;lt;code&amp;gt;rails generate migration RemoveAssignmentFromReviewBids&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the generated file, indicate the change that needs to be made using the change method and migration columns &amp;lt;code&amp;gt;remove_foreign_key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;remove_column&amp;lt;/code&amp;gt;. Migration should be straightforward since there is no cascading behavior (i.e., &amp;lt;code&amp;gt;dependent:destroy&amp;lt;/code&amp;gt;) to worry about.&lt;br /&gt;
# Once comfortable with the updates to the generated file, run the migration using the &amp;lt;code&amp;gt;rails db:migrate&amp;lt;/code&amp;gt; command.&lt;br /&gt;
# Run a query in the DB to ensure no orphaned records are in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; table after the updates.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Placeholder for implementation screenshots (before and after)&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-4.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implement Edge Case Testing ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| In the previous implementation wiki, there are edge cases which are not exhaustively tested. Should test those edge cases thoroughly and add more edge case testing - link&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section-2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mark&amp;quot;&amp;gt;TODO&amp;lt;/span&amp;gt;:We just got initial test results back. We still need to figure out why tests are failing and what may be slipping through the cracks.[[File:Test expertiza.png|411x459px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-8-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns and Principles ===&lt;br /&gt;
Below are the design patterns and principles we plan to use to address the problem statements outlined in the project requirements:&lt;br /&gt;
&lt;br /&gt;
* Single Responsibility Principle (SRP)&lt;br /&gt;
** Controller Responsibility&lt;br /&gt;
*** To address the issue of authentication logic residing in &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt;, we will refactor the code to ensure the controller solely handles request and response flows.&lt;br /&gt;
*** Authentication logic will be moved to dedicated methods in &amp;lt;code&amp;gt;AuthorizationHelper&amp;lt;/code&amp;gt;, making the codebase easier to maintain and test.&lt;br /&gt;
** View Simplification&lt;br /&gt;
*** Currently, the &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; view contains excessive business logic, violating SRP.&lt;br /&gt;
*** We will move this logic into helper methods or models, ensuring each component has a single responsibility and improving code readability.&lt;br /&gt;
&lt;br /&gt;
* Separation of Concerns (SoC)&lt;br /&gt;
** By relocating authorization logic out of the controller, we separate authentication from request handling.&lt;br /&gt;
** Adhering to SoC enhances readability and maintainability by allowing each part of the application to focus on its specific role.&lt;br /&gt;
* Don't Repeat Yourself (DRY)&lt;br /&gt;
** We will inspect the existing implementation for code duplication, particularly in the controller actions.&lt;br /&gt;
** Any repetitive code will be refactored or removed to reduce redundancy and improve clarity.&lt;br /&gt;
&lt;br /&gt;
* Model-View-Controller (MVC) Adherence&lt;br /&gt;
** Moving business logic from the view aligns with MVC best practices.&lt;br /&gt;
** By ensuring the view only presents data without processing it, we maintain clear boundaries between the model, view, and controller layers.&lt;br /&gt;
&lt;br /&gt;
* Dependency Inversion Principle (DIP)&lt;br /&gt;
** We plan to update class methods to instance methods, allowing the controller to depend on abstractions rather than concrete implementations.&lt;br /&gt;
** This change leverages Ruby's duck typing, providing flexibility and making the code easier to maintain and test.&lt;br /&gt;
&lt;br /&gt;
* Factory Pattern&lt;br /&gt;
** We will implement a factory pattern for the common processing of &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SignUpBid&amp;lt;/code&amp;gt;, encapsulating object creation and promoting code reuse.&lt;br /&gt;
&lt;br /&gt;
* Law of Demeter (Principle of Least Knowledge)&lt;br /&gt;
** We'll delegate interactions appropriately to prevent tightly coupled code, especially when dealing with topics and teams.&lt;br /&gt;
** Clear and intentional naming during refactoring will enhance code clarity and maintainability.&lt;br /&gt;
&lt;br /&gt;
* Adapter Pattern&lt;br /&gt;
** To add messaging to bid states for users, we'll use the adapter pattern to allow different components to work together without modifying their existing code.&lt;br /&gt;
&lt;br /&gt;
== Files Modified/Added ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-1.-controllers&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
&lt;br /&gt;
review_bids_controller.rb&lt;br /&gt;
&lt;br /&gt;
signup_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-2.-models&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&lt;br /&gt;
review_bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-3.-helpers&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Helpers ===&lt;br /&gt;
&lt;br /&gt;
authorization_helper.rb&lt;br /&gt;
&lt;br /&gt;
Review_bids_helper.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;viii.-test-plan&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
The Excel spreadsheet below details our test plan for testing the code we changed or created to ensure code coverage. The process involved reviewing the code and determining all the possible scenarios that needed to be covered based on what the method was doing, then creating test cases accordingly.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/spreadsheets/d/1iHzOdSwlTtxOtf5VsNdwOaCP8NzYMmiJ/edit?usp=drive_link Open Test Matrix Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
== Test Coverage ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;screenshot of SimpleCov coverage analysis&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x.-team&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x-1.-mentor&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Mentor ===&lt;br /&gt;
&lt;br /&gt;
* Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x-2.-members&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Members ===&lt;br /&gt;
&lt;br /&gt;
* Gavin Teague&lt;br /&gt;
* Janice Uwujaren&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;xi.-links&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
Previous Wiki: [https://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2151._Allow_reviewers_to_bid_on_what_to_review &amp;lt;u&amp;gt;Link&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;xii.-references&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/d/1LHVacylQmB15I6VcYUA5nuC7GRRU9szHzZhjlPcE-PA/edit?tab=t.0#heading=h.u0oycoj6e0ev &amp;lt;u&amp;gt;Project Instructions&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;appendix-a-uml-class-diagram-plantuml-code-for-review-bids&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2485._Allow_reviewers_to_bid_on_what_to_review&amp;diff=160831</id>
		<title>CSC/ECE 517 Fall 2024 - E2485. Allow reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2485._Allow_reviewers_to_bid_on_what_to_review&amp;diff=160831"/>
		<updated>2024-12-05T04:08:41Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* Resolve Functionality Issues for Non Bidders */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project Overview ==&lt;br /&gt;
&lt;br /&gt;
This project will fix the defects and improve the functionality in Expertiza of the Reviewer Bidding feature, a process where reviewers can bid for assignments they want to review. It will make the functionality smoother, more reliable, and align with Expertiza's collaborative learning objectives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;iii.-problem-statements&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statements ==&lt;br /&gt;
&lt;br /&gt;
Assigning reviews to users on Expertiza involves a complex bidding algorithm that requires optimization before production deployment. Below are key areas we plan to address as per the project requirements:&lt;br /&gt;
* Code Refactoring and Best Practices&lt;br /&gt;
** '''Utilize Authentication Utilities''': Modify the &amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; function in the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; to use existing authentication utilities, enhancing code reusability and adhering to the Single Responsibility Principle (SRP) and Separation of Concerns (SoC).&lt;br /&gt;
** '''Eliminate Code Duplication''': Refactor &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; to comply with the Don't Repeat Yourself (DRY) principle.&lt;br /&gt;
** '''Rename Functions for Clarity''': Change &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; to better reflect its purpose.&lt;br /&gt;
** '''Refactor Methods in '''&amp;lt;code&amp;gt;review_bid.rb&amp;lt;/code&amp;gt;''':''': Convert class methods to instance methods or relocate them to helper classes for improved code organization.&lt;br /&gt;
* Functionality Enhancements&lt;br /&gt;
** '''Handle Missing Bids Gracefully''': Adjust the bidding algorithm to accommodate students who do not bid, allowing them to select from the remaining options.&lt;br /&gt;
** '''Support Both Individual and Team Assignments''': Ensure the code functions correctly for participant and team-based assignments when signing up for topics.&lt;br /&gt;
* User Interface Improvements&lt;br /&gt;
** '''Increase Transparency in the Bidding Process''': Display messages indicating how many students are eligible to bid, how many have submitted bids, and the deadline.&lt;br /&gt;
** '''Accurate Bid Status Indicators''': Ensure topic colors change correctly based on the number of outstanding bids, providing clear visual feedback to users.&lt;br /&gt;
* Testing and Validation&lt;br /&gt;
** '''Exhaustive Edge Case Testing''': Conduct thorough testing for edge cases not previously covered, adding additional test cases as needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;iv.-design-goals&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
&lt;br /&gt;
While addressing the existing defects and enhancing the Reviewer Bidding feature, we plan to adhere to the following design guidelines:&lt;br /&gt;
&lt;br /&gt;
* Code Quality and Maintainability&lt;br /&gt;
** '''Improve Code Structure: '''Implement refactoring strategies to enhance code readability and maintainability, ensuring adherence to best practices like the DRY principle.&lt;br /&gt;
** '''Standardize Authentication Logic: '''Utilize a centralized authentication utility to promote consistency and reusability across the application.&lt;br /&gt;
* System Stability and Flexibility&lt;br /&gt;
** '''Enhance Algorithm Robustness: '''Modify the bidding algorithm to handle scenarios where students do not bid, ensuring the system remains stable under all conditions.&lt;br /&gt;
** '''Ensure Assignment Versatility: '''Design the system to seamlessly support both individual and team assignments without additional configuration.&lt;br /&gt;
* User Experience Enhancements&lt;br /&gt;
** '''Increase Bidding Transparency: '''Develop user interface elements that clearly display bidding status, deadlines, and participation metrics.&lt;br /&gt;
** '''Implement Dynamic Visual Feedback: '''Use real-time visual cues, such as color changes, to inform users about the bidding status instantly.&lt;br /&gt;
* Testing and Validation&lt;br /&gt;
** '''Develop Comprehensive Test Suites: '''Create extensive automated tests covering edge cases and critical functionalities to guarantee reliable system behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;v.-uml-diagram&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UML Diagram ==&lt;br /&gt;
&lt;br /&gt;
Below is a visual representation of the models associated with the review bids functionality, depicting the data structures and their relationships.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml class diagram2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi.-implementation&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
'''ReviewBid: '''The &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; manages the bidding process, where participants indicate their preferences for reviewing different topics or assignments. This helps distribute review tasks fairly based on participants' interests.&lt;br /&gt;
&lt;br /&gt;
'''Assignment: '''The &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; model represents team or individual assignments in Expertiza. It stores all the essential information required to keep the assignment process organized, like managing participants, setting due dates, forming teams, and overseeing the review process.&lt;br /&gt;
&lt;br /&gt;
'''SignUpTopic: '''The &amp;lt;code&amp;gt;SignUpTopic&amp;lt;/code&amp;gt; model identifies specific topics or areas within an assignment for which participants can sign up. It manages the availability of these topics, tracks bids, coordinates team sign-ups, and assigns topics based on both bids and participant availability. &lt;br /&gt;
&lt;br /&gt;
'''Participant: '''The &amp;lt;code&amp;gt;Participant&amp;lt;/code&amp;gt; model is about the individual users who participate in an assignment. This includes students, instructors, teaching assistants, or other relevant roles. This model is responsible for managing key user information, monitoring interactions with the assignment, keeping track of team memberships, and recording things like badges and review grades.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-1.-decoupling-authorization-logic-from-reviewbidscontroller&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Decoupling Authorization Logic from &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| '''&amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; needs to use the authentication utilities'''&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; should use the available authentication utilities to support the Single Responsibility Principle and Separation of Concerns and to support code reusability.&lt;br /&gt;
&lt;br /&gt;
| '''Authentication Consistency:''' Remove authentication logic in the controller and call logic in the authentication utility class instead to ensure consistent use of the same logic across the application, foster reusability, and eliminate DRY.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
==== Authorization Flow Before Refactoring ====&lt;br /&gt;
The sequence diagram depicts the authorization process within the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt;. When a user invokes an action, the controller checks if the action is allowed by verifying the user's role through the &amp;lt;code&amp;gt;current_role_name()&amp;lt;/code&amp;gt; method in the &amp;lt;code&amp;gt;ApplicationController&amp;lt;/code&amp;gt;. Depending on the action and the user's role, the controller either authorizes the user to proceed or denies access, ultimately executing the action logic if authorized and responding to the user.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml sequence 1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-1-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We simplified the &amp;lt;code&amp;gt;action_allowed?&amp;lt;/code&amp;gt; method by decoupling authorization logic from the controller to use helper methods in the &amp;lt;code&amp;gt;AuthorizationHelper&amp;lt;/code&amp;gt; module. The &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; should not handle authentication, which is a violation of SRP. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;vertical-align:top;&amp;quot; | Original Code !! style=&amp;quot;vertical-align:top;&amp;quot; | Refactored Code&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div style=&amp;quot;vertical-align:top;&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
def action_allowed?&lt;br /&gt;
  case params[:action]&lt;br /&gt;
  when 'show', 'set_priority', 'index'&lt;br /&gt;
    ['Instructor',&lt;br /&gt;
     'Teaching Assistant',&lt;br /&gt;
     'Administrator',&lt;br /&gt;
     'Super-Administrator',&lt;br /&gt;
     'Student'].include? current_role_name and&lt;br /&gt;
        ((%w[list].include? action_name) ? are_needed_authorizations_present?(params[:id], &amp;quot;participant&amp;quot;, &amp;quot;reader&amp;quot;, &amp;quot;submitter&amp;quot;, &amp;quot;reviewer&amp;quot;) : true)&lt;br /&gt;
  else&lt;br /&gt;
    ['Instructor',&lt;br /&gt;
     'Teaching Assistant',&lt;br /&gt;
     'Administrator',&lt;br /&gt;
     'Super-Administrator'].include? current_role_name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|| &amp;lt;div style=&amp;quot;vertical-align:top;&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
def action_allowed?&lt;br /&gt;
  case params[:action]&lt;br /&gt;
  when 'show', 'set_priority', 'index', 'list'&lt;br /&gt;
    current_user_has_student_privileges? &amp;amp;&amp;amp; list_authorization_check&lt;br /&gt;
  else&lt;br /&gt;
    current_user_has_ta_privileges?&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Optimize &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; Functionality ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; is a DRY violation'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The function &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; violates DRY.&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-1.-signupsheetcontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
The ReviewBidsController's index method renders the review_bids_others_work action in &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt;. However, the &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; does not include the controller action for this view. We need to find the old implementation of the controller action, add it back, and review and update it for any DRY violations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # provides variables for reviewing page located at views/review_bids/others_work.html.erb&lt;br /&gt;
  def index&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
&lt;br /&gt;
    # Finding how many reviews have been completed&lt;br /&gt;
    @num_reviews_completed = 0&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      @num_reviews_completed += 1 if !map.response.empty? &amp;amp;&amp;amp; map.response.last.is_submitted&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # render view for completing reviews after review bidding has been completed&lt;br /&gt;
    render 'sign_up_sheet/review_bids_others_work'&lt;br /&gt;
  end  &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-2.-reviewbidsotherswork-view-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;review_bids_others_work.html.erb&amp;lt;/code&amp;gt; View Updates ====&lt;br /&gt;
&lt;br /&gt;
The code only contains a view with this name and no associated controller action. Reviewing the code in the view, we noticed some SRP violations where there is much logic in the presentation layer. Set up helper methods in the controller to handle some of that logic or see if the model can handle some of that logic.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-3.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rename &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; method ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; should be &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt;&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:''' Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The primary activity here is to refactor the method name &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; and fix the hardcoded URL. However, the match topic bidding algorithm no longer works since Heroku is no longer free, per the professor. The reference link below has detailed information about the web service that we can leverage to gain that understanding.&lt;br /&gt;
&lt;br /&gt;
Reference Link for Webservice Details: [https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2085._Allow_reviewers_to_bid_on_what_to_review &amp;lt;u&amp;gt;match_topics webservice link details&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-3-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to rename the &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; method to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; to make the functionality of the method clear. We also plan to verify that the method is working appropriately by mocking up the service call since it is no longer working.&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # Other methods&lt;br /&gt;
&lt;br /&gt;
  # Call webserver for running the assigning algorithm&lt;br /&gt;
  # Passing to webserver:&lt;br /&gt;
  # - student_ids&lt;br /&gt;
  # - topic_ids&lt;br /&gt;
  # - student_preferences&lt;br /&gt;
  # - time_stamps&lt;br /&gt;
  # Webserver returns:&lt;br /&gt;
  # - matched assignments as JSON body&lt;br /&gt;
  def run_bidding_algorithm(bidding_data)&lt;br /&gt;
    url = 'http://app-csc517.herokuapp.com/match_topics' # Hard coding for the time being&lt;br /&gt;
    response = RestClient.post url, bidding_data.to_json, content_type: 'application/json', accept: :json&lt;br /&gt;
    JSON.parse(response.body)&lt;br /&gt;
  rescue StandardError =&amp;gt; e&lt;br /&gt;
    Rails.logger.error &amp;quot;Bidding algorithm failed: #{e.message}&amp;quot;&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Updated Implementation ====&lt;br /&gt;
We implemented an update using mocked data and a service as placeholders until a new URL is in place. We did not end up refactoring to rename this method as we found that the name describes the functionality quite well.&lt;br /&gt;
&lt;br /&gt;
==== review_bids_controller ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
  def run_bidding_algorithm&lt;br /&gt;
    review_bid = ReviewBid.new&lt;br /&gt;
    bidding_data = review_bid.bidding_data&lt;br /&gt;
    matched_topics = BiddingAlgorithmService.new(bidding_data).run&lt;br /&gt;
    raise ArgumentError, 'Failed to assign reviewers. Please try again later.' unless matched_topics&lt;br /&gt;
&lt;br /&gt;
    matched_topics&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== bidding_algorithm_service ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
# frozen_string_literal: true&lt;br /&gt;
&lt;br /&gt;
# The `BiddingAlgorithmService` run the bid assignment algorithm&lt;br /&gt;
# Sends student IDs, topic IDs, student preferences, and timestamps to the web service&lt;br /&gt;
# The web service returns the matched assignments in the JSON response body&lt;br /&gt;
class BiddingAlgorithmService&lt;br /&gt;
  SERVICE_URL = 'http://app-csc517.herokuapp.com/match_topics'.freeze&lt;br /&gt;
&lt;br /&gt;
  # MOCK_DATA is based on the documentation detailing how the webservice behaves.&lt;br /&gt;
  # Reference: https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2085._Allow_reviewers_to_bid_on_what_to_review#Webservice&lt;br /&gt;
  MOCK_DATA = {&lt;br /&gt;
    36239 =&amp;gt; [3970, 3972, 3975],&lt;br /&gt;
    36240 =&amp;gt; [3973, 3974, 3972],&lt;br /&gt;
    36241 =&amp;gt; [3969, 3971, 3972],&lt;br /&gt;
    36242 =&amp;gt; [3969, 3971, 3973],&lt;br /&gt;
    36243 =&amp;gt; [3969, 3970, 3971]&lt;br /&gt;
  }.freeze&lt;br /&gt;
&lt;br /&gt;
  def initialize(bidding_data)&lt;br /&gt;
    @bidding_data = bidding_data&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def run&lt;br /&gt;
    return MOCK_DATA if Rails.application.config.use_mock_bidding_algorithm&lt;br /&gt;
&lt;br /&gt;
    perform_request&lt;br /&gt;
  rescue RestClient::ExceptionWithResponse, JSON::ParserError&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  private&lt;br /&gt;
&lt;br /&gt;
  def perform_request&lt;br /&gt;
    response = RestClient.post(&lt;br /&gt;
      SERVICE_URL,&lt;br /&gt;
      @bidding_data.to_json,&lt;br /&gt;
      content_type: :json,&lt;br /&gt;
      accept: :json&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    validate_response(response)&lt;br /&gt;
    JSON.parse(response.body)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def validate_response(response)&lt;br /&gt;
    raise 'Invalid response format' unless response.headers[:content_type] &amp;amp;&amp;amp; response.headers[:content_type].include?('application/json')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-3-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve Functionality Issues for Non Bidders ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Currently it doesn't work if some student does not bid. In this case, algorithm needs to be fixed to ignore anyone who didn’t bid, and let them choose from what’s left over.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to do several things within this controller. We will set a default state for non-bidders that we can point to to give them options to select topics to review from the leftovers. We will consolidate &amp;lt;code&amp;gt;@sign_up_topics&amp;lt;/code&amp;gt; to resolve the DRY violation. Lastly, we will remove business logic from the show method and push it to a new helper to conform to the SRP.&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # Additional method&lt;br /&gt;
&lt;br /&gt;
  # Provides variables for review bidding page&lt;br /&gt;
  def show&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id].to_i)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where(assignment_id: @assignment.id, private_to: nil)&lt;br /&gt;
    my_topic = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @sign_up_topics -= SignUpTopic.where(assignment_id: @assignment.id, id: my_topic)&lt;br /&gt;
    @num_participants = AssignmentParticipant.where(parent_id: @assignment.id).count&lt;br /&gt;
    @selected_topics = nil # This is used to list the topics assigned to review (i.e., select == assigned)&lt;br /&gt;
    @bids = ReviewBid.where(participant_id: @participant, assignment_id: @assignment.id)&lt;br /&gt;
    signed_up_topics = []&lt;br /&gt;
    &lt;br /&gt;
    @bids.each do |bid|&lt;br /&gt;
      sign_up_topic = SignUpTopic.find_by(id: bid.signuptopic_id)&lt;br /&gt;
      signed_up_topics &amp;lt;&amp;lt; sign_up_topic if sign_up_topic&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    signed_up_topics &amp;amp;= @sign_up_topics&lt;br /&gt;
    @sign_up_topics -= signed_up_topics&lt;br /&gt;
    @bids = signed_up_topics&lt;br /&gt;
    @num_of_topics = @sign_up_topics.size&lt;br /&gt;
    @assigned_review_maps = []&lt;br /&gt;
&lt;br /&gt;
    ReviewResponseMap.where(reviewed_object_id: @assignment.id, reviewer_id: @participant.id).each do |review_map|&lt;br /&gt;
      @assigned_review_maps &amp;lt;&amp;lt; review_map&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # Explicitly render view since it's in the sign up sheet views&lt;br /&gt;
    render 'sign_up_sheet/review_bids_show'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Additional methods&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-2.-reviewbidshelper-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Updated Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
 # Assigns bidding topics to reviewers&lt;br /&gt;
  def assign_bidding&lt;br /&gt;
      assignment = validate_assignment(params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
      reviewers = validate_reviewers(assignment.id)&lt;br /&gt;
      reviewer_ids = reviewers.map(&amp;amp;:id)&lt;br /&gt;
&lt;br /&gt;
      matched_topics = run_bidding_algorithm&lt;br /&gt;
&lt;br /&gt;
      if matched_topics.blank?&lt;br /&gt;
        flash[:alert] = 'Topic or assignment is missing'&lt;br /&gt;
        redirect_back fallback_location: root_path &amp;amp;&amp;amp; return&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      leftover_topics = find_leftover_topics(assignment.id, matched_topics)&lt;br /&gt;
      assign_leftover_topics(reviewer_ids, matched_topics, leftover_topics)&lt;br /&gt;
&lt;br /&gt;
      ReviewBid.new.assign_review_topics(matched_topics)&lt;br /&gt;
      assignment.update!(can_choose_topic_to_review: false)&lt;br /&gt;
&lt;br /&gt;
      flash[:notice] = 'Reviewers were successfully assigned to topics.'&lt;br /&gt;
      redirect_back fallback_location: root_path&lt;br /&gt;
    rescue ArgumentError =&amp;gt; e&lt;br /&gt;
      Rails.logger.error &amp;quot;ArgumentError: #{e.message}&amp;quot;&lt;br /&gt;
      redirect_back fallback_location: root_path, alert: e.message&lt;br /&gt;
    rescue ActiveRecord::RecordInvalid =&amp;gt; e&lt;br /&gt;
      Rails.logger.error &amp;quot;ActiveRecord::RecordInvalid: #{e.message}&amp;quot;&lt;br /&gt;
      redirect_back fallback_location: root_path, alert: 'Failed to assign reviewers due to database error. Please try again later.'&lt;br /&gt;
    rescue ActiveRecord::ActiveRecordError =&amp;gt; e&lt;br /&gt;
      Rails.logger.error &amp;quot;ActiveRecord::ActiveRecordError: #{e.message}&amp;quot;&lt;br /&gt;
      redirect_back fallback_location: root_path, alert: 'Failed to assign reviewers due to database error. Please try again later.'&lt;br /&gt;
    rescue StandardError =&amp;gt; e&lt;br /&gt;
      Rails.logger.error &amp;quot;StandardError: #{e.message}&amp;quot;&lt;br /&gt;
      redirect_back fallback_location: root_path, alert: 'Failed to assign reviewers. Please try again later.'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
  private&lt;br /&gt;
&lt;br /&gt;
  #service methods here ...&lt;br /&gt;
&lt;br /&gt;
  def find_leftover_topics(assignment_id, matched_topics)&lt;br /&gt;
    all_topic_ids = SignUpTopic.where(assignment_id: assignment_id).pluck(:id)&lt;br /&gt;
    assigned_topic_ids = matched_topics.map { |match| match[:topic_id] }&lt;br /&gt;
&lt;br /&gt;
    # Calculate leftover topics&lt;br /&gt;
    all_topic_ids - assigned_topic_ids&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def assign_leftover_topics(reviewer_ids, matched_topics, leftover_topics)&lt;br /&gt;
    return if leftover_topics.blank?&lt;br /&gt;
&lt;br /&gt;
    # Find non-bidders by excluding already matched reviewers&lt;br /&gt;
    non_bidders = reviewer_ids - matched_topics.keys&lt;br /&gt;
&lt;br /&gt;
    # Assign leftover topics to non-bidders in a round-robin fashion&lt;br /&gt;
    non_bidders.each_with_index do |reviewer_id, index|&lt;br /&gt;
      topic_id = leftover_topics[index % leftover_topics.length]&lt;br /&gt;
      ReviewBid.create(priority: 1, signuptopic_id: topic_id, participant_id: reviewer_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-3.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Confirm Functionality for Single-person Teams ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Make sure your code works on individual assignments, i.e., assignments where participants sign up for topics instead of teams. In this case, a team is created for each participant when they sign up. So the code should work for assignments to which either individuals or teams submit.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to make an update to focus on topic rather than team or have it where teams are updated based on topic id.We will probably utilize sign up topic or a similar object to accomplish this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-5-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bid Status Messaging ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| To make the functionality more intuitive, include a message to say how many students are eligible to submit bids, how many have submitted their bids, when the deadline for submitting bids is.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section-1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
The logic for these messages will go into the helper file. It is effectively the same reasoning as our migration of other business/functionality code from the controller to the helper to conform to the SRP. It will go hand in hand with the SignUpTopic portion of the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-6-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refactor &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; Model ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Why are the methods in review_bid.rb class methods? Can we change them to instance methods or move it to helpers?&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-1.-reviewbid-model-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; Model Updates ====&lt;br /&gt;
Since the current class methods are tied to &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model instances, we will change them to instance methods. There is no need to move them to helpers.&lt;br /&gt;
&lt;br /&gt;
===== Review Bid Model Flow Before Refactoring =====&lt;br /&gt;
This sequence diagram describes how the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; interacts with the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model in assigning review topics to reviewers according to their bids. Once the &amp;lt;code&amp;gt;assign_bidding&amp;lt;/code&amp;gt; action is initiated by the user, the controller gathers the IDs of reviewers and calls &amp;lt;code&amp;gt;ReviewBid.bidding_data&amp;lt;/code&amp;gt; to gather bidding information. That is sent out to an external bidding algorithm, and the matched topics that come back are used by &amp;lt;code&amp;gt;ReviewBid.assign_review_topics&amp;lt;/code&amp;gt; to create &amp;lt;code&amp;gt;ReviewResponseMap&amp;lt;/code&amp;gt; entries, assigning topics to reviewers for the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml sequence 2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBid &amp;lt; ApplicationRecord&lt;br /&gt;
  belongs_to :topic, class_name: 'SignUpTopic'&lt;br /&gt;
  belongs_to :participant, class_name: 'Participant'&lt;br /&gt;
  belongs_to :assignment, class_name: 'Assignment'&lt;br /&gt;
&lt;br /&gt;
  # method to get bidding data&lt;br /&gt;
  # returns the bidding data needed for the assigning algorithm&lt;br /&gt;
  # student_ids, topic_ids, student_preferences, topic_preferences, max reviews allowed&lt;br /&gt;
&lt;br /&gt;
  def self.bidding_data(assignment_id, reviewer_ids)&lt;br /&gt;
    # create basic hash and set basic hash data&lt;br /&gt;
    bidding_data = { 'tid' =&amp;gt; [], 'users' =&amp;gt; {}, 'max_accepted_proposals' =&amp;gt; [] }&lt;br /&gt;
    bidding_data['tid'] = SignUpTopic.where(assignment_id: assignment_id).ids&lt;br /&gt;
    bidding_data['max_accepted_proposals'] = Assignment.where(id: assignment_id).pluck(:num_reviews_allowed).first&lt;br /&gt;
&lt;br /&gt;
    # loop through reviewer_ids to get reviewer specific bidding data&lt;br /&gt;
    reviewer_ids.each do |reviewer_id|&lt;br /&gt;
      bidding_data['users'][reviewer_id] = reviewer_bidding_data(reviewer_id, assignment_id)&lt;br /&gt;
    end&lt;br /&gt;
    bidding_data&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # assigns topics to reviews as matched by the webservice algorithm&lt;br /&gt;
  def self.assign_review_topics(assignment_id, reviewer_ids, matched_topics, _min_num_reviews = 2)&lt;br /&gt;
    # if review response map already created, delete it&lt;br /&gt;
    if ReviewResponseMap.where(reviewed_object_id: assignment_id)&lt;br /&gt;
      ReviewResponseMap.where(reviewed_object_id: assignment_id).destroy_all&lt;br /&gt;
    end&lt;br /&gt;
    # loop through reviewer_ids to assign reviews to each reviewer&lt;br /&gt;
    reviewer_ids.each do |reviewer_id|&lt;br /&gt;
      topics_to_assign = matched_topics[reviewer_id.to_s]&lt;br /&gt;
      topics_to_assign.each do |topic|&lt;br /&gt;
        assign_topic_to_reviewer(assignment_id, reviewer_id, topic)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # method to assign a single topic to a reviewer&lt;br /&gt;
  def self.assign_topic_to_reviewer(assignment_id, reviewer_id, topic)&lt;br /&gt;
    team_to_review = SignedUpTeam.where(topic_id: topic).pluck(:team_id).first&lt;br /&gt;
    team_to_review.nil? ? [] : ReviewResponseMap.create(reviewed_object_id: assignment_id, reviewer_id: reviewer_id, reviewee_id: team_to_review, type: 'ReviewResponseMap')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # method for getting individual reviewer_ids bidding data&lt;br /&gt;
  # returns user's bidding data hash&lt;br /&gt;
  def self.reviewer_bidding_data(reviewer_id, assignment_id)&lt;br /&gt;
    reviewer_user_id = AssignmentParticipant.find(reviewer_id).user_id&lt;br /&gt;
    self_topic = SignedUpTeam.topic_id(assignment_id, reviewer_user_id)&lt;br /&gt;
    bidding_data = { 'tid' =&amp;gt; [], 'otid' =&amp;gt; self_topic, 'priority' =&amp;gt; [], 'time' =&amp;gt; [] }&lt;br /&gt;
    bids = ReviewBid.where(participant_id: reviewer_id)&lt;br /&gt;
&lt;br /&gt;
    # loop through each bid for a topic to get specific data&lt;br /&gt;
    bids.each do |bid|&lt;br /&gt;
      bidding_data['tid'] &amp;lt;&amp;lt; bid.signuptopic_id&lt;br /&gt;
      bidding_data['priority'] &amp;lt;&amp;lt; bid.priority&lt;br /&gt;
      bidding_data['time'] &amp;lt;&amp;lt; bid.updated_at&lt;br /&gt;
    end&lt;br /&gt;
    bidding_data&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
Once we change them to instance methods, we’ll need to modify their use in the code to instantiate the object first.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Placeholder for implementation screenshots (before and after)&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-3.-schema.db-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;Schema.db&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We also need to remove the foreign key reference to &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model since the &amp;lt;code&amp;gt;Participant&amp;lt;/code&amp;gt; model already has access to &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt;, and that is the &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; we should be referencing. This will also involve modifying the database to remove the foreign key reference to the &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Steps required:&lt;br /&gt;
&lt;br /&gt;
# Review the records in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; table in the database to see if there are any records and if those records have values for &amp;lt;code&amp;gt;assignment_id&amp;lt;/code&amp;gt;&lt;br /&gt;
# Create a migration file using the command: &amp;lt;code&amp;gt;rails generate migration RemoveAssignmentFromReviewBids&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the generated file, indicate the change that needs to be made using the change method and migration columns &amp;lt;code&amp;gt;remove_foreign_key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;remove_column&amp;lt;/code&amp;gt;. Migration should be straightforward since there is no cascading behavior (i.e., &amp;lt;code&amp;gt;dependent:destroy&amp;lt;/code&amp;gt;) to worry about.&lt;br /&gt;
# Once comfortable with the updates to the generated file, run the migration using the &amp;lt;code&amp;gt;rails db:migrate&amp;lt;/code&amp;gt; command.&lt;br /&gt;
# Run a query in the DB to ensure no orphaned records are in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; table after the updates.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Placeholder for implementation screenshots (before and after)&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-4.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implement Edge Case Testing ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| In the previous implementation wiki, there are edge cases which are not exhaustively tested. Should test those edge cases thoroughly and add more edge case testing - link&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section-2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mark&amp;quot;&amp;gt;TODO&amp;lt;/span&amp;gt;:We just got initial test results back. We still need to figure out why tests are failing and what may be slipping through the cracks.[[File:Test expertiza.png|411x459px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-8-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns and Principles ===&lt;br /&gt;
Below are the design patterns and principles we plan to use to address the problem statements outlined in the project requirements:&lt;br /&gt;
&lt;br /&gt;
* Single Responsibility Principle (SRP)&lt;br /&gt;
** Controller Responsibility&lt;br /&gt;
*** To address the issue of authentication logic residing in &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt;, we will refactor the code to ensure the controller solely handles request and response flows.&lt;br /&gt;
*** Authentication logic will be moved to dedicated methods in &amp;lt;code&amp;gt;AuthorizationHelper&amp;lt;/code&amp;gt;, making the codebase easier to maintain and test.&lt;br /&gt;
** View Simplification&lt;br /&gt;
*** Currently, the &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; view contains excessive business logic, violating SRP.&lt;br /&gt;
*** We will move this logic into helper methods or models, ensuring each component has a single responsibility and improving code readability.&lt;br /&gt;
&lt;br /&gt;
* Separation of Concerns (SoC)&lt;br /&gt;
** By relocating authorization logic out of the controller, we separate authentication from request handling.&lt;br /&gt;
** Adhering to SoC enhances readability and maintainability by allowing each part of the application to focus on its specific role.&lt;br /&gt;
* Don't Repeat Yourself (DRY)&lt;br /&gt;
** We will inspect the existing implementation for code duplication, particularly in the controller actions.&lt;br /&gt;
** Any repetitive code will be refactored or removed to reduce redundancy and improve clarity.&lt;br /&gt;
&lt;br /&gt;
* Model-View-Controller (MVC) Adherence&lt;br /&gt;
** Moving business logic from the view aligns with MVC best practices.&lt;br /&gt;
** By ensuring the view only presents data without processing it, we maintain clear boundaries between the model, view, and controller layers.&lt;br /&gt;
&lt;br /&gt;
* Dependency Inversion Principle (DIP)&lt;br /&gt;
** We plan to update class methods to instance methods, allowing the controller to depend on abstractions rather than concrete implementations.&lt;br /&gt;
** This change leverages Ruby's duck typing, providing flexibility and making the code easier to maintain and test.&lt;br /&gt;
&lt;br /&gt;
* Factory Pattern&lt;br /&gt;
** We will implement a factory pattern for the common processing of &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SignUpBid&amp;lt;/code&amp;gt;, encapsulating object creation and promoting code reuse.&lt;br /&gt;
&lt;br /&gt;
* Law of Demeter (Principle of Least Knowledge)&lt;br /&gt;
** We'll delegate interactions appropriately to prevent tightly coupled code, especially when dealing with topics and teams.&lt;br /&gt;
** Clear and intentional naming during refactoring will enhance code clarity and maintainability.&lt;br /&gt;
&lt;br /&gt;
* Adapter Pattern&lt;br /&gt;
** To add messaging to bid states for users, we'll use the adapter pattern to allow different components to work together without modifying their existing code.&lt;br /&gt;
&lt;br /&gt;
== Files Modified/Added ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-1.-controllers&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
&lt;br /&gt;
review_bids_controller.rb&lt;br /&gt;
&lt;br /&gt;
signup_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-2.-models&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&lt;br /&gt;
review_bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-3.-helpers&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Helpers ===&lt;br /&gt;
&lt;br /&gt;
authorization_helper.rb&lt;br /&gt;
&lt;br /&gt;
Review_bids_helper.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;viii.-test-plan&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
The Excel spreadsheet below details our test plan for testing the code we changed or created to ensure code coverage. The process involved reviewing the code and determining all the possible scenarios that needed to be covered based on what the method was doing, then creating test cases accordingly.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/spreadsheets/d/1iHzOdSwlTtxOtf5VsNdwOaCP8NzYMmiJ/edit?usp=drive_link Open Test Matrix Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
== Test Coverage ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;screenshot of SimpleCov coverage analysis&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x.-team&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x-1.-mentor&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Mentor ===&lt;br /&gt;
&lt;br /&gt;
* Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x-2.-members&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Members ===&lt;br /&gt;
&lt;br /&gt;
* Gavin Teague&lt;br /&gt;
* Janice Uwujaren&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;xi.-links&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
Previous Wiki: [https://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2151._Allow_reviewers_to_bid_on_what_to_review &amp;lt;u&amp;gt;Link&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;xii.-references&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/d/1LHVacylQmB15I6VcYUA5nuC7GRRU9szHzZhjlPcE-PA/edit?tab=t.0#heading=h.u0oycoj6e0ev &amp;lt;u&amp;gt;Project Instructions&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;appendix-a-uml-class-diagram-plantuml-code-for-review-bids&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2485._Allow_reviewers_to_bid_on_what_to_review&amp;diff=160830</id>
		<title>CSC/ECE 517 Fall 2024 - E2485. Allow reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2485._Allow_reviewers_to_bid_on_what_to_review&amp;diff=160830"/>
		<updated>2024-12-05T04:03:55Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* Updated Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project Overview ==&lt;br /&gt;
&lt;br /&gt;
This project will fix the defects and improve the functionality in Expertiza of the Reviewer Bidding feature, a process where reviewers can bid for assignments they want to review. It will make the functionality smoother, more reliable, and align with Expertiza's collaborative learning objectives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;iii.-problem-statements&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statements ==&lt;br /&gt;
&lt;br /&gt;
Assigning reviews to users on Expertiza involves a complex bidding algorithm that requires optimization before production deployment. Below are key areas we plan to address as per the project requirements:&lt;br /&gt;
* Code Refactoring and Best Practices&lt;br /&gt;
** '''Utilize Authentication Utilities''': Modify the &amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; function in the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; to use existing authentication utilities, enhancing code reusability and adhering to the Single Responsibility Principle (SRP) and Separation of Concerns (SoC).&lt;br /&gt;
** '''Eliminate Code Duplication''': Refactor &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; to comply with the Don't Repeat Yourself (DRY) principle.&lt;br /&gt;
** '''Rename Functions for Clarity''': Change &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; to better reflect its purpose.&lt;br /&gt;
** '''Refactor Methods in '''&amp;lt;code&amp;gt;review_bid.rb&amp;lt;/code&amp;gt;''':''': Convert class methods to instance methods or relocate them to helper classes for improved code organization.&lt;br /&gt;
* Functionality Enhancements&lt;br /&gt;
** '''Handle Missing Bids Gracefully''': Adjust the bidding algorithm to accommodate students who do not bid, allowing them to select from the remaining options.&lt;br /&gt;
** '''Support Both Individual and Team Assignments''': Ensure the code functions correctly for participant and team-based assignments when signing up for topics.&lt;br /&gt;
* User Interface Improvements&lt;br /&gt;
** '''Increase Transparency in the Bidding Process''': Display messages indicating how many students are eligible to bid, how many have submitted bids, and the deadline.&lt;br /&gt;
** '''Accurate Bid Status Indicators''': Ensure topic colors change correctly based on the number of outstanding bids, providing clear visual feedback to users.&lt;br /&gt;
* Testing and Validation&lt;br /&gt;
** '''Exhaustive Edge Case Testing''': Conduct thorough testing for edge cases not previously covered, adding additional test cases as needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;iv.-design-goals&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
&lt;br /&gt;
While addressing the existing defects and enhancing the Reviewer Bidding feature, we plan to adhere to the following design guidelines:&lt;br /&gt;
&lt;br /&gt;
* Code Quality and Maintainability&lt;br /&gt;
** '''Improve Code Structure: '''Implement refactoring strategies to enhance code readability and maintainability, ensuring adherence to best practices like the DRY principle.&lt;br /&gt;
** '''Standardize Authentication Logic: '''Utilize a centralized authentication utility to promote consistency and reusability across the application.&lt;br /&gt;
* System Stability and Flexibility&lt;br /&gt;
** '''Enhance Algorithm Robustness: '''Modify the bidding algorithm to handle scenarios where students do not bid, ensuring the system remains stable under all conditions.&lt;br /&gt;
** '''Ensure Assignment Versatility: '''Design the system to seamlessly support both individual and team assignments without additional configuration.&lt;br /&gt;
* User Experience Enhancements&lt;br /&gt;
** '''Increase Bidding Transparency: '''Develop user interface elements that clearly display bidding status, deadlines, and participation metrics.&lt;br /&gt;
** '''Implement Dynamic Visual Feedback: '''Use real-time visual cues, such as color changes, to inform users about the bidding status instantly.&lt;br /&gt;
* Testing and Validation&lt;br /&gt;
** '''Develop Comprehensive Test Suites: '''Create extensive automated tests covering edge cases and critical functionalities to guarantee reliable system behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;v.-uml-diagram&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UML Diagram ==&lt;br /&gt;
&lt;br /&gt;
Below is a visual representation of the models associated with the review bids functionality, depicting the data structures and their relationships.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml class diagram2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi.-implementation&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
'''ReviewBid: '''The &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; manages the bidding process, where participants indicate their preferences for reviewing different topics or assignments. This helps distribute review tasks fairly based on participants' interests.&lt;br /&gt;
&lt;br /&gt;
'''Assignment: '''The &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; model represents team or individual assignments in Expertiza. It stores all the essential information required to keep the assignment process organized, like managing participants, setting due dates, forming teams, and overseeing the review process.&lt;br /&gt;
&lt;br /&gt;
'''SignUpTopic: '''The &amp;lt;code&amp;gt;SignUpTopic&amp;lt;/code&amp;gt; model identifies specific topics or areas within an assignment for which participants can sign up. It manages the availability of these topics, tracks bids, coordinates team sign-ups, and assigns topics based on both bids and participant availability. &lt;br /&gt;
&lt;br /&gt;
'''Participant: '''The &amp;lt;code&amp;gt;Participant&amp;lt;/code&amp;gt; model is about the individual users who participate in an assignment. This includes students, instructors, teaching assistants, or other relevant roles. This model is responsible for managing key user information, monitoring interactions with the assignment, keeping track of team memberships, and recording things like badges and review grades.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-1.-decoupling-authorization-logic-from-reviewbidscontroller&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Decoupling Authorization Logic from &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| '''&amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; needs to use the authentication utilities'''&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; should use the available authentication utilities to support the Single Responsibility Principle and Separation of Concerns and to support code reusability.&lt;br /&gt;
&lt;br /&gt;
| '''Authentication Consistency:''' Remove authentication logic in the controller and call logic in the authentication utility class instead to ensure consistent use of the same logic across the application, foster reusability, and eliminate DRY.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
==== Authorization Flow Before Refactoring ====&lt;br /&gt;
The sequence diagram depicts the authorization process within the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt;. When a user invokes an action, the controller checks if the action is allowed by verifying the user's role through the &amp;lt;code&amp;gt;current_role_name()&amp;lt;/code&amp;gt; method in the &amp;lt;code&amp;gt;ApplicationController&amp;lt;/code&amp;gt;. Depending on the action and the user's role, the controller either authorizes the user to proceed or denies access, ultimately executing the action logic if authorized and responding to the user.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml sequence 1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-1-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We simplified the &amp;lt;code&amp;gt;action_allowed?&amp;lt;/code&amp;gt; method by decoupling authorization logic from the controller to use helper methods in the &amp;lt;code&amp;gt;AuthorizationHelper&amp;lt;/code&amp;gt; module. The &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; should not handle authentication, which is a violation of SRP. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;vertical-align:top;&amp;quot; | Original Code !! style=&amp;quot;vertical-align:top;&amp;quot; | Refactored Code&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div style=&amp;quot;vertical-align:top;&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
def action_allowed?&lt;br /&gt;
  case params[:action]&lt;br /&gt;
  when 'show', 'set_priority', 'index'&lt;br /&gt;
    ['Instructor',&lt;br /&gt;
     'Teaching Assistant',&lt;br /&gt;
     'Administrator',&lt;br /&gt;
     'Super-Administrator',&lt;br /&gt;
     'Student'].include? current_role_name and&lt;br /&gt;
        ((%w[list].include? action_name) ? are_needed_authorizations_present?(params[:id], &amp;quot;participant&amp;quot;, &amp;quot;reader&amp;quot;, &amp;quot;submitter&amp;quot;, &amp;quot;reviewer&amp;quot;) : true)&lt;br /&gt;
  else&lt;br /&gt;
    ['Instructor',&lt;br /&gt;
     'Teaching Assistant',&lt;br /&gt;
     'Administrator',&lt;br /&gt;
     'Super-Administrator'].include? current_role_name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|| &amp;lt;div style=&amp;quot;vertical-align:top;&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
def action_allowed?&lt;br /&gt;
  case params[:action]&lt;br /&gt;
  when 'show', 'set_priority', 'index', 'list'&lt;br /&gt;
    current_user_has_student_privileges? &amp;amp;&amp;amp; list_authorization_check&lt;br /&gt;
  else&lt;br /&gt;
    current_user_has_ta_privileges?&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Optimize &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; Functionality ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; is a DRY violation'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The function &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; violates DRY.&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-1.-signupsheetcontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
The ReviewBidsController's index method renders the review_bids_others_work action in &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt;. However, the &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; does not include the controller action for this view. We need to find the old implementation of the controller action, add it back, and review and update it for any DRY violations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # provides variables for reviewing page located at views/review_bids/others_work.html.erb&lt;br /&gt;
  def index&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
&lt;br /&gt;
    # Finding how many reviews have been completed&lt;br /&gt;
    @num_reviews_completed = 0&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      @num_reviews_completed += 1 if !map.response.empty? &amp;amp;&amp;amp; map.response.last.is_submitted&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # render view for completing reviews after review bidding has been completed&lt;br /&gt;
    render 'sign_up_sheet/review_bids_others_work'&lt;br /&gt;
  end  &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-2.-reviewbidsotherswork-view-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;review_bids_others_work.html.erb&amp;lt;/code&amp;gt; View Updates ====&lt;br /&gt;
&lt;br /&gt;
The code only contains a view with this name and no associated controller action. Reviewing the code in the view, we noticed some SRP violations where there is much logic in the presentation layer. Set up helper methods in the controller to handle some of that logic or see if the model can handle some of that logic.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-3.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rename &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; method ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; should be &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt;&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:''' Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The primary activity here is to refactor the method name &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; and fix the hardcoded URL. However, the match topic bidding algorithm no longer works since Heroku is no longer free, per the professor. The reference link below has detailed information about the web service that we can leverage to gain that understanding.&lt;br /&gt;
&lt;br /&gt;
Reference Link for Webservice Details: [https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2085._Allow_reviewers_to_bid_on_what_to_review &amp;lt;u&amp;gt;match_topics webservice link details&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-3-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to rename the &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; method to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; to make the functionality of the method clear. We also plan to verify that the method is working appropriately by mocking up the service call since it is no longer working.&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # Other methods&lt;br /&gt;
&lt;br /&gt;
  # Call webserver for running the assigning algorithm&lt;br /&gt;
  # Passing to webserver:&lt;br /&gt;
  # - student_ids&lt;br /&gt;
  # - topic_ids&lt;br /&gt;
  # - student_preferences&lt;br /&gt;
  # - time_stamps&lt;br /&gt;
  # Webserver returns:&lt;br /&gt;
  # - matched assignments as JSON body&lt;br /&gt;
  def run_bidding_algorithm(bidding_data)&lt;br /&gt;
    url = 'http://app-csc517.herokuapp.com/match_topics' # Hard coding for the time being&lt;br /&gt;
    response = RestClient.post url, bidding_data.to_json, content_type: 'application/json', accept: :json&lt;br /&gt;
    JSON.parse(response.body)&lt;br /&gt;
  rescue StandardError =&amp;gt; e&lt;br /&gt;
    Rails.logger.error &amp;quot;Bidding algorithm failed: #{e.message}&amp;quot;&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Updated Implementation ====&lt;br /&gt;
We implemented an update using mocked data and a service as placeholders until a new URL is in place. We did not end up refactoring to rename this method as we found that the name describes the functionality quite well.&lt;br /&gt;
&lt;br /&gt;
==== review_bids_controller ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
  def run_bidding_algorithm&lt;br /&gt;
    review_bid = ReviewBid.new&lt;br /&gt;
    bidding_data = review_bid.bidding_data&lt;br /&gt;
    matched_topics = BiddingAlgorithmService.new(bidding_data).run&lt;br /&gt;
    raise ArgumentError, 'Failed to assign reviewers. Please try again later.' unless matched_topics&lt;br /&gt;
&lt;br /&gt;
    matched_topics&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== bidding_algorithm_service ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
# frozen_string_literal: true&lt;br /&gt;
&lt;br /&gt;
# The `BiddingAlgorithmService` run the bid assignment algorithm&lt;br /&gt;
# Sends student IDs, topic IDs, student preferences, and timestamps to the web service&lt;br /&gt;
# The web service returns the matched assignments in the JSON response body&lt;br /&gt;
class BiddingAlgorithmService&lt;br /&gt;
  SERVICE_URL = 'http://app-csc517.herokuapp.com/match_topics'.freeze&lt;br /&gt;
&lt;br /&gt;
  # MOCK_DATA is based on the documentation detailing how the webservice behaves.&lt;br /&gt;
  # Reference: https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2085._Allow_reviewers_to_bid_on_what_to_review#Webservice&lt;br /&gt;
  MOCK_DATA = {&lt;br /&gt;
    36239 =&amp;gt; [3970, 3972, 3975],&lt;br /&gt;
    36240 =&amp;gt; [3973, 3974, 3972],&lt;br /&gt;
    36241 =&amp;gt; [3969, 3971, 3972],&lt;br /&gt;
    36242 =&amp;gt; [3969, 3971, 3973],&lt;br /&gt;
    36243 =&amp;gt; [3969, 3970, 3971]&lt;br /&gt;
  }.freeze&lt;br /&gt;
&lt;br /&gt;
  def initialize(bidding_data)&lt;br /&gt;
    @bidding_data = bidding_data&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def run&lt;br /&gt;
    return MOCK_DATA if Rails.application.config.use_mock_bidding_algorithm&lt;br /&gt;
&lt;br /&gt;
    perform_request&lt;br /&gt;
  rescue RestClient::ExceptionWithResponse, JSON::ParserError&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  private&lt;br /&gt;
&lt;br /&gt;
  def perform_request&lt;br /&gt;
    response = RestClient.post(&lt;br /&gt;
      SERVICE_URL,&lt;br /&gt;
      @bidding_data.to_json,&lt;br /&gt;
      content_type: :json,&lt;br /&gt;
      accept: :json&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    validate_response(response)&lt;br /&gt;
    JSON.parse(response.body)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def validate_response(response)&lt;br /&gt;
    raise 'Invalid response format' unless response.headers[:content_type] &amp;amp;&amp;amp; response.headers[:content_type].include?('application/json')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-3-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve Functionality Issues for Non Bidders ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Currently it doesn't work if some student does not bid. In this case, algorithm needs to be fixed to ignore anyone who didn’t bid, and let them choose from what’s left over.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to do several things within this controller. We will set a default state for non-bidders that we can point to to give them options to select topics to review from the leftovers. We will consolidate &amp;lt;code&amp;gt;@sign_up_topics&amp;lt;/code&amp;gt; to resolve the DRY violation. Lastly, we will remove business logic from the show method and push it to a new helper to conform to the SRP.&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # Additional method&lt;br /&gt;
&lt;br /&gt;
  # Provides variables for review bidding page&lt;br /&gt;
  def show&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id].to_i)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where(assignment_id: @assignment.id, private_to: nil)&lt;br /&gt;
    my_topic = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @sign_up_topics -= SignUpTopic.where(assignment_id: @assignment.id, id: my_topic)&lt;br /&gt;
    @num_participants = AssignmentParticipant.where(parent_id: @assignment.id).count&lt;br /&gt;
    @selected_topics = nil # This is used to list the topics assigned to review (i.e., select == assigned)&lt;br /&gt;
    @bids = ReviewBid.where(participant_id: @participant, assignment_id: @assignment.id)&lt;br /&gt;
    signed_up_topics = []&lt;br /&gt;
    &lt;br /&gt;
    @bids.each do |bid|&lt;br /&gt;
      sign_up_topic = SignUpTopic.find_by(id: bid.signuptopic_id)&lt;br /&gt;
      signed_up_topics &amp;lt;&amp;lt; sign_up_topic if sign_up_topic&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    signed_up_topics &amp;amp;= @sign_up_topics&lt;br /&gt;
    @sign_up_topics -= signed_up_topics&lt;br /&gt;
    @bids = signed_up_topics&lt;br /&gt;
    @num_of_topics = @sign_up_topics.size&lt;br /&gt;
    @assigned_review_maps = []&lt;br /&gt;
&lt;br /&gt;
    ReviewResponseMap.where(reviewed_object_id: @assignment.id, reviewer_id: @participant.id).each do |review_map|&lt;br /&gt;
      @assigned_review_maps &amp;lt;&amp;lt; review_map&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # Explicitly render view since it's in the sign up sheet views&lt;br /&gt;
    render 'sign_up_sheet/review_bids_show'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Additional methods&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-2.-reviewbidshelper-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
Business logic from the &amp;lt;code&amp;gt;show&amp;lt;/code&amp;gt; method in the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; will go here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-3.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Confirm Functionality for Single-person Teams ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Make sure your code works on individual assignments, i.e., assignments where participants sign up for topics instead of teams. In this case, a team is created for each participant when they sign up. So the code should work for assignments to which either individuals or teams submit.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to make an update to focus on topic rather than team or have it where teams are updated based on topic id.We will probably utilize sign up topic or a similar object to accomplish this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-5-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bid Status Messaging ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| To make the functionality more intuitive, include a message to say how many students are eligible to submit bids, how many have submitted their bids, when the deadline for submitting bids is.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section-1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
The logic for these messages will go into the helper file. It is effectively the same reasoning as our migration of other business/functionality code from the controller to the helper to conform to the SRP. It will go hand in hand with the SignUpTopic portion of the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-6-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refactor &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; Model ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Why are the methods in review_bid.rb class methods? Can we change them to instance methods or move it to helpers?&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-1.-reviewbid-model-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; Model Updates ====&lt;br /&gt;
Since the current class methods are tied to &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model instances, we will change them to instance methods. There is no need to move them to helpers.&lt;br /&gt;
&lt;br /&gt;
===== Review Bid Model Flow Before Refactoring =====&lt;br /&gt;
This sequence diagram describes how the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; interacts with the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model in assigning review topics to reviewers according to their bids. Once the &amp;lt;code&amp;gt;assign_bidding&amp;lt;/code&amp;gt; action is initiated by the user, the controller gathers the IDs of reviewers and calls &amp;lt;code&amp;gt;ReviewBid.bidding_data&amp;lt;/code&amp;gt; to gather bidding information. That is sent out to an external bidding algorithm, and the matched topics that come back are used by &amp;lt;code&amp;gt;ReviewBid.assign_review_topics&amp;lt;/code&amp;gt; to create &amp;lt;code&amp;gt;ReviewResponseMap&amp;lt;/code&amp;gt; entries, assigning topics to reviewers for the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml sequence 2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBid &amp;lt; ApplicationRecord&lt;br /&gt;
  belongs_to :topic, class_name: 'SignUpTopic'&lt;br /&gt;
  belongs_to :participant, class_name: 'Participant'&lt;br /&gt;
  belongs_to :assignment, class_name: 'Assignment'&lt;br /&gt;
&lt;br /&gt;
  # method to get bidding data&lt;br /&gt;
  # returns the bidding data needed for the assigning algorithm&lt;br /&gt;
  # student_ids, topic_ids, student_preferences, topic_preferences, max reviews allowed&lt;br /&gt;
&lt;br /&gt;
  def self.bidding_data(assignment_id, reviewer_ids)&lt;br /&gt;
    # create basic hash and set basic hash data&lt;br /&gt;
    bidding_data = { 'tid' =&amp;gt; [], 'users' =&amp;gt; {}, 'max_accepted_proposals' =&amp;gt; [] }&lt;br /&gt;
    bidding_data['tid'] = SignUpTopic.where(assignment_id: assignment_id).ids&lt;br /&gt;
    bidding_data['max_accepted_proposals'] = Assignment.where(id: assignment_id).pluck(:num_reviews_allowed).first&lt;br /&gt;
&lt;br /&gt;
    # loop through reviewer_ids to get reviewer specific bidding data&lt;br /&gt;
    reviewer_ids.each do |reviewer_id|&lt;br /&gt;
      bidding_data['users'][reviewer_id] = reviewer_bidding_data(reviewer_id, assignment_id)&lt;br /&gt;
    end&lt;br /&gt;
    bidding_data&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # assigns topics to reviews as matched by the webservice algorithm&lt;br /&gt;
  def self.assign_review_topics(assignment_id, reviewer_ids, matched_topics, _min_num_reviews = 2)&lt;br /&gt;
    # if review response map already created, delete it&lt;br /&gt;
    if ReviewResponseMap.where(reviewed_object_id: assignment_id)&lt;br /&gt;
      ReviewResponseMap.where(reviewed_object_id: assignment_id).destroy_all&lt;br /&gt;
    end&lt;br /&gt;
    # loop through reviewer_ids to assign reviews to each reviewer&lt;br /&gt;
    reviewer_ids.each do |reviewer_id|&lt;br /&gt;
      topics_to_assign = matched_topics[reviewer_id.to_s]&lt;br /&gt;
      topics_to_assign.each do |topic|&lt;br /&gt;
        assign_topic_to_reviewer(assignment_id, reviewer_id, topic)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # method to assign a single topic to a reviewer&lt;br /&gt;
  def self.assign_topic_to_reviewer(assignment_id, reviewer_id, topic)&lt;br /&gt;
    team_to_review = SignedUpTeam.where(topic_id: topic).pluck(:team_id).first&lt;br /&gt;
    team_to_review.nil? ? [] : ReviewResponseMap.create(reviewed_object_id: assignment_id, reviewer_id: reviewer_id, reviewee_id: team_to_review, type: 'ReviewResponseMap')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # method for getting individual reviewer_ids bidding data&lt;br /&gt;
  # returns user's bidding data hash&lt;br /&gt;
  def self.reviewer_bidding_data(reviewer_id, assignment_id)&lt;br /&gt;
    reviewer_user_id = AssignmentParticipant.find(reviewer_id).user_id&lt;br /&gt;
    self_topic = SignedUpTeam.topic_id(assignment_id, reviewer_user_id)&lt;br /&gt;
    bidding_data = { 'tid' =&amp;gt; [], 'otid' =&amp;gt; self_topic, 'priority' =&amp;gt; [], 'time' =&amp;gt; [] }&lt;br /&gt;
    bids = ReviewBid.where(participant_id: reviewer_id)&lt;br /&gt;
&lt;br /&gt;
    # loop through each bid for a topic to get specific data&lt;br /&gt;
    bids.each do |bid|&lt;br /&gt;
      bidding_data['tid'] &amp;lt;&amp;lt; bid.signuptopic_id&lt;br /&gt;
      bidding_data['priority'] &amp;lt;&amp;lt; bid.priority&lt;br /&gt;
      bidding_data['time'] &amp;lt;&amp;lt; bid.updated_at&lt;br /&gt;
    end&lt;br /&gt;
    bidding_data&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
Once we change them to instance methods, we’ll need to modify their use in the code to instantiate the object first.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Placeholder for implementation screenshots (before and after)&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-3.-schema.db-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;Schema.db&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We also need to remove the foreign key reference to &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model since the &amp;lt;code&amp;gt;Participant&amp;lt;/code&amp;gt; model already has access to &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt;, and that is the &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; we should be referencing. This will also involve modifying the database to remove the foreign key reference to the &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Steps required:&lt;br /&gt;
&lt;br /&gt;
# Review the records in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; table in the database to see if there are any records and if those records have values for &amp;lt;code&amp;gt;assignment_id&amp;lt;/code&amp;gt;&lt;br /&gt;
# Create a migration file using the command: &amp;lt;code&amp;gt;rails generate migration RemoveAssignmentFromReviewBids&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the generated file, indicate the change that needs to be made using the change method and migration columns &amp;lt;code&amp;gt;remove_foreign_key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;remove_column&amp;lt;/code&amp;gt;. Migration should be straightforward since there is no cascading behavior (i.e., &amp;lt;code&amp;gt;dependent:destroy&amp;lt;/code&amp;gt;) to worry about.&lt;br /&gt;
# Once comfortable with the updates to the generated file, run the migration using the &amp;lt;code&amp;gt;rails db:migrate&amp;lt;/code&amp;gt; command.&lt;br /&gt;
# Run a query in the DB to ensure no orphaned records are in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; table after the updates.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Placeholder for implementation screenshots (before and after)&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-4.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implement Edge Case Testing ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| In the previous implementation wiki, there are edge cases which are not exhaustively tested. Should test those edge cases thoroughly and add more edge case testing - link&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section-2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mark&amp;quot;&amp;gt;TODO&amp;lt;/span&amp;gt;:We just got initial test results back. We still need to figure out why tests are failing and what may be slipping through the cracks.[[File:Test expertiza.png|411x459px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-8-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns and Principles ===&lt;br /&gt;
Below are the design patterns and principles we plan to use to address the problem statements outlined in the project requirements:&lt;br /&gt;
&lt;br /&gt;
* Single Responsibility Principle (SRP)&lt;br /&gt;
** Controller Responsibility&lt;br /&gt;
*** To address the issue of authentication logic residing in &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt;, we will refactor the code to ensure the controller solely handles request and response flows.&lt;br /&gt;
*** Authentication logic will be moved to dedicated methods in &amp;lt;code&amp;gt;AuthorizationHelper&amp;lt;/code&amp;gt;, making the codebase easier to maintain and test.&lt;br /&gt;
** View Simplification&lt;br /&gt;
*** Currently, the &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; view contains excessive business logic, violating SRP.&lt;br /&gt;
*** We will move this logic into helper methods or models, ensuring each component has a single responsibility and improving code readability.&lt;br /&gt;
&lt;br /&gt;
* Separation of Concerns (SoC)&lt;br /&gt;
** By relocating authorization logic out of the controller, we separate authentication from request handling.&lt;br /&gt;
** Adhering to SoC enhances readability and maintainability by allowing each part of the application to focus on its specific role.&lt;br /&gt;
* Don't Repeat Yourself (DRY)&lt;br /&gt;
** We will inspect the existing implementation for code duplication, particularly in the controller actions.&lt;br /&gt;
** Any repetitive code will be refactored or removed to reduce redundancy and improve clarity.&lt;br /&gt;
&lt;br /&gt;
* Model-View-Controller (MVC) Adherence&lt;br /&gt;
** Moving business logic from the view aligns with MVC best practices.&lt;br /&gt;
** By ensuring the view only presents data without processing it, we maintain clear boundaries between the model, view, and controller layers.&lt;br /&gt;
&lt;br /&gt;
* Dependency Inversion Principle (DIP)&lt;br /&gt;
** We plan to update class methods to instance methods, allowing the controller to depend on abstractions rather than concrete implementations.&lt;br /&gt;
** This change leverages Ruby's duck typing, providing flexibility and making the code easier to maintain and test.&lt;br /&gt;
&lt;br /&gt;
* Factory Pattern&lt;br /&gt;
** We will implement a factory pattern for the common processing of &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SignUpBid&amp;lt;/code&amp;gt;, encapsulating object creation and promoting code reuse.&lt;br /&gt;
&lt;br /&gt;
* Law of Demeter (Principle of Least Knowledge)&lt;br /&gt;
** We'll delegate interactions appropriately to prevent tightly coupled code, especially when dealing with topics and teams.&lt;br /&gt;
** Clear and intentional naming during refactoring will enhance code clarity and maintainability.&lt;br /&gt;
&lt;br /&gt;
* Adapter Pattern&lt;br /&gt;
** To add messaging to bid states for users, we'll use the adapter pattern to allow different components to work together without modifying their existing code.&lt;br /&gt;
&lt;br /&gt;
== Files Modified/Added ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-1.-controllers&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
&lt;br /&gt;
review_bids_controller.rb&lt;br /&gt;
&lt;br /&gt;
signup_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-2.-models&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&lt;br /&gt;
review_bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-3.-helpers&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Helpers ===&lt;br /&gt;
&lt;br /&gt;
authorization_helper.rb&lt;br /&gt;
&lt;br /&gt;
Review_bids_helper.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;viii.-test-plan&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
The Excel spreadsheet below details our test plan for testing the code we changed or created to ensure code coverage. The process involved reviewing the code and determining all the possible scenarios that needed to be covered based on what the method was doing, then creating test cases accordingly.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/spreadsheets/d/1iHzOdSwlTtxOtf5VsNdwOaCP8NzYMmiJ/edit?usp=drive_link Open Test Matrix Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
== Test Coverage ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;screenshot of SimpleCov coverage analysis&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x.-team&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x-1.-mentor&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Mentor ===&lt;br /&gt;
&lt;br /&gt;
* Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x-2.-members&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Members ===&lt;br /&gt;
&lt;br /&gt;
* Gavin Teague&lt;br /&gt;
* Janice Uwujaren&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;xi.-links&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
Previous Wiki: [https://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2151._Allow_reviewers_to_bid_on_what_to_review &amp;lt;u&amp;gt;Link&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;xii.-references&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/d/1LHVacylQmB15I6VcYUA5nuC7GRRU9szHzZhjlPcE-PA/edit?tab=t.0#heading=h.u0oycoj6e0ev &amp;lt;u&amp;gt;Project Instructions&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;appendix-a-uml-class-diagram-plantuml-code-for-review-bids&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2485._Allow_reviewers_to_bid_on_what_to_review&amp;diff=160829</id>
		<title>CSC/ECE 517 Fall 2024 - E2485. Allow reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2485._Allow_reviewers_to_bid_on_what_to_review&amp;diff=160829"/>
		<updated>2024-12-05T04:03:09Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* Rename run_bidding_algorithm method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project Overview ==&lt;br /&gt;
&lt;br /&gt;
This project will fix the defects and improve the functionality in Expertiza of the Reviewer Bidding feature, a process where reviewers can bid for assignments they want to review. It will make the functionality smoother, more reliable, and align with Expertiza's collaborative learning objectives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;iii.-problem-statements&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statements ==&lt;br /&gt;
&lt;br /&gt;
Assigning reviews to users on Expertiza involves a complex bidding algorithm that requires optimization before production deployment. Below are key areas we plan to address as per the project requirements:&lt;br /&gt;
* Code Refactoring and Best Practices&lt;br /&gt;
** '''Utilize Authentication Utilities''': Modify the &amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; function in the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; to use existing authentication utilities, enhancing code reusability and adhering to the Single Responsibility Principle (SRP) and Separation of Concerns (SoC).&lt;br /&gt;
** '''Eliminate Code Duplication''': Refactor &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; to comply with the Don't Repeat Yourself (DRY) principle.&lt;br /&gt;
** '''Rename Functions for Clarity''': Change &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; to better reflect its purpose.&lt;br /&gt;
** '''Refactor Methods in '''&amp;lt;code&amp;gt;review_bid.rb&amp;lt;/code&amp;gt;''':''': Convert class methods to instance methods or relocate them to helper classes for improved code organization.&lt;br /&gt;
* Functionality Enhancements&lt;br /&gt;
** '''Handle Missing Bids Gracefully''': Adjust the bidding algorithm to accommodate students who do not bid, allowing them to select from the remaining options.&lt;br /&gt;
** '''Support Both Individual and Team Assignments''': Ensure the code functions correctly for participant and team-based assignments when signing up for topics.&lt;br /&gt;
* User Interface Improvements&lt;br /&gt;
** '''Increase Transparency in the Bidding Process''': Display messages indicating how many students are eligible to bid, how many have submitted bids, and the deadline.&lt;br /&gt;
** '''Accurate Bid Status Indicators''': Ensure topic colors change correctly based on the number of outstanding bids, providing clear visual feedback to users.&lt;br /&gt;
* Testing and Validation&lt;br /&gt;
** '''Exhaustive Edge Case Testing''': Conduct thorough testing for edge cases not previously covered, adding additional test cases as needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;iv.-design-goals&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
&lt;br /&gt;
While addressing the existing defects and enhancing the Reviewer Bidding feature, we plan to adhere to the following design guidelines:&lt;br /&gt;
&lt;br /&gt;
* Code Quality and Maintainability&lt;br /&gt;
** '''Improve Code Structure: '''Implement refactoring strategies to enhance code readability and maintainability, ensuring adherence to best practices like the DRY principle.&lt;br /&gt;
** '''Standardize Authentication Logic: '''Utilize a centralized authentication utility to promote consistency and reusability across the application.&lt;br /&gt;
* System Stability and Flexibility&lt;br /&gt;
** '''Enhance Algorithm Robustness: '''Modify the bidding algorithm to handle scenarios where students do not bid, ensuring the system remains stable under all conditions.&lt;br /&gt;
** '''Ensure Assignment Versatility: '''Design the system to seamlessly support both individual and team assignments without additional configuration.&lt;br /&gt;
* User Experience Enhancements&lt;br /&gt;
** '''Increase Bidding Transparency: '''Develop user interface elements that clearly display bidding status, deadlines, and participation metrics.&lt;br /&gt;
** '''Implement Dynamic Visual Feedback: '''Use real-time visual cues, such as color changes, to inform users about the bidding status instantly.&lt;br /&gt;
* Testing and Validation&lt;br /&gt;
** '''Develop Comprehensive Test Suites: '''Create extensive automated tests covering edge cases and critical functionalities to guarantee reliable system behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;v.-uml-diagram&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UML Diagram ==&lt;br /&gt;
&lt;br /&gt;
Below is a visual representation of the models associated with the review bids functionality, depicting the data structures and their relationships.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml class diagram2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi.-implementation&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
'''ReviewBid: '''The &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; manages the bidding process, where participants indicate their preferences for reviewing different topics or assignments. This helps distribute review tasks fairly based on participants' interests.&lt;br /&gt;
&lt;br /&gt;
'''Assignment: '''The &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; model represents team or individual assignments in Expertiza. It stores all the essential information required to keep the assignment process organized, like managing participants, setting due dates, forming teams, and overseeing the review process.&lt;br /&gt;
&lt;br /&gt;
'''SignUpTopic: '''The &amp;lt;code&amp;gt;SignUpTopic&amp;lt;/code&amp;gt; model identifies specific topics or areas within an assignment for which participants can sign up. It manages the availability of these topics, tracks bids, coordinates team sign-ups, and assigns topics based on both bids and participant availability. &lt;br /&gt;
&lt;br /&gt;
'''Participant: '''The &amp;lt;code&amp;gt;Participant&amp;lt;/code&amp;gt; model is about the individual users who participate in an assignment. This includes students, instructors, teaching assistants, or other relevant roles. This model is responsible for managing key user information, monitoring interactions with the assignment, keeping track of team memberships, and recording things like badges and review grades.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-1.-decoupling-authorization-logic-from-reviewbidscontroller&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Decoupling Authorization Logic from &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| '''&amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; needs to use the authentication utilities'''&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;action_allowed&amp;lt;/code&amp;gt; should use the available authentication utilities to support the Single Responsibility Principle and Separation of Concerns and to support code reusability.&lt;br /&gt;
&lt;br /&gt;
| '''Authentication Consistency:''' Remove authentication logic in the controller and call logic in the authentication utility class instead to ensure consistent use of the same logic across the application, foster reusability, and eliminate DRY.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
==== Authorization Flow Before Refactoring ====&lt;br /&gt;
The sequence diagram depicts the authorization process within the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt;. When a user invokes an action, the controller checks if the action is allowed by verifying the user's role through the &amp;lt;code&amp;gt;current_role_name()&amp;lt;/code&amp;gt; method in the &amp;lt;code&amp;gt;ApplicationController&amp;lt;/code&amp;gt;. Depending on the action and the user's role, the controller either authorizes the user to proceed or denies access, ultimately executing the action logic if authorized and responding to the user.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml sequence 1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-1-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We simplified the &amp;lt;code&amp;gt;action_allowed?&amp;lt;/code&amp;gt; method by decoupling authorization logic from the controller to use helper methods in the &amp;lt;code&amp;gt;AuthorizationHelper&amp;lt;/code&amp;gt; module. The &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; should not handle authentication, which is a violation of SRP. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;vertical-align:top;&amp;quot; | Original Code !! style=&amp;quot;vertical-align:top;&amp;quot; | Refactored Code&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div style=&amp;quot;vertical-align:top;&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
def action_allowed?&lt;br /&gt;
  case params[:action]&lt;br /&gt;
  when 'show', 'set_priority', 'index'&lt;br /&gt;
    ['Instructor',&lt;br /&gt;
     'Teaching Assistant',&lt;br /&gt;
     'Administrator',&lt;br /&gt;
     'Super-Administrator',&lt;br /&gt;
     'Student'].include? current_role_name and&lt;br /&gt;
        ((%w[list].include? action_name) ? are_needed_authorizations_present?(params[:id], &amp;quot;participant&amp;quot;, &amp;quot;reader&amp;quot;, &amp;quot;submitter&amp;quot;, &amp;quot;reviewer&amp;quot;) : true)&lt;br /&gt;
  else&lt;br /&gt;
    ['Instructor',&lt;br /&gt;
     'Teaching Assistant',&lt;br /&gt;
     'Administrator',&lt;br /&gt;
     'Super-Administrator'].include? current_role_name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|| &amp;lt;div style=&amp;quot;vertical-align:top;&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
def action_allowed?&lt;br /&gt;
  case params[:action]&lt;br /&gt;
  when 'show', 'set_priority', 'index', 'list'&lt;br /&gt;
    current_user_has_student_privileges? &amp;amp;&amp;amp; list_authorization_check&lt;br /&gt;
  else&lt;br /&gt;
    current_user_has_ta_privileges?&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Optimize &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; Functionality ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; is a DRY violation'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The function &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; violates DRY.&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-1.-signupsheetcontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
The ReviewBidsController's index method renders the review_bids_others_work action in &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt;. However, the &amp;lt;code&amp;gt;SignUpSheetController&amp;lt;/code&amp;gt; does not include the controller action for this view. We need to find the old implementation of the controller action, add it back, and review and update it for any DRY violations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # provides variables for reviewing page located at views/review_bids/others_work.html.erb&lt;br /&gt;
  def index&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
&lt;br /&gt;
    # Finding how many reviews have been completed&lt;br /&gt;
    @num_reviews_completed = 0&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      @num_reviews_completed += 1 if !map.response.empty? &amp;amp;&amp;amp; map.response.last.is_submitted&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # render view for completing reviews after review bidding has been completed&lt;br /&gt;
    render 'sign_up_sheet/review_bids_others_work'&lt;br /&gt;
  end  &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-2.-reviewbidsotherswork-view-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;review_bids_others_work.html.erb&amp;lt;/code&amp;gt; View Updates ====&lt;br /&gt;
&lt;br /&gt;
The code only contains a view with this name and no associated controller action. Reviewing the code in the view, we noticed some SRP violations where there is much logic in the presentation layer. Set up helper methods in the controller to handle some of that logic or see if the model can handle some of that logic.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-2-3.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rename &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; method ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; should be &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt;&lt;br /&gt;
| '''Code Readability and Maintainability:''' Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:''' Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The primary activity here is to refactor the method name &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; and fix the hardcoded URL. However, the match topic bidding algorithm no longer works since Heroku is no longer free, per the professor. The reference link below has detailed information about the web service that we can leverage to gain that understanding.&lt;br /&gt;
&lt;br /&gt;
Reference Link for Webservice Details: [https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2085._Allow_reviewers_to_bid_on_what_to_review &amp;lt;u&amp;gt;match_topics webservice link details&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-3-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to rename the &amp;lt;code&amp;gt;run_bidding_algorithm&amp;lt;/code&amp;gt; method to &amp;lt;code&amp;gt;assign_reviewers&amp;lt;/code&amp;gt; to make the functionality of the method clear. We also plan to verify that the method is working appropriately by mocking up the service call since it is no longer working.&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # Other methods&lt;br /&gt;
&lt;br /&gt;
  # Call webserver for running the assigning algorithm&lt;br /&gt;
  # Passing to webserver:&lt;br /&gt;
  # - student_ids&lt;br /&gt;
  # - topic_ids&lt;br /&gt;
  # - student_preferences&lt;br /&gt;
  # - time_stamps&lt;br /&gt;
  # Webserver returns:&lt;br /&gt;
  # - matched assignments as JSON body&lt;br /&gt;
  def run_bidding_algorithm(bidding_data)&lt;br /&gt;
    url = 'http://app-csc517.herokuapp.com/match_topics' # Hard coding for the time being&lt;br /&gt;
    response = RestClient.post url, bidding_data.to_json, content_type: 'application/json', accept: :json&lt;br /&gt;
    JSON.parse(response.body)&lt;br /&gt;
  rescue StandardError =&amp;gt; e&lt;br /&gt;
    Rails.logger.error &amp;quot;Bidding algorithm failed: #{e.message}&amp;quot;&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Updated Code ====&lt;br /&gt;
We implemented an update using mocked data and a service as placeholders until a new URL is in place. We did not end up refactoring to rename this method as we found that the name describes the functionality quite well. &lt;br /&gt;
&lt;br /&gt;
==== review_bids_controller ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
  def run_bidding_algorithm&lt;br /&gt;
    review_bid = ReviewBid.new&lt;br /&gt;
    bidding_data = review_bid.bidding_data&lt;br /&gt;
    matched_topics = BiddingAlgorithmService.new(bidding_data).run&lt;br /&gt;
    raise ArgumentError, 'Failed to assign reviewers. Please try again later.' unless matched_topics&lt;br /&gt;
&lt;br /&gt;
    matched_topics&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== bidding_algorithm_service ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
# frozen_string_literal: true&lt;br /&gt;
&lt;br /&gt;
# The `BiddingAlgorithmService` run the bid assignment algorithm&lt;br /&gt;
# Sends student IDs, topic IDs, student preferences, and timestamps to the web service&lt;br /&gt;
# The web service returns the matched assignments in the JSON response body&lt;br /&gt;
class BiddingAlgorithmService&lt;br /&gt;
  SERVICE_URL = 'http://app-csc517.herokuapp.com/match_topics'.freeze&lt;br /&gt;
&lt;br /&gt;
  # MOCK_DATA is based on the documentation detailing how the webservice behaves.&lt;br /&gt;
  # Reference: https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2085._Allow_reviewers_to_bid_on_what_to_review#Webservice&lt;br /&gt;
  MOCK_DATA = {&lt;br /&gt;
    36239 =&amp;gt; [3970, 3972, 3975],&lt;br /&gt;
    36240 =&amp;gt; [3973, 3974, 3972],&lt;br /&gt;
    36241 =&amp;gt; [3969, 3971, 3972],&lt;br /&gt;
    36242 =&amp;gt; [3969, 3971, 3973],&lt;br /&gt;
    36243 =&amp;gt; [3969, 3970, 3971]&lt;br /&gt;
  }.freeze&lt;br /&gt;
&lt;br /&gt;
  def initialize(bidding_data)&lt;br /&gt;
    @bidding_data = bidding_data&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def run&lt;br /&gt;
    return MOCK_DATA if Rails.application.config.use_mock_bidding_algorithm&lt;br /&gt;
&lt;br /&gt;
    perform_request&lt;br /&gt;
  rescue RestClient::ExceptionWithResponse, JSON::ParserError&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  private&lt;br /&gt;
&lt;br /&gt;
  def perform_request&lt;br /&gt;
    response = RestClient.post(&lt;br /&gt;
      SERVICE_URL,&lt;br /&gt;
      @bidding_data.to_json,&lt;br /&gt;
      content_type: :json,&lt;br /&gt;
      accept: :json&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    validate_response(response)&lt;br /&gt;
    JSON.parse(response.body)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def validate_response(response)&lt;br /&gt;
    raise 'Invalid response format' unless response.headers[:content_type] &amp;amp;&amp;amp; response.headers[:content_type].include?('application/json')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-3-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resolve Functionality Issues for Non Bidders ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Currently it doesn't work if some student does not bid. In this case, algorithm needs to be fixed to ignore anyone who didn’t bid, and let them choose from what’s left over.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-1.-reviewbidscontroller-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to do several things within this controller. We will set a default state for non-bidders that we can point to to give them options to select topics to review from the leftovers. We will consolidate &amp;lt;code&amp;gt;@sign_up_topics&amp;lt;/code&amp;gt; to resolve the DRY violation. Lastly, we will remove business logic from the show method and push it to a new helper to conform to the SRP.&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBidsController &amp;lt; ApplicationController&lt;br /&gt;
  require 'json'&lt;br /&gt;
  require 'uri'&lt;br /&gt;
  require 'net/http'&lt;br /&gt;
  require 'rest_client'&lt;br /&gt;
&lt;br /&gt;
  # Additional method&lt;br /&gt;
&lt;br /&gt;
  # Provides variables for review bidding page&lt;br /&gt;
  def show&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id].to_i)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where(assignment_id: @assignment.id, private_to: nil)&lt;br /&gt;
    my_topic = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @sign_up_topics -= SignUpTopic.where(assignment_id: @assignment.id, id: my_topic)&lt;br /&gt;
    @num_participants = AssignmentParticipant.where(parent_id: @assignment.id).count&lt;br /&gt;
    @selected_topics = nil # This is used to list the topics assigned to review (i.e., select == assigned)&lt;br /&gt;
    @bids = ReviewBid.where(participant_id: @participant, assignment_id: @assignment.id)&lt;br /&gt;
    signed_up_topics = []&lt;br /&gt;
    &lt;br /&gt;
    @bids.each do |bid|&lt;br /&gt;
      sign_up_topic = SignUpTopic.find_by(id: bid.signuptopic_id)&lt;br /&gt;
      signed_up_topics &amp;lt;&amp;lt; sign_up_topic if sign_up_topic&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    signed_up_topics &amp;amp;= @sign_up_topics&lt;br /&gt;
    @sign_up_topics -= signed_up_topics&lt;br /&gt;
    @bids = signed_up_topics&lt;br /&gt;
    @num_of_topics = @sign_up_topics.size&lt;br /&gt;
    @assigned_review_maps = []&lt;br /&gt;
&lt;br /&gt;
    ReviewResponseMap.where(reviewed_object_id: @assignment.id, reviewer_id: @participant.id).each do |review_map|&lt;br /&gt;
      @assigned_review_maps &amp;lt;&amp;lt; review_map&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # Explicitly render view since it's in the sign up sheet views&lt;br /&gt;
    render 'sign_up_sheet/review_bids_show'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Additional methods&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-2.-reviewbidshelper-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
Business logic from the &amp;lt;code&amp;gt;show&amp;lt;/code&amp;gt; method in the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; will go here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-4-3.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Confirm Functionality for Single-person Teams ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Make sure your code works on individual assignments, i.e., assignments where participants sign up for topics instead of teams. In this case, a team is created for each participant when they sign up. So the code should work for assignments to which either individuals or teams submit.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We plan to make an update to focus on topic rather than team or have it where teams are updated based on topic id.We will probably utilize sign up topic or a similar object to accomplish this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-5-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bid Status Messaging ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| To make the functionality more intuitive, include a message to say how many students are eligible to submit bids, how many have submitted their bids, when the deadline for submitting bids is.&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section-1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
The logic for these messages will go into the helper file. It is effectively the same reasoning as our migration of other business/functionality code from the controller to the helper to conform to the SRP. It will go hand in hand with the SignUpTopic portion of the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-6-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refactor &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; Model ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| Why are the methods in review_bid.rb class methods? Can we change them to instance methods or move it to helpers?&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-1.-reviewbid-model-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; Model Updates ====&lt;br /&gt;
Since the current class methods are tied to &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model instances, we will change them to instance methods. There is no need to move them to helpers.&lt;br /&gt;
&lt;br /&gt;
===== Review Bid Model Flow Before Refactoring =====&lt;br /&gt;
This sequence diagram describes how the &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; interacts with the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model in assigning review topics to reviewers according to their bids. Once the &amp;lt;code&amp;gt;assign_bidding&amp;lt;/code&amp;gt; action is initiated by the user, the controller gathers the IDs of reviewers and calls &amp;lt;code&amp;gt;ReviewBid.bidding_data&amp;lt;/code&amp;gt; to gather bidding information. That is sent out to an external bidding algorithm, and the matched topics that come back are used by &amp;lt;code&amp;gt;ReviewBid.assign_review_topics&amp;lt;/code&amp;gt; to create &amp;lt;code&amp;gt;ReviewResponseMap&amp;lt;/code&amp;gt; entries, assigning topics to reviewers for the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Uml sequence 2.png|800px]]&lt;br /&gt;
&lt;br /&gt;
===== Current Implementation =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class ReviewBid &amp;lt; ApplicationRecord&lt;br /&gt;
  belongs_to :topic, class_name: 'SignUpTopic'&lt;br /&gt;
  belongs_to :participant, class_name: 'Participant'&lt;br /&gt;
  belongs_to :assignment, class_name: 'Assignment'&lt;br /&gt;
&lt;br /&gt;
  # method to get bidding data&lt;br /&gt;
  # returns the bidding data needed for the assigning algorithm&lt;br /&gt;
  # student_ids, topic_ids, student_preferences, topic_preferences, max reviews allowed&lt;br /&gt;
&lt;br /&gt;
  def self.bidding_data(assignment_id, reviewer_ids)&lt;br /&gt;
    # create basic hash and set basic hash data&lt;br /&gt;
    bidding_data = { 'tid' =&amp;gt; [], 'users' =&amp;gt; {}, 'max_accepted_proposals' =&amp;gt; [] }&lt;br /&gt;
    bidding_data['tid'] = SignUpTopic.where(assignment_id: assignment_id).ids&lt;br /&gt;
    bidding_data['max_accepted_proposals'] = Assignment.where(id: assignment_id).pluck(:num_reviews_allowed).first&lt;br /&gt;
&lt;br /&gt;
    # loop through reviewer_ids to get reviewer specific bidding data&lt;br /&gt;
    reviewer_ids.each do |reviewer_id|&lt;br /&gt;
      bidding_data['users'][reviewer_id] = reviewer_bidding_data(reviewer_id, assignment_id)&lt;br /&gt;
    end&lt;br /&gt;
    bidding_data&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # assigns topics to reviews as matched by the webservice algorithm&lt;br /&gt;
  def self.assign_review_topics(assignment_id, reviewer_ids, matched_topics, _min_num_reviews = 2)&lt;br /&gt;
    # if review response map already created, delete it&lt;br /&gt;
    if ReviewResponseMap.where(reviewed_object_id: assignment_id)&lt;br /&gt;
      ReviewResponseMap.where(reviewed_object_id: assignment_id).destroy_all&lt;br /&gt;
    end&lt;br /&gt;
    # loop through reviewer_ids to assign reviews to each reviewer&lt;br /&gt;
    reviewer_ids.each do |reviewer_id|&lt;br /&gt;
      topics_to_assign = matched_topics[reviewer_id.to_s]&lt;br /&gt;
      topics_to_assign.each do |topic|&lt;br /&gt;
        assign_topic_to_reviewer(assignment_id, reviewer_id, topic)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # method to assign a single topic to a reviewer&lt;br /&gt;
  def self.assign_topic_to_reviewer(assignment_id, reviewer_id, topic)&lt;br /&gt;
    team_to_review = SignedUpTeam.where(topic_id: topic).pluck(:team_id).first&lt;br /&gt;
    team_to_review.nil? ? [] : ReviewResponseMap.create(reviewed_object_id: assignment_id, reviewer_id: reviewer_id, reviewee_id: team_to_review, type: 'ReviewResponseMap')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # method for getting individual reviewer_ids bidding data&lt;br /&gt;
  # returns user's bidding data hash&lt;br /&gt;
  def self.reviewer_bidding_data(reviewer_id, assignment_id)&lt;br /&gt;
    reviewer_user_id = AssignmentParticipant.find(reviewer_id).user_id&lt;br /&gt;
    self_topic = SignedUpTeam.topic_id(assignment_id, reviewer_user_id)&lt;br /&gt;
    bidding_data = { 'tid' =&amp;gt; [], 'otid' =&amp;gt; self_topic, 'priority' =&amp;gt; [], 'time' =&amp;gt; [] }&lt;br /&gt;
    bids = ReviewBid.where(participant_id: reviewer_id)&lt;br /&gt;
&lt;br /&gt;
    # loop through each bid for a topic to get specific data&lt;br /&gt;
    bids.each do |bid|&lt;br /&gt;
      bidding_data['tid'] &amp;lt;&amp;lt; bid.signuptopic_id&lt;br /&gt;
      bidding_data['priority'] &amp;lt;&amp;lt; bid.priority&lt;br /&gt;
      bidding_data['time'] &amp;lt;&amp;lt; bid.updated_at&lt;br /&gt;
    end&lt;br /&gt;
    bidding_data&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
Once we change them to instance methods, we’ll need to modify their use in the code to instantiate the object first.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Placeholder for implementation screenshots (before and after)&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-3.-schema.db-updates&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;Schema.db&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
We also need to remove the foreign key reference to &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; model since the &amp;lt;code&amp;gt;Participant&amp;lt;/code&amp;gt; model already has access to &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt;, and that is the &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt; we should be referencing. This will also involve modifying the database to remove the foreign key reference to the &amp;lt;code&amp;gt;Assignment&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Steps required:&lt;br /&gt;
&lt;br /&gt;
# Review the records in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; table in the database to see if there are any records and if those records have values for &amp;lt;code&amp;gt;assignment_id&amp;lt;/code&amp;gt;&lt;br /&gt;
# Create a migration file using the command: &amp;lt;code&amp;gt;rails generate migration RemoveAssignmentFromReviewBids&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the generated file, indicate the change that needs to be made using the change method and migration columns &amp;lt;code&amp;gt;remove_foreign_key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;remove_column&amp;lt;/code&amp;gt;. Migration should be straightforward since there is no cascading behavior (i.e., &amp;lt;code&amp;gt;dependent:destroy&amp;lt;/code&amp;gt;) to worry about.&lt;br /&gt;
# Once comfortable with the updates to the generated file, run the migration using the &amp;lt;code&amp;gt;rails db:migrate&amp;lt;/code&amp;gt; command.&lt;br /&gt;
# Run a query in the DB to ensure no orphaned records are in the &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; table after the updates.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Placeholder for implementation screenshots (before and after)&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-7-4.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implement Edge Case Testing ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Problem&lt;br /&gt;
! Design Goals&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;| In the previous implementation wiki, there are edge cases which are not exhaustively tested. Should test those edge cases thoroughly and add more edge case testing - link&lt;br /&gt;
| '''Code Readability and Maintainability:'''&lt;br /&gt;
&lt;br /&gt;
Refactor and simplify code, especially in places where the code violates the DRY principle, to reduce complexity and make the code base more straightforward to understand and maintain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''System Stability:'''&lt;br /&gt;
&lt;br /&gt;
Debug the existing bidding algorithm and fine-tune the assignment logic. Also, the existing functionality related to the reviewer bidding feature should work and be enhanced if required so that it does not fail in circumstances such as when a student does not bid.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;section-2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== &amp;lt;code&amp;gt;ReviewBidsHelper&amp;lt;/code&amp;gt; Updates ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mark&amp;quot;&amp;gt;TODO&amp;lt;/span&amp;gt;:We just got initial test results back. We still need to figure out why tests are failing and what may be slipping through the cracks.[[File:Test expertiza.png|411x459px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vi-8-2.-design-patternsprinciples&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns and Principles ===&lt;br /&gt;
Below are the design patterns and principles we plan to use to address the problem statements outlined in the project requirements:&lt;br /&gt;
&lt;br /&gt;
* Single Responsibility Principle (SRP)&lt;br /&gt;
** Controller Responsibility&lt;br /&gt;
*** To address the issue of authentication logic residing in &amp;lt;code&amp;gt;ReviewBidsController&amp;lt;/code&amp;gt;, we will refactor the code to ensure the controller solely handles request and response flows.&lt;br /&gt;
*** Authentication logic will be moved to dedicated methods in &amp;lt;code&amp;gt;AuthorizationHelper&amp;lt;/code&amp;gt;, making the codebase easier to maintain and test.&lt;br /&gt;
** View Simplification&lt;br /&gt;
*** Currently, the &amp;lt;code&amp;gt;review_bids_others_work&amp;lt;/code&amp;gt; view contains excessive business logic, violating SRP.&lt;br /&gt;
*** We will move this logic into helper methods or models, ensuring each component has a single responsibility and improving code readability.&lt;br /&gt;
&lt;br /&gt;
* Separation of Concerns (SoC)&lt;br /&gt;
** By relocating authorization logic out of the controller, we separate authentication from request handling.&lt;br /&gt;
** Adhering to SoC enhances readability and maintainability by allowing each part of the application to focus on its specific role.&lt;br /&gt;
* Don't Repeat Yourself (DRY)&lt;br /&gt;
** We will inspect the existing implementation for code duplication, particularly in the controller actions.&lt;br /&gt;
** Any repetitive code will be refactored or removed to reduce redundancy and improve clarity.&lt;br /&gt;
&lt;br /&gt;
* Model-View-Controller (MVC) Adherence&lt;br /&gt;
** Moving business logic from the view aligns with MVC best practices.&lt;br /&gt;
** By ensuring the view only presents data without processing it, we maintain clear boundaries between the model, view, and controller layers.&lt;br /&gt;
&lt;br /&gt;
* Dependency Inversion Principle (DIP)&lt;br /&gt;
** We plan to update class methods to instance methods, allowing the controller to depend on abstractions rather than concrete implementations.&lt;br /&gt;
** This change leverages Ruby's duck typing, providing flexibility and making the code easier to maintain and test.&lt;br /&gt;
&lt;br /&gt;
* Factory Pattern&lt;br /&gt;
** We will implement a factory pattern for the common processing of &amp;lt;code&amp;gt;ReviewBid&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SignUpBid&amp;lt;/code&amp;gt;, encapsulating object creation and promoting code reuse.&lt;br /&gt;
&lt;br /&gt;
* Law of Demeter (Principle of Least Knowledge)&lt;br /&gt;
** We'll delegate interactions appropriately to prevent tightly coupled code, especially when dealing with topics and teams.&lt;br /&gt;
** Clear and intentional naming during refactoring will enhance code clarity and maintainability.&lt;br /&gt;
&lt;br /&gt;
* Adapter Pattern&lt;br /&gt;
** To add messaging to bid states for users, we'll use the adapter pattern to allow different components to work together without modifying their existing code.&lt;br /&gt;
&lt;br /&gt;
== Files Modified/Added ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-1.-controllers&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Controllers ===&lt;br /&gt;
&lt;br /&gt;
review_bids_controller.rb&lt;br /&gt;
&lt;br /&gt;
signup_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-2.-models&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&lt;br /&gt;
review_bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;vii-3.-helpers&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Helpers ===&lt;br /&gt;
&lt;br /&gt;
authorization_helper.rb&lt;br /&gt;
&lt;br /&gt;
Review_bids_helper.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;viii.-test-plan&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
The Excel spreadsheet below details our test plan for testing the code we changed or created to ensure code coverage. The process involved reviewing the code and determining all the possible scenarios that needed to be covered based on what the method was doing, then creating test cases accordingly.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/spreadsheets/d/1iHzOdSwlTtxOtf5VsNdwOaCP8NzYMmiJ/edit?usp=drive_link Open Test Matrix Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
== Test Coverage ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;screenshot of SimpleCov coverage analysis&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x.-team&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x-1.-mentor&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Mentor ===&lt;br /&gt;
&lt;br /&gt;
* Ed Gehringer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;x-2.-members&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Members ===&lt;br /&gt;
&lt;br /&gt;
* Gavin Teague&lt;br /&gt;
* Janice Uwujaren&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;xi.-links&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
Previous Wiki: [https://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2151._Allow_reviewers_to_bid_on_what_to_review &amp;lt;u&amp;gt;Link&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;xii.-references&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/d/1LHVacylQmB15I6VcYUA5nuC7GRRU9szHzZhjlPcE-PA/edit?tab=t.0#heading=h.u0oycoj6e0ev &amp;lt;u&amp;gt;Project Instructions&amp;lt;/u&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;appendix-a-uml-class-diagram-plantuml-code-for-review-bids&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158343</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158343"/>
		<updated>2024-10-30T02:51:06Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* Relevant Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157385</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157385"/>
		<updated>2024-10-29T04:41:48Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* Code Changes in Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157384</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157384"/>
		<updated>2024-10-29T04:40:59Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: updated with test changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test_auto_assign_mentor.png&amp;diff=157378</id>
		<title>File:Test auto assign mentor.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test_auto_assign_mentor.png&amp;diff=157378"/>
		<updated>2024-10-29T04:27:10Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Meeting_date_factory.png&amp;diff=157369</id>
		<title>File:Meeting date factory.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Meeting_date_factory.png&amp;diff=157369"/>
		<updated>2024-10-29T03:53:34Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157365</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157365"/>
		<updated>2024-10-29T02:50:36Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* _team.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capacity_and_%2B.png&amp;diff=157363</id>
		<title>File:Capacity and +.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capacity_and_%2B.png&amp;diff=157363"/>
		<updated>2024-10-29T02:49:58Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: Gwteague uploaded a new version of File:Capacity and +.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157362</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157362"/>
		<updated>2024-10-29T02:45:39Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* _team.html.erb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+ Add Meeting&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Meeting_date_functionality.png&amp;diff=157361</id>
		<title>File:Meeting date functionality.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Meeting_date_functionality.png&amp;diff=157361"/>
		<updated>2024-10-29T02:41:11Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157360</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157360"/>
		<updated>2024-10-29T02:35:08Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: added in controller changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157356</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157356"/>
		<updated>2024-10-29T01:58:24Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: added refactored code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Previous_group_-_refactored.png&amp;diff=157355</id>
		<title>File:Previous group - refactored.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Previous_group_-_refactored.png&amp;diff=157355"/>
		<updated>2024-10-29T01:56:02Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157353</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157353"/>
		<updated>2024-10-29T01:52:00Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* Code Changes in Views */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view. We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompts points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157350</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157350"/>
		<updated>2024-10-29T01:43:19Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: added image and reformatted to keep rest of wiki looking orderly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view. We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompts points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157349</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157349"/>
		<updated>2024-10-29T01:36:55Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: /* Mentor Meeting Management */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view. We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompts points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capacity_and_%2B.png&amp;diff=157347</id>
		<title>File:Capacity and +.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capacity_and_%2B.png&amp;diff=157347"/>
		<updated>2024-10-29T01:24:53Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: Gwteague uploaded a new version of File:Capacity and +.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Meeting_parameters.png&amp;diff=157345</id>
		<title>File:Meeting parameters.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Meeting_parameters.png&amp;diff=157345"/>
		<updated>2024-10-29T01:18:39Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capacity_and_%2B.png&amp;diff=157344</id>
		<title>File:Capacity and +.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capacity_and_%2B.png&amp;diff=157344"/>
		<updated>2024-10-29T01:16:09Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157339</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157339"/>
		<updated>2024-10-29T00:39:25Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157338</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157338"/>
		<updated>2024-10-29T00:36:38Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
* understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
* Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
* Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
* Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
* Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
* Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
* The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
* Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
* Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team Mentor ==&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157336</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157336"/>
		<updated>2024-10-29T00:34:14Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
- understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
- Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
- Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
- Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
- Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
- Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
- The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
- Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
- Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team Mentor ==&lt;br /&gt;
- Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
- Anusha Akkireddy (aakkire)&lt;br /&gt;
- Simon Getahun (sgetahu)&lt;br /&gt;
- Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157335</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157335"/>
		<updated>2024-10-29T00:33:14Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: some reformatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2024 - E2403 Mentor-Meeting Management = &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
- understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
- Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
- Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
- Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
- Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
- Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
- The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
- Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
- Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team Mentor ==&lt;br /&gt;
Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Anusha Akkireddy (aakkire)&lt;br /&gt;
Simon Getahun (sgetahu)&lt;br /&gt;
Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157334</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=157334"/>
		<updated>2024-10-29T00:26:10Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: Backbone for E2460 - sligtly modified problem statement and included deliverables for scope. Now we each just need to fill in our sections.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2024 - E2403 Mentor-Meeting Management&lt;br /&gt;
&lt;br /&gt;
Contents&lt;br /&gt;
1	Background&lt;br /&gt;
2	What is a Mentor?&lt;br /&gt;
3	Problem Statement&lt;br /&gt;
4	Tasks&lt;br /&gt;
4.1	Email Notifications&lt;br /&gt;
4.2	Mentor Meeting Management&lt;br /&gt;
5	Implementation&lt;br /&gt;
5.1	Email Notifications&lt;br /&gt;
5.1.1	add_member&lt;br /&gt;
5.1.2	New Code in add_member&lt;br /&gt;
5.1.3	send_team_confirmation_mail_to_user&lt;br /&gt;
5.1.4	Modified generic_message&lt;br /&gt;
5.1.5	Student HTML Partial&lt;br /&gt;
5.1.6	Mentor HTML Partial&lt;br /&gt;
5.2	Mentor Meeting Management&lt;br /&gt;
5.2.1	New Mentor Meeting Management View&lt;br /&gt;
5.2.2	Code changes in the views&lt;br /&gt;
5.2.3	Code changes in the controller&lt;br /&gt;
5.2.4	Helper code&lt;br /&gt;
6	Relevant Links&lt;br /&gt;
7	Team&lt;br /&gt;
7.1	Mentor&lt;br /&gt;
7.2	Team Members&lt;br /&gt;
&lt;br /&gt;
Background&lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
What is a Mentor?&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
Problem Statement&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
Tasks&lt;br /&gt;
Email Notifications&lt;br /&gt;
- understand and reimplement previous team's code (or improve upon it)&lt;br /&gt;
&lt;br /&gt;
Mentor Meeting Management&lt;br /&gt;
- Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
- Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
- Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
- Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
- Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
- The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
Backend Controller Updates&lt;br /&gt;
- Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
- Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
Implementation&lt;br /&gt;
Email Notifications&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mentor Meeting Management&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backend Controller Updates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Relevant Links&lt;br /&gt;
Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
Team&lt;br /&gt;
Mentor&lt;br /&gt;
Nainisha Bhallamudi&lt;br /&gt;
Team Members&lt;br /&gt;
Anusha Akkireddy (aakkire)&lt;br /&gt;
Simon Getahun (sgetahu)&lt;br /&gt;
Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024&amp;diff=157332</id>
		<title>CSC/ECE 517 Fall 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024&amp;diff=157332"/>
		<updated>2024-10-28T23:29:24Z</updated>

		<summary type="html">&lt;p&gt;Gwteague: adding my teams wiki page to this library&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CSC/ECE 517 Fall 2024 - E2454. Refactor student_task.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2456. Refactor teams_user.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2459. View for results of bidding]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2461. UI for Courses]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2465. UI for Institutions and Notification]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2466. UI for Impersonate User]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2467. UI for View Submissions]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2469. Reimplement grades/view_team]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2480. Implement testing for new Bookmarks Controller]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2482. Reimplement heatgrid for reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management]]&lt;/div&gt;</summary>
		<author><name>Gwteague</name></author>
	</entry>
</feed>