CSC/ECE 517 Fall 2024 - E2454. Refactor student task.rb

From Expertiza_Wiki
Revision as of 17:08, 28 October 2024 by Akoul2 (talk | contribs) (→‎Background)
Jump to navigation Jump to search

Expertiza

Expertiza is a web application through which students can submit and peer-review learning objects (articles, code, web sites, etc). The National Science Foundation supports the Expertiza project. It is used in select courses at NC State and by professors at several other colleges and universities.

[Expertiza](http://expertiza.ncsu.edu/) is a [Ruby on Rails](http://rubyonrails.org/) based open source project.

Problem Statement

This project focuses on refactoring the StudentTask class to improve the organization, functionality, and separation of concerns. Currently, the class contains a mix of utility and class methods, many of which are static and should be moved into helper modules or relevant model classes, or broken down into separate, more maintainable methods. The goal is to make the class more efficient and follow best practices in object-oriented programming.

Background

The StudentTask model is a significant part of the Expertiza website which maintains and handles student data who are participants under an assignment. Each assignment has a team, individual user participant and submission deadlines. The motive here is to refactor static methods called in the student_task.rb file and move them to helper classes for better object-oriented code design.

Refactor

The StudentTask model and controller do not strictly follow the SRP and DRY principles and needed a lot of refactoring to make them more manageable in following Object-Oriented design and development.

Files Modified

Changed files:

  • student_task.rb
  • student_task_controller.rb
  • student_task_helper.rb
  • student_task_spec.rb
  • student_task_helper_spec.rb

Refactoring

student_task.rb

student_task_controller.rb

student_task_helper.rb

student_task_spec.rb

student_task_helper_spec.rb

Test Cases for StudentTask Model, Controller and helper classes

Next Steps

We are yet to discuss the scope of this project and whether it can be extended to other functionalities in Expertiza.

Team

Mentor

  • Ammana, Sahithi

Members

  • Eathamukalla, Akarsh
  • Koul, Anmol
  • More, Harsh

References

  1. ["Expertiza"](https://expertiza.ncsu.edu/)
  2. ["OSS Projects on Expertiza"](https://docs.google.com/document/d/1fB9nHsop_yptjcj3CFn80BcZjXcSDbzcWwKvBDUTVrQ/edit?tab=t.0)
  3. ["Github"](https://github.com/expertiza/expertiza)
  4. ["Pull Request"](https://github.com/expertiza/expertiza/pull/2859)
  5. ["Expertiza VCL Server"](http://)