CSC/ECE 517 Fall 2019 - Project E1947. Refactor quiz questionnaire controller.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 21: Line 21:
* Try to fix issues from Code Climate
* Try to fix issues from Code Climate


===About Versions Controller===
===About Quiz Questionnaire Controller===
This class manages different versions of reviews. If a reviewer reviews a submission, and after that, the author revises the submission, the next time the reviewer does a review (s)he will create a new version. Sometimes it’s necessary to find the current version of a review; sometimes it’s necessary to find all versions. Similarly, a user may want to delete the current version of a review, or all versions of a review. Pagination of versions helps the user to view a subset of versions at a time. Considering the huge number of versions in the system, it is very useful to have a pagination mechanism and a filtering mechanism which can be applied on the whole set of versions. The idea is to display the versions in an ordered, comprehensible and logical manner. In Expertiza the gem ‘will_paginate’ is used to achieve pagination.
This is a new controller, having recently been separated from questionnaires_controller.rb.  It is used to allow students to take quizzes.  The idea is that the author(s) of submitted work can write a quiz that is given to each reviewer before the reviewer is allowed to review the work. If the reviewer does badly on the quiz, then we know not to trust the review. It is also possible to set up an Expertiza assignment so that some participants just take the quiz and don’t review the work.


===Current Implementation===
===Current Implementation===

Revision as of 22:20, 22 October 2019

E1947. Refactoring quiz_questionnaire_controller.rb

This page provides a description of the Expertiza based OSS project.



About Expertiza

Expertiza is an open source project based on Ruby on Rails framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.

Problem Statement

The following tasks were accomplished in this project:

  • Rename the quiz_controller_controller.rb file such that it follows the coding standards
  • Rename methods by removing the '_quiz' because it's redundant
  • Add comments to methods and complex lines of code
  • Try to remove const_get method as it is unsafe reflection method
  • Simplify spec/controllers/quiz_questionnaire_controller_spec.rb
  • Try to fix issues from Code Climate

About Quiz Questionnaire Controller

This is a new controller, having recently been separated from questionnaires_controller.rb. It is used to allow students to take quizzes. The idea is that the author(s) of submitted work can write a quiz that is given to each reviewer before the reviewer is allowed to review the work. If the reviewer does badly on the quiz, then we know not to trust the review. It is also possible to set up an Expertiza assignment so that some participants just take the quiz and don’t review the work.

Current Implementation

Functionality
  • to-do
Drawbacks and Solutions
  • to-do

Code improvements

  • to-do

Automated Testing using RSPEC

  • to-do

Testing from UI

to-do

References

  1. Expertiza on GitHub
  2. GitHub Project Repository Fork
  3. The live Expertiza website
  4. Demo link
  5. Expertiza project documentation wiki
  6. Rspec Documentation
  7. Clean Code: A handbook of agile software craftsmanship. Author: Robert C Martin