E1911 Refactor Criterion

From Expertiza_Wiki
Revision as of 00:29, 26 March 2019 by Amadhus2 (talk | contribs)
Jump to navigation Jump to search

E1911 Refactoring criterion.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 bulk of the code in criterion is HTML. It is the violation of MVC architecture - Model should not concern itself with how the data is displayed. This code needs to be moved to a partial file, and the partial file needs to be called in all appropriate places which call the criterion’s model methods. Once the logic for view is moved out of the model, model should only be left with business logic. This business logic code can also be refactored. Plus there are virtually no comments, properly comment the code.