CSC/ECE 517 Fall 2024 - E2454. Refactor student task.rb
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
Background
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.
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 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:
- student_task.rb
- student_task_controller.rb
- student_task_helper.rb
- student_task_spec.rb
New files added:
- 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
- Eathamukkala, Akarsh
- Koul, Anmol
- More, Harsh
References
- [Expertiza](https://expertiza.ncsu.edu/)
- [OSS Projects on Expertiza](https://docs.google.com/document/d/1fB9nHsop_yptjcj3CFn80BcZjXcSDbzcWwKvBDUTVrQ/edit?tab=t.0)
- [Github](https://github.com/expertiza/expertiza)
- [Pull Request](https://github.com/expertiza/expertiza/pull/2859)
- [Expertiza VCL Server](http://)