CSC/ECE 517 Spring 2022 - E2216: Refactor late policies controller: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
(Blanked the page)
Line 1: Line 1:
This page describes the changes made for the Spring 2022 OSS Project E2216: Refactoring late_policies_controller


== Description ==
Write a short description of the project
== Problems and Solutions ==
===='''Problem''':All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public & private late policies. Try to leverage code for private and public courses, assignments, and questionnaires.====
*'''Solution''':
===='''Problem''':create and update have some duplicate code. Fix that using a partial, _form.====
*'''Solution''':
===='''Problem''':Both create and update need comments and a better identifier naming.====
*'''Solution''':
===='''Problem''':Reduce code duplication. Find a way to make the code more DRY.====
*'''Solution''':
===='''Problem''':Line 64: The if condition can be simplified. ====
*'''Solution''':
===='''Problem''':Improve the variable name for same_policy_name. (Boolean variables can be named in a better way). ====
*'''Solution''':
===='''Problem''':Add method comments. ====
*'''Solution''':
===='''Problem''':Find the use of instance variables in create and update method? Do we really need it? Can it be made local variables instead? ====
*'''Solution''':
== Modified Files ==
(Add modified files and list of changes here)
== Testing ==
(Add any testing that were added)
=== Running Tests ===
<pre>
  rspec ./spec/controllers/late_policies_controller_spec.rb
</pre>
==Pull Request==
(Add pull request link here)

Revision as of 01:41, 21 March 2022