CSC/ECE 517 Fall 2021 - E2121. Refactor suggestion controller.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Created page with "==E2121. Refactor suggestion controller== This page provides a description of the Expertiza based OSS project. __TOC__ ===About Expertiza=== [http://expertiza.ncsu.edu/...")
 
Line 14: Line 14:
The following tasks were accomplished in this project:
The following tasks were accomplished in this project:


* Improved the clarity of code by improving the variable and parameter names.
* Line 76 and 77: use more Ruby-like String concepts
* Long character strings were taken and given appropriate names.
* Line 94: Refactor create_new_team to assignment_team.rb
* Handled pagination by a separate helper module, which can be used by multiple controllers.
* Line 125: Refactor notification to simplify control logic.
* Implemented action_allowed for access_control to prevent unauthorized access of methods.
* Line 160: Refactor approve_suggestion to indicate that notification is being sent.
* Prevented displaying of all versions for all users and tables when a user views the index page.
* Test functions and increase coverage:
* Added missing CRUD methods to Versions Controller
** Check error in approve
* Added RSPEC testcases for testing changes done in Versions Controller
** Test reject_suggestion
** Test when topic_id.nil? to make sure the waitlist is cleared.
** Test the submit, student_view, student_edit, update_suggestion, add_comment function

Revision as of 00:09, 20 October 2021

E2121. Refactor suggestion controller

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:

  • Line 76 and 77: use more Ruby-like String concepts
  • Line 94: Refactor create_new_team to assignment_team.rb
  • Line 125: Refactor notification to simplify control logic.
  • Line 160: Refactor approve_suggestion to indicate that notification is being sent.
  • Test functions and increase coverage:
    • Check error in approve
    • Test reject_suggestion
    • Test when topic_id.nil? to make sure the waitlist is cleared.
    • Test the submit, student_view, student_edit, update_suggestion, add_comment function