CSC/ECE 517 Spring 2020 - E2003. Refactor and improve assessment360 controller: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 56: Line 56:


The current implementation ran into an issue when it was comparing the Key-Value pair passed in '''peer_review_score'''. It was hard to check if each of the keys were present or not. The proposed solution makes use of the <b>[https://ruby-doc.org/core-2.3.0_preview1/Hash.html#method-i-dig dig]</b> function in Ruby that retrieves a value from the array/hash, given a set of keys. If no value is found, it'll return nil.
The current implementation ran into an issue when it was comparing the Key-Value pair passed in '''peer_review_score'''. It was hard to check if each of the keys were present or not. The proposed solution makes use of the <b>[https://ruby-doc.org/core-2.3.0_preview1/Hash.html#method-i-dig dig]</b> function in Ruby that retrieves a value from the array/hash, given a set of keys. If no value is found, it'll return nil.


==Team Information==
==Team Information==
Ramya Ananth
[mailto:rananth2@ncsu.edu Ramya Ananth] - [https://www.linkedin.com/in/ramyananth/ LinkedIn]


Sri Harsha Varma Uppalapati
[mailto:suppala@ncsu.edu Sri Harsha Varma Uppalapati] - [https://www.linkedin.com/in/sri-harsha-varma-uppalapati LinkedIn]


<b>Mentor: Dr. Edward Gehringer</b>
<b>[mailto:efg@ncsu.edu Mentor: Dr. Edward F Gehringer]</b> - [https://www.ece.ncsu.edu/people/efg/ Website]


==References==
==References==

Revision as of 20:45, 22 March 2020

About Expertiza

Expertiza is an open-source project based on Ruby on Rails framework. The software allows the instructor and students with the following privileges,

Instructors

  • Create new assignments
  • Customize new or existing assignments
  • Create a list of topics that students can sign up for
  • Give grades/reviews for the students' submissions

Students

  • Form teams with other students to work on various projects and assignments
  • Peer review other students' submissions

Note: Expertiza supports submissions across various document types, including URL and wiki pages

Project Description

About assessment_360 Controller

The assessment_360 controller is designed to gather data from all stakeholders about the performance of a student in a course. Thus, its purpose is to provide course-level statistics. At present, the controller provides only two top-level functions where each of them gives a list of students in the class.

  • all_students_all_reviews contains teammate and meta-review scores received by students for all assignments in the course
  • course_student_grade_summary gives a listing of students and what topic they worked on and what grade they received on each assignment during the semester

Problem Statement

The assessment360 controller had three major issues. This project is aimed to address some of them, including:

Issue 1: Methods all_students_all_reviews and course_student_grade_summary were too long. Common initialization and looping had to factored out by moving them into smaller methods with mnemonic names

Issue 2: Method populate_hash_for_all_students_all_reviews is not easy to understand. It uses a special data structure to do a very simple task. That had to be refactored

Issue 3: Method course_student_grade_summary stopped working and has to be fixed

Motivation

This project aims at encouraging students to collaborate and contribute to open-source project in turn helping them understand what goes on in a full-fledged software deployment process. It also paves a way to understand how one can use Rails, RSpec to develop a system that does justice to the DRY code practicing principles.

Proposed Implementation

Problem 1: Refactoring all_students_all_reviews and course_student_grade_summary

(a) The common elements in these files i.e., checking if the course participant list is empty or not is moved to a different function called inspect_course_participants

(b) Adding on to this, all_student_all_review was broken down to two more functions, review_info_per_student and avoid_divide_by_zero_error

(c) The method course_student_grade_summary is broken down to one more function assignment_grade_summary

Problem 2: Refactoring populate_hash_for_all_students_all_reviews

The approach in this function is pretty straight forward when we try to break it down. It calculates,

(a) The average score for each assignment for each course

(b) The overall review grade for each assignment for all the students who have taken the course

Passing the average score calculated from (a) checks if the student has teammates which could result in not having an average teammate_review_score. If we calculate (b) in our main function (this can be done) we would be repeating the checks that we are already doing for (a). Hence, this function is not changed

Problem 3: Fix course_student_grade_summary

The current implementation ran into an issue when it was comparing the Key-Value pair passed in peer_review_score. It was hard to check if each of the keys were present or not. The proposed solution makes use of the dig function in Ruby that retrieves a value from the array/hash, given a set of keys. If no value is found, it'll return nil.

Team Information

Ramya Ananth - LinkedIn

Sri Harsha Varma Uppalapati - LinkedIn

Mentor: Dr. Edward F Gehringer - Website

References

1.Expertiza on GitHub

2.GitHub Project Repository Fork

3.Live Expertiza website