CSC/ECE 517 Spring 2022 - E2215: Refactor student quizzes controller

From Expertiza_Wiki
Jump to navigation Jump to search

About Expertiza

Expertiza is a multi-purpose web application built using Ruby on Rails for Students and Instructors. Instructors enrolled in Expertiza can create and customize classes, teams, assignments, quizzes, and many more. On the other hand, Students are also allowed to form teams, attempt quizzes, and complete assignments. Apart from that, Expertiza also allows students to provide peer reviews enabling them to work together to improve others' learning experiences. It is an open-source application and its Github repository is Expertiza.

E2215. Refactoring student_quizzes_controller.rb in Expertiza

This page is a description of Expertiza OSS project E2215, which is refactoring the student_quizzes_controller.rb file.

Controller Description

The student_quizzes_controller consists of methods involved in creating, scoring & recording responses of the quizzes taken by reviewers or students of the other teams with the same assignment. This controller has some issues that violate essential Rails design principles such as DRY principle. There are few methods in this controller that should have been in model classes. Some methods share code, which creates code repetition. Some method comments needs to be rewritten.

Files Involved

student_quizzes_controller.rb and
finished_quiz.html

Modifications made to the existing code

Tests on the Controller Methods