CSC/ECE 517 Fall 2021 - E2128. Refactor student quizzes controller.rb & late policies controller.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 73: Line 73:


<pre> # Gets all the questionnaire responses by all the teams for a particular assignment </pre>
<pre> # Gets all the questionnaire responses by all the teams for a particular assignment </pre>
=== Line 53-96 ===
----
< Add description here >
=== Line 108 ===
----
< Add description here >
== Modifications made to late_policies_controller ==
=== Issue 1 ===
----
< Add description here >
=== Issue 2 ===
----
< Add description here >
=== Issue 3 ===
----
< Add description here >

Revision as of 01:57, 21 October 2021

This wiki page is for the description of changes made under E2128 OSS assignment for Fall 2021, CSC/ECE 517.

Introduction

Expertiza is a web application developed using Ruby on Rails that serves as a peer-review system. The application allows students to submit and peer-review learning objects (articles, code, websites, etc)Expertiza on GitHub Expertiza Wiki Page. It is an open-source project and its codebase is maintained on GitHub. We are contributing to Expertiza as a part of our Object-Oriented Design and Development's Open-Source Software (OSS) Project. Our goal in this project is to refactor the StudentQuiz controller and LatePolicies Controller. In this Wiki Page, we would be explaining the changes that we have made for the same.

Modifications made to student_quizzes_controller

Line 24


< Add description here >

Before Refactoring
Method : finished_quiz

 @response = Response.where(map_id: params[:map_id]).first 

After Refactoring

 @response = Response.where(map_id: params[:map_id]).last # Get the last score if a student took a quiz multiple times 

Line 110


< Add description here >
Method : record_response
Before Refactoring

 flash[:error] = "You have already taken this quiz, below are the records for your responses." 

After Refactoring

 flash[:error] = "You have already taken this quiz. Please find your previous submission below." 


Line 98


< Add description here >

Method : calculate_score

After Refactoring

 # Saves the response by the student only if the student has not taken the quiz before. 

Line 34


< Add description here >
Method : self.take_quiz
Before Refactoring

 # Create an array of candidate quizzes for current reviewer 

After Refactoring

 # Returns an array of candidate quizzes for current reviewer 

Line 23


< Add description here >
Method : finished_quiz

After Refactoring

 # Gets the last submission for a quiz by a student 

Line 119


< Add description here >
Method : review_questions

Before Refactoring

 # This method is only for quiz questionnaires, it is called when instructors click "view quiz questions" on the pop-up panel. 

After Refactoring

 # Gets all the questionnaire responses by all the teams for a particular assignment 

Line 53-96


< Add description here >


Line 108


< Add description here >

Modifications made to late_policies_controller

Issue 1


< Add description here >

Issue 2


< Add description here >

Issue 3


< Add description here >