CSC/ECE 517 Fall 2022 - E2278. Improve assessment360 controller

From Expertiza_Wiki
Revision as of 20:41, 15 November 2022 by Dmmehta2 (talk | contribs)
Jump to navigation Jump to search

This is the design document for Expertiza project E2278 Improve assessment360_controller.rb. This document describes the current implementation of the assessment360 controller and the expected design changes as part of this project which is primarily UI focused.

Introduction

Expertiza is an open source project based on Ruby on Rails framework. Expertiza provides a functionality that allows instructors get a full or 360-degree overview of a course they teach that includes all students in the course, all assignments, and the scores of every student in each assignment, averages, and final scores as well. This feature is supported by the assessment360 controller.

Problems statement

  • In the assessment controller > all_students_all_reviews view, it shows a summary including both meta-reviews and teammate reviews and this makes the UI a bit complicated. Thus, this needs to be updated in a way that, the user has the option to select a filter, to either see meta-reviews or teammate reviews but not both at the same time. This will eventually simplify the UI and make it easier to read through.
  • Currently on the summary page, if the student hasn't attempted a quiz or they are yet to receive a grade, the view shows that row as '-'. Instead, it is preferable to depict it as '0', this will aid in the better calculation of total scores. One thing to ensure here is, while calculating the average such values must not be considered since the student hasn't attempted it yet, and it would be inaccurate to consider that value while calculating the average for the same.
  • Currently the assessment controller > course_student_grade_summary view is missing the columns for average peer review score and average instructor assigned score. Thus, the view should be updated to reflect these scores as well.
  • Currently both the pages all_students_all_reviews & course_student_grade_summary show all columns by default and the user has no control to hide/unhide these columns as per their needs. Thus, a checkbox list of columns must be provided for users to select/unselect from and allow users to only see the columns of their interest.
  • DB access must be minimized, and this should be implemented with the use of bullet gem.
  • Basic refactoring changes need to be implemented, like updating the variable name @teamed_count and using a more appropriate variable name.

Planned work

1) assessment controller > all_students_all_reviews view, below you can find the screenshot of current implementation of this view

Test Plan

Automated Testing using RSPEC

Please note that we have removed several older tests which tested functions that are now private and inaccessible outside the controller class itself. However, the methods that call these private functions are still tested and tests are passing successfully.

1. After refactoring, most of our new test cases focus on functions which are the core of the controller - covering important aspects like who accesses the page, checking permissions for the page, how the page behaves on edge cases etc.

2. Using RSpec, the test cases cover various scenarios and tests each scenario in depth. Eg, for access control, we check the access for all roles for a user comprehensively to ensure that only people with permissions can view the page.

3. Since most of the work in this module is computations in the back and rendering data in the frontend, we've ensured that the computations happen in their specific order and enough test cases are present for edge cases.

4. For backend computations, we've covered lot of edge cases like no participants to a course, when there are no reviews made by a participant, when assignment doesn't exists, insure existence_of being called before executing index page etc.

5. For frontend, we've covered cases like formatting of the data in the page, null dataset, score being int, float, null, displaying percentages when data is int, float, null etc.

Even though we've moved most of the code into private functions, the core functionalities of the controller are refactored and appropriate test cases are written to ensure high coverage.

Please run the following command to execute the tests:

rspec spec/controllers/assessment360_controller_spec.rb

Testing from UI

The following steps needs to be performed to test this code from UI:

1. Log in as instructor(username: instructor6 , password: password). Please either do step 2 or 3, as both are not required.

2. Select Courses, and the page will show a list of courses. Please select the rightmost icons for any course (we recommend CSC517 Fall 2017, CSC517 Fall 2011 so there’s more data, but it can take some time for it load since there’s a lot of pre-loaded data in the VCL)

3. Alternatively, you can log in and go to this URL: http://152.7.99.75:8080/assessment360/index?course_id=184

4. You should be able to see a webpage with a table and checkboxes at the top. This table is an instructor’s 360-degree view of a course, containing the scores of each students in the course for every assignment the instructor has added to Expertiza.

5. Unchecking some or all of the checkboxes removes and brings back various columns from/to the page. Please feel free to test this out.

Code Coverage