CSC/ECE 517 Fall 2023 - E2376. Reimplement student quizzes controller.rb

From Expertiza_Wiki
Revision as of 02:56, 16 November 2023 by Sleaston (talk | contribs) (→‎Design)
Jump to navigation Jump to search

Overview

Our team is tasked with creating the backend reimplementation of the student quizzes controller found in student_quizzes_controller.rb. We are to use SOLID principles and adhere to the Guidelines for Reimplementation.

Introduction To Expertiza System

The Expertiza system, a modular and multifunctional platform, empowers students to seamlessly submit assignments and quizzes while facilitating collaborative learning through features like peer review. Widely embraced by students, assistants, and professors, this advanced system streamlines academic assessments, fostering an efficient and interactive educational experience.

The main goal of student quizzes module is to give an environment for students to create quizzes for other students with same assignments, giving them a chance to learn in a collaborative setting where they can collectively enhance their understanding and support each other's learning journey.

Issues with Previous Functionality

Student quizzes are currently a discontinued function from Expertiza. This module orginally interacted with many other components such as questions and questionnaires. The complex structure along with faulty coding practices has resulted in a vulnerable and error prone system. With reimplementing student quizzes we believe many of those problems can be overcame.

Previous implementations of student quizzes were difficult to understand due to:

  • The controller not following CRUD methodology
  • The controller using vague names for variables.
  • Difficulty in setting up a sample quiz and testing
  • Test Driven Development (TDD) was not followed and tests created after the code. The code being in a unknown state led to tests that passed possibly buggy code.

Design

The student_quizzes_controller is responsible for creating, scoring, and recording responses to quizzes of reviewers. Reviewers are students of other teams with the same assignment.

Test Driven Development (TDD)

Our approach to developing Expertiza student quizzes will adhere to a test-driven design methodology. This means that we will be utilizing the test skeletons provided to us and tests for each component of the student quizzes module before implementing the corresponding functionalities. By following this rigorous testing approach, we ensure a reliable and thoroughly validated system, enhancing the overall quality and robustness of the Expertiza platform.

Objectives

  • Create: This operation involves the creation of new student quizzes, allowing instructors to input question numbers, set parameters, and establish quiz details. Currently, student_quizzes_controller does not have a direct create method.
  • Read: Enables users to retrieve and view existing student quizzes, accessing details such as questions, answers, and associated information for review or analysis. Currently, student_quizzes_controller does not have a direct read method.
  • Update: This operation allows users to modify or update student quizzes. It includes functionalities such as adjusting quiz parameters to keep content current and relevant. Currently, student_quizzes_controller does not have a direct update method.
  • Delete: Involves the removal of unwanted or outdated student quizzes, giving instructors the ability to manage and maintain the database of quizzes efficiently. Currently, student_quizzes_controller does not have a direct delete method.
  • Index: Index function is part of a controller action responsible for displaying information related to an assignment participant, their associated assignment, and quiz mappings for review. The code does currently have an index function, but the function will be optimized and made clearer for ease of understanding.
  • Calculate score: Calculate score function calculates the score of the participant by comparing the answers given by the users with the actual correct answers. This method will be optimized and edited to increase robustness. This will be a private method.
  • Other functions: Currently Student quizzes have many functions, while some of them are useful and beneficial, some of them can be edited, moved or reimplemented to follow SOLID and DRY principles. Other methods added to the controller outside of CRUD methods will be private methods.