CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 24: Line 24:
In this controller, we took the value from UI and store the same in User model.<br>
In this controller, we took the value from UI and store the same in User model.<br>
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]<br>
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]<br>
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.
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.<br>
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]<br>
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]<br>
When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.<br>
When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.<br>
==Repository==
==Repository==
[https://github.com/chaitanya91k/expertiza Expertiza Github link]
[https://github.com/chaitanya91k/expertiza Expertiza Github link]

Revision as of 19:43, 28 October 2016

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