Main Page/CSC/CSC 517 Spring 2020 Refactor impersonate controller

From Expertiza_Wiki
Revision as of 22:55, 23 March 2020 by Mramani (talk | contribs) (Creation of the page)
Jump to navigation Jump to search

This wiki page describes the work done under E2002 OSS Program for Spring 2020, in the CSC/ECE 517 course.

Peer Review Information

1. Instructor login: username -> instructor6, password -> password

when logged in as an instructor, under the manage option in the ribbon, select impersonate user. Upon redirected to impersonate page, enter the account which needs to be impersonated. If possible it impersonates that user. Now a new button called revert appears on the ribbon, this can be used to revert the impersonation and return to the instructor profile.

About Expertiza

Expertiza is an open-source project based on Ruby on Rails framework. Expertiza is a complete instructor-student usage website where the instructor can assign assignments, deadlines, grades, etc that is required for the course. Similarly, the students can use this website to perform the tasks required as part of the course like project or assignments submission, forming groups and collaborating with them, as well as reviewing projects and teammates.


Problem Statement

The aim of the project is to refactor the impersonate controller. The pre-existing code had two major issues. 1. All functions related to impersonate controller were present in a single method 2.Presence of repetitive code

These two issues have been tackled by 1. Creating new methods which were called inside the impersonate controller. The new methods were: a.checkif_user_impersonateable b.display_error_msg c.clear_session

About Impersonate Controller

Expertiza allows the administrators, instructors or teaching assistants to impersonate another user (like a student) and access their account. For example, an instructor impersonating a student’s account can view their assignments, stage deadlines, peer reviews and anything else that the student can view. One thing to be noted is that most of these users con only impersonate users for whom they are a parent. For example, instructor6 is a parent of student3841 and not student3836; as a result, instructor6 can impersonate only 3841.