CSC/ECE 517 Fall 2023 - E2350. Allow reviewers to bid on what to review

From Expertiza_Wiki
Jump to navigation Jump to search

This wiki page is for the information regarding the changes made for the E2231 OSS assignment for Spring 2022, CSC/ECE 517.

Team

Mentor

  • Srilekha Gudipati (sngudipa)

Team Members

  • Amulya Usem (ausem)
  • Gowtham Pollam (gpollam)
  • Basaveswara Mukesh Suryadevara (bsuryad)


Links

  • Pull request [1]
  • Github repo [2]
  • Deployed server [3]
Credentials : username - instructor6 password - password

Introduction

Expertiza is a open source project developed on Ruby on Rails. This web application is maintained by the student and faculty at NC State. This application gives complete control to the instructor to maintain the assignments in their class. With multiple functionalities such as adding topics, creating groups, and peer reviews, Expertiza is a well developed application that can handle all types of assignments. To learn more about the full functionality Expertiza has to offer, visit the Expertiza wiki.


Problem Statement

Assigning reviews to users is a complicated process. Currently, as per previous year’s implementation on Expertiza’s beta branch, reviews are assigned using the bidding algorithm. Although, the functionality works, but has some bugs which needs to be fixed before we can take it to production.

What needs to be done

  • Review_bids_others_work is a DRY violation
  • Run_bidding algorithm should be assign_reviewers
  • Currently it doesn't work if some student does not bid. In this case, algorithm needs to be fixed in order to assign arbitrary reviews to anyone who didn’t bid
  • Figure out why running the bidding algorithm only works on assignment with teams. What if the assignment does not have a team? Can we tweak the code to make it work in this case?
  • Include a flag to say how many students have submitted their bids, when the students should submit the bid by to make the functionality more intuitive
  • Ability to allow the algorithm to run again after running once.
  • Why are the methods in review_bid.rb class methods? Can we change them to instance methods or move it to helpers?
  • 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
  • Test whether the topic changes color depending on the number of outstanding bids


Soultions

Review_bids_others_work is a DRY violation

The file review_bids_others_work.html.erb has been refactored in order to resolve DRY violation by removing redundant code without impacting the current functionality.



Run_bidding algorithm should be assign_reviewers

run_bidding_algorithm was refactored to assign_reviewers. Accordingly, all the other instances of this were modified too.



Currently it doesn't work if some student does not bid. In this case, the algorithm needs to be fixed in order to assign arbitrary reviews to anyone who didn’t bid

The code was modified to assign random reviews to students in case they didn't bid for any.



Figure out why running the bidding algorithm only works on assignments with teams. What if the assignment does not have a team? Can we tweak the code to make it work in this case?

Currently, it is mandatory to have a team but we can still make the team be assigned a project even if the team has only one member since there is no settings to place a minimum member cap. Although the member will have to create a team and assign a name so that the member can place a bid.

Include a flag to say how many students have submitted their bids, when the students should submit the bid by to make the functionality more intuitive

We have included a count variable in assign_bidding of controller review_bids_controller.rb. It helps us to keep track of the number of students bidding for reviews and is shown to the users in the view page.


Ability to allow the algorithm to run again after running once.

can_choose_topic_to_review attribute is handled so as to allow the user to refrain from clicking the button to run the algorithm again if done once already. So the attribute was removed for the visibility of the button Run Review Algorithm allowing the user to click and run the algorithm multiple times



Why are the methods in review_bid.rb class methods? Can we change them to instance methods or move it to helpers?

The methods in review_bid.rb are to get bidding data, to assign review topics, assign topic to reviewer and for getting individual reviewer_ids bidding data. These all are class methods. All the methods in review_bid.rb are converted into instance methods and other occurances were refactored to create an object and then call these methods.


In the previous implementation wiki, there are edge cases that are not exhaustively tested. Should test those edge cases thoroughly and add more edge case testing

Test cases were added and existing cases were modified for some edge scenarios.

Test whether the topic changes color depending on the number of outstanding bids

A test case was added in review_bids_helper_spec.rb that test the changes in background color based on the number of participants and outstanding size.



Test Plan

Case 1: Validate Model Validations

  • Ensure that ReviewBid model rejects entries without signuptopic_id.
  • Verify that participant_id is strictly numerical and not accepted as a string.

Case 2: Test Review Bid Parameters

  • Confirm that the signuptopic_id and priority fields return expected values.
  • Check that the updated_at field correctly accepts string inputs representing datetime.

Case 3: Assess Instance Method Changes

  • Refactor test cases to match the changed instance methods in review_bid.rb.
  • Confirm that the instance methods operate correctly with the new refactored test cases.

Case 4: Check New Attribute Functionality

  • Test the increment and decrement functionality of the new attribute to ensure correct behavior.

Case 5: Verify Button Enablement

  • Add a test to ensure the "Run Review Algorithm" button is active when it should be.
  • Confirm that the button's state changes appropriately under various conditions.

Case 6: Review Bids Helper Color Change

  • Test the background color change in review_bids_helper_spec.rb to make sure it reflects the number of participants and outstanding bids.

Case 7: Random Review Assignment without Bidding

  • Verify that reviews are randomly assigned to students who have not placed bids.
  • Ensure the randomness and fairness of the assignment process.

Case 8: Check Manual Bidding Count Display

  • Physically inspect the application to ensure that the count of bidding is accurately displayed at the provided URL.
  • Validate the correct incrementing and decrementing on the UI against various scenarios.

Case 9: UI Independence Check

  • Confirm that the application's backend functionalities are intact without the UI.
  • Test through direct links and verify that all endpoints are responsive and behave as expected.


References