CSC/ECE 517 Fall 2020 - E2068. Refactor quiz questionnaires controller.rb: Difference between revisions
No edit summary |
No edit summary |
||
Line 25: | Line 25: | ||
==Code Modifications== | ==Code Modifications== | ||
=Testing our Solutions= | |||
==Running Tests== | ==Running Tests== | ||
<code>rspec spec/controllers/quiz_questionnaires_controller.rb</code> | <code>rspec spec/controllers/quiz_questionnaires_controller.rb</code> | ||
==Testing Server== | |||
===Creating New Quiz=== | |||
Line 36: | Line 42: | ||
: Darby Madewell (demadewe) | : Darby Madewell (demadewe) | ||
: '''Mentor:''' Sanket Pai (sgpai) | : '''Mentor:''' Sanket Pai (sgpai) | ||
==References== | |||
*[https://github.com/expertiza/expertiza Expertiza on GitHub] | |||
*[https://github.com/Justin-Kirschner/expertiza GitHub E2068 Repository Fork] | |||
*[http://expertiza.ncsu.edu/ The live Expertiza website] | |||
*[http://research.csc.ncsu.edu/efg/expertiza Expertiza project Details] | |||
*[https://www.youtube.com/channel/UCdKXzox7hrWjfOMML6FzTWg Expertiza YouTube Channel] |
Revision as of 02:02, 10 October 2020
Introduction
This project contributes to Expertiza, an open-source project using Ruby on Rails. Expertiza is a platform for student learning that encourages active and cooperative learning while discouraging plagiarism.
Background
quiz_questionnaires_controller.rb is used in Expertiza to handle all functionality related to quizzes. A quiz is a type of questionnaire that allows reviewees to interact with their reviewers and making sure they read the submissions before reviewing. The student creating a quiz is supposed to ask questions related to their work, which, ideally, a reviewer should be able to answer. (If a reviewer cannot answer the questions about the reviewed work, then we might doubt the quality of that reviewer’s review.) This controller needs some changes as detailed below.
Issues
- Change the way min_question_score and max_question_score are set for @questionnaire on lines 39-40, as well as on lines 53-54.
- These statements set the max and min scores to 0 and 1 regardless of what the user enters, which is not intended.
- Change it so that the values are set according to what the user enters from the UI.
- Change the error message on line 78:
- Consider lines 259-265, different methods are called with the same parameters (question, choice_key, q_choices) to create different types of questions, depending on q_type.
- Make appropriate changes to tests so that they pass after the above changes.
Implementation
Files Involved
- app/controllers/quiz_questionnaires_controller.rb
- app/views/questionnaires/_quiz_questionnaire.html.erb
- app/views/questionnaires/view.html.erb
- spec/controllers/quiz_questionnaires_controller_spec.rb
Code Modifications
Testing our Solutions
Running Tests
rspec spec/controllers/quiz_questionnaires_controller.rb
Testing Server
Creating New Quiz
Team Information
- Colleen "Bria" Engen (ceengen)
- Justin Kirschner (jkirsch)
- Darby Madewell (demadewe)
- Mentor: Sanket Pai (sgpai)