<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xli47</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xli47"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Xli47"/>
	<updated>2026-06-30T05:56:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105459</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105459"/>
		<updated>2016-11-12T09:15:55Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
'''NOTE: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure. '''&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                        &amp;lt;/TR&amp;gt;&lt;br /&gt;
                      &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:If student ID is not provided, the system will randomly select an student ID from all the students in the database, and impersonate the selected student view. This is useful when the instructor doesn't remember the specific student ID. &lt;br /&gt;
:Required changes in 1 file :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/master/app/controllers/impersonate_controller.rb Impersonate_controller.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        if params[:user][:name]==&amp;quot;&amp;quot;                     &lt;br /&gt;
	  students = User.all.where(role_id: Role.student)&lt;br /&gt;
	  user = students[rand(students.length)] &lt;br /&gt;
	  until original_user.can_impersonate? user&lt;br /&gt;
	    user = students[rand(students.length)]&lt;br /&gt;
	  end&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
: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.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment&lt;br /&gt;
[[File:Svk1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
[[File:Sv2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&lt;br /&gt;
[[File:Svk3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Why These Changes?==&lt;br /&gt;
* Requirement: Add a “student view” button for instructors.&lt;br /&gt;
:As we were required to add a button , it makes more sense to add a similar button used across the application. Thus we choose class=&amp;quot;btn btn-primary&amp;quot; for buttons and :class =&amp;gt; 'form-control input-sm' for textboxes. &lt;br /&gt;
&lt;br /&gt;
* Requirement: Introduce a revert button to go back to instructor:&lt;br /&gt;
:After an instructor enters a student ID of a student and enters student view, there should be a way to go back to instructors . Thus we have introduced a revert button. Also if the instructor wants to go to a different student’s view he should be able to do so as well. Making these two tasks possible with single textbox and button was better instead of an extra button to go back to instructors view. Now to go back to instructors view, instructor has to leave the textbox blank and click “revert”, if the instructor wants to go to a different student’s view he just need to enter the new student’s id and click on “revert”.&lt;br /&gt;
&lt;br /&gt;
* Requirement: View on specific date:&lt;br /&gt;
:We decided to include a date box which on clicked on the date field a data picker pops up. We have added this picker as it makes sense to just click on which date instead of typing the whole date.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;br /&gt;
==Screencast==&lt;br /&gt;
Screencast [https://youtu.be/WrJm6csM3mo link] to our demonstration&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105458</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105458"/>
		<updated>2016-11-12T09:14:19Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
'''NOTE: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure. '''&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                        &amp;lt;/TR&amp;gt;&lt;br /&gt;
                      &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:If student ID is not provided, the system will randomly select an student ID from all the students in the database, and impersonate the selected student view. This is useful when the instructor doesn't remember the specific student ID. &lt;br /&gt;
:Required changes in 1 file :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/master/app/controllers/impersonate_controller.rb Impersonate_controller.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if params[:user][:name]==&amp;quot;&amp;quot;                     # if user id is not provided, assign an user id randomly&lt;br /&gt;
	  students = User.all.where(role_id: Role.student)&lt;br /&gt;
	  user = students[rand(students.length)] &lt;br /&gt;
	  until original_user.can_impersonate? user	# make sure the random selected user could be impersonated by the original user&lt;br /&gt;
	    user = students[rand(students.length)]&lt;br /&gt;
	  end&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
: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.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment&lt;br /&gt;
[[File:Svk1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
[[File:Sv2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&lt;br /&gt;
[[File:Svk3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Why These Changes?==&lt;br /&gt;
* Requirement: Add a “student view” button for instructors.&lt;br /&gt;
:As we were required to add a button , it makes more sense to add a similar button used across the application. Thus we choose class=&amp;quot;btn btn-primary&amp;quot; for buttons and :class =&amp;gt; 'form-control input-sm' for textboxes. &lt;br /&gt;
&lt;br /&gt;
* Requirement: Introduce a revert button to go back to instructor:&lt;br /&gt;
:After an instructor enters a student ID of a student and enters student view, there should be a way to go back to instructors . Thus we have introduced a revert button. Also if the instructor wants to go to a different student’s view he should be able to do so as well. Making these two tasks possible with single textbox and button was better instead of an extra button to go back to instructors view. Now to go back to instructors view, instructor has to leave the textbox blank and click “revert”, if the instructor wants to go to a different student’s view he just need to enter the new student’s id and click on “revert”.&lt;br /&gt;
&lt;br /&gt;
* Requirement: View on specific date:&lt;br /&gt;
:We decided to include a date box which on clicked on the date field a data picker pops up. We have added this picker as it makes sense to just click on which date instead of typing the whole date.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;br /&gt;
==Screencast==&lt;br /&gt;
Screencast [https://youtu.be/WrJm6csM3mo link] to our demonstration&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105457</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105457"/>
		<updated>2016-11-12T09:12:49Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
'''NOTE: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure. '''&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                        &amp;lt;/TR&amp;gt;&lt;br /&gt;
                      &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:If student ID is not provided, the system will randomly select an student ID from all the students in the database, and impersonate the selected student view. This is useful when the instructor doesn't remember the specific student ID. &lt;br /&gt;
:Required changes in 1 file :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/master/app/controllers/impersonate_controller.rb Impersonate_controller.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
: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.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment&lt;br /&gt;
[[File:Svk1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
[[File:Sv2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&lt;br /&gt;
[[File:Svk3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Why These Changes?==&lt;br /&gt;
* Requirement: Add a “student view” button for instructors.&lt;br /&gt;
:As we were required to add a button , it makes more sense to add a similar button used across the application. Thus we choose class=&amp;quot;btn btn-primary&amp;quot; for buttons and :class =&amp;gt; 'form-control input-sm' for textboxes. &lt;br /&gt;
&lt;br /&gt;
* Requirement: Introduce a revert button to go back to instructor:&lt;br /&gt;
:After an instructor enters a student ID of a student and enters student view, there should be a way to go back to instructors . Thus we have introduced a revert button. Also if the instructor wants to go to a different student’s view he should be able to do so as well. Making these two tasks possible with single textbox and button was better instead of an extra button to go back to instructors view. Now to go back to instructors view, instructor has to leave the textbox blank and click “revert”, if the instructor wants to go to a different student’s view he just need to enter the new student’s id and click on “revert”.&lt;br /&gt;
&lt;br /&gt;
* Requirement: View on specific date:&lt;br /&gt;
:We decided to include a date box which on clicked on the date field a data picker pops up. We have added this picker as it makes sense to just click on which date instead of typing the whole date.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;br /&gt;
==Screencast==&lt;br /&gt;
Screencast [https://youtu.be/WrJm6csM3mo link] to our demonstration&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105456</id>
		<title>CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1657._Introduce_a_Student_View_for_instructors&amp;diff=105456"/>
		<updated>2016-11-12T09:10:51Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
'''NOTE: The pull request will not pass the build.Its not due to our changes but due to some unrelated test failure. '''&lt;br /&gt;
==Background==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web based open source peer reviewing tool based on [http://rubyonrails.org/ Ruby on Rails] developed and maintained by current and past students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Raleigh. Students will be able to manage all their project submissions, project teamups, topic selections etc. Few of the notable features include:&lt;br /&gt;
* Instructor can control most of the stuff that is related to each course.&lt;br /&gt;
* Student can control who he/she wants to team up with etc.&lt;br /&gt;
* They can provide feedback to each of the topics.&lt;br /&gt;
* Instructor can make use of the various submission phases available.&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Our project is to introduce a Student view to the instructors.The goal of this project is to provide instructor with a functionality using which an instructor can switch to student view and see how the student view looks like. The instructor will also be able to go to future date and see how student view looks like in future date.&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
* Introduce a &amp;quot;Student View Button&amp;quot; on Instructors UI to switch to student view.&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
&lt;br /&gt;
==Working==&lt;br /&gt;
On the right top, left to the logout button , anyone having access to view as instructor gets a textbox and a button saying &amp;quot;Student View&amp;quot;. in-order to view as a student you have to type in the students ID and press '''Student View''' button. You can exactly see what the student's page looks like. &lt;br /&gt;
[[File:HomeK6.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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 press '''Revert'''. &lt;br /&gt;
[[File:HomeK3.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
[[File:HomeK4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
* Introduce a &amp;quot;Switch to Student View Button&amp;quot; on Instructors UI&lt;br /&gt;
:A 'Student View' button was added in the top right portion of menu-bar for instructor. This button allows instructor to see the student view. This button is linked to impersonate action of [https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]. The button was simply added in menu-bar view. When the button is clicked, it calls &amp;lt;code&amp;gt;impersonate&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt;impersonate controller&amp;lt;/code&amp;gt; which loads new view as student for provided student id.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Required changes in 1 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
              &amp;lt;% if current_user.role.name == &amp;quot;Instructor&amp;quot; or current_user.role.name == &amp;quot;Administrator&amp;quot;%&amp;gt;&lt;br /&gt;
                  &amp;lt;%= form_for :user, url: '/impersonate/impersonate' do |f| %&amp;gt;&lt;br /&gt;
                      &amp;lt;TABLE&amp;gt;&lt;br /&gt;
                        &amp;lt;TR&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.text_field :name, {:size =&amp;gt; 10,:class =&amp;gt; 'form-control input-sm', :autocomplete =&amp;gt; &amp;quot;off&amp;quot;,placeholder: &amp;quot;User ID&amp;quot;} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                          &amp;lt;TD&amp;gt;&amp;lt;%= f.submit 'Student View', :class=&amp;gt;&amp;quot;btn btn-primary input-sm&amp;quot;%&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
                        &amp;lt;/TR&amp;gt;&lt;br /&gt;
                      &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
                  &amp;lt;% end %&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:If student ID is not provided, the system will randomly select an student ID from all the students in the database, and impersonate the selected student view. This is useful when the instructor doesn't remember the specific student ID. &lt;br /&gt;
:Required changes in 1 file :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
* Introduce a Revert to instructor View&amp;quot; on Instructor's Student UI&lt;br /&gt;
:Once instructor impersonate to a student view, a Revert button appears which when clicked revert back to instructor view from impersonated student view. Once the student view is loaded by instructor,&amp;lt;code&amp;gt;session[:superuser]&amp;lt;/code&amp;gt; is set and based on this flag a revert button will be displayed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Time travel in Student View.&lt;br /&gt;
:Required changes in 4 files :&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/views/shared/_navigation.html.erb navigation.html]&amp;lt;br&amp;gt;&lt;br /&gt;
                    &amp;lt;div class=&amp;quot;field&amp;quot;&amp;gt;&lt;br /&gt;
                      &amp;lt;%= f.date_field :goto_date, :order =&amp;gt; [:month,:day, :year],:value =&amp;gt; Date.today %&amp;gt;&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
:First, we introduced a date box where you can select a date from the UI.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/controllers/impersonate_controller.rb Impersonate_controller]&amp;lt;br&amp;gt;&lt;br /&gt;
            if !params[:impersonate][:goto_date].empty?&lt;br /&gt;
                User.goto_date=params[:impersonate][:goto_date]&lt;br /&gt;
            end&lt;br /&gt;
:In this controller, we took the value from UI and store the same in User model.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/user.rb user.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
    attr_accessible :goto_date&lt;br /&gt;
    def self.goto_date=(val)&lt;br /&gt;
      @goto_date=val&lt;br /&gt;
    end&lt;br /&gt;
    def self.goto_date&lt;br /&gt;
      @goto_date&lt;br /&gt;
    end &lt;br /&gt;
: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.&amp;lt;br&amp;gt;&lt;br /&gt;
:[https://github.com/chaitanya91k/expertiza/blob/93a9cd0a77a40383e26e90784d368e5d236ad74e/app/models/due_date.rb due_date.rb]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 def self.get_next_due_date(assignment_id, topic_id = nil)&lt;br /&gt;
      (User.goto_date.nil?)? goto_date = Time.now : goto_date = (User.goto_date)&lt;br /&gt;
      if Assignment.find(assignment_id).staggered_deadline?&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, Time.now]).first&lt;br /&gt;
        next_due_date = TopicDueDate.where(['parent_id = ? and due_at &amp;gt;= ?', topic_id, goto_date]).first&lt;br /&gt;
          topic_due_date_size = TopicDueDate.where(parent_id: topic_id).size&lt;br /&gt;
          following_assignment_due_dates = AssignmentDueDate.where(parent_id: assignment_id)[topic_due_date_size..-1]&lt;br /&gt;
          following_assignment_due_dates.each do |assignment_due_date|&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= Time.now&lt;br /&gt;
            if assignment_due_date.due_at &amp;gt;= goto_date&lt;br /&gt;
              next_due_date = assignment_due_date &lt;br /&gt;
              break&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.now]).first&lt;br /&gt;
        next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, goto_date]).first&lt;br /&gt;
      end&lt;br /&gt;
      next_due_date&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
:When ever the system calculates due dates, the time is taken from goto_date that we have stored above in Users model.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing via UI==&lt;br /&gt;
* Login in as Instructor.&lt;br /&gt;
*Create assignment.&amp;lt;br&amp;gt;I have created one with name Test_Changes with submission deadline Nov 09 and review Deadline Nov 14.&amp;lt;br&amp;gt;Add all the student in course for this assignment&lt;br /&gt;
[[File:Svk1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Switch to student view.&amp;lt;br&amp;gt; Once switched to student view you can see the assignment with submission deadline Nov 09.&lt;br /&gt;
[[File:Sv2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Go to future date and view the assignment list.&amp;lt;br&amp;gt; I went to Nov 10 in future and we can see that the current phase for our assignment is review.&lt;br /&gt;
[[File:Svk3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Why These Changes?==&lt;br /&gt;
* Requirement: Add a “student view” button for instructors.&lt;br /&gt;
:As we were required to add a button , it makes more sense to add a similar button used across the application. Thus we choose class=&amp;quot;btn btn-primary&amp;quot; for buttons and :class =&amp;gt; 'form-control input-sm' for textboxes. &lt;br /&gt;
&lt;br /&gt;
* Requirement: Introduce a revert button to go back to instructor:&lt;br /&gt;
:After an instructor enters a student ID of a student and enters student view, there should be a way to go back to instructors . Thus we have introduced a revert button. Also if the instructor wants to go to a different student’s view he should be able to do so as well. Making these two tasks possible with single textbox and button was better instead of an extra button to go back to instructors view. Now to go back to instructors view, instructor has to leave the textbox blank and click “revert”, if the instructor wants to go to a different student’s view he just need to enter the new student’s id and click on “revert”.&lt;br /&gt;
&lt;br /&gt;
* Requirement: View on specific date:&lt;br /&gt;
:We decided to include a date box which on clicked on the date field a data picker pops up. We have added this picker as it makes sense to just click on which date instead of typing the whole date.&lt;br /&gt;
&lt;br /&gt;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;br /&gt;
==Screencast==&lt;br /&gt;
Screencast [https://youtu.be/WrJm6csM3mo link] to our demonstration&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105161</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105161"/>
		<updated>2016-11-10T01:55:16Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105155</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105155"/>
		<updated>2016-11-10T01:51:59Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project description==&lt;br /&gt;
===Initial steps===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
===Subsequent steps===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
==Design Patterns &amp;amp; OO Practices==&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105153</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105153"/>
		<updated>2016-11-10T01:51:13Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project description==&lt;br /&gt;
===Initial steps===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
===Subsequent steps===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
==Design Patterns &amp;amp; OO Practices==&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105152</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105152"/>
		<updated>2016-11-10T01:49:56Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Project description==&lt;br /&gt;
===Initial steps===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
===Subsequent steps===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
==Design Patterns &amp;amp; OO Practices==&lt;br /&gt;
==Testing==&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105150</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105150"/>
		<updated>2016-11-10T01:47:38Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Servo===&lt;br /&gt;
Servo is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found here. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout.&lt;br /&gt;
==Project description==&lt;br /&gt;
===Initial steps===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
===Subsequent steps===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
==Design Patterns &amp;amp; OO Practices==&lt;br /&gt;
==Testing==&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105141</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105141"/>
		<updated>2016-11-10T01:40:49Z</updated>

		<summary type="html">&lt;p&gt;Xli47: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Servo===&lt;br /&gt;
===Rust===&lt;br /&gt;
==Project description==&lt;br /&gt;
===Initial steps===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
===Subsequent steps===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Xli47</name></author>
	</entry>
</feed>