CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors

From Expertiza_Wiki
Revision as of 19:41, 28 October 2016 by Ckonda (talk | contribs)
Jump to navigation Jump to search

Introduction

Our project is to introduce a Student view to the instructors.

Project Requirements

  • Introduce a "Switch to Student View" on Instructors UI
  • Introduce a Revert to instructor View" on Instructor's Student UI
  • Time travel in Student View.

Working

On the right top, left to the logout button , anyone having access to view as student gets a textbox and a button saying "view as student". In-order to view as a student you have to type in the students ID and press submit. You can exactly see what the student's page looks like. If you need to revert back to instructor view you just have to leave the text box empty and press the revert button. This takes you to the instructors view again. Else if you need another students view, just type in the students ID and submit.

We also have implemented a time travel feature where you can go to a particular date and see what a student see on that day. You can find this feature as soon as you go to a student ID. You have to select a day you need to travel to, type in the student ID and submit. Boom! you got he student view as on the date given.

Implementation

  • Introduce a "Switch to Student View" on Instructors UI

TODO

  • Introduce a Revert to instructor View" on Instructor's Student UI

TODO

  • Time travel in Student View.

Required changes in 4 files :
navigation.html
First, we introduced a date box where you can select a date from the UI.
Impersonate_controller
In this controller, we took the value from UI and store the same in User model.
user.rb
The value from the above controller is stored in Users model object (not instance) as goto_date. Thus you can access this date through out the sessions. due_date.rb
When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.

Repository

Expertiza Github link