<?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=Ckonda</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=Ckonda"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Ckonda"/>
	<updated>2026-08-19T14:59:15Z</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_E1687_Instructor_account_creation_over_the_web&amp;diff=106499</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=106499"/>
		<updated>2016-12-04T23:07:53Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register by filling up the form and click the register button. There is a captcha that shall be shown below, to make sure that it isn't any bot that is accessing. It provides security to the application.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin receives a mail informing about the request with the name of the requested user. The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. Once the super admin approves the user request, the user gets a mail notifying the same. If the request is rejected, then the reason should be mentioned in the reason tab of the form. But there is no mail sent to the user regarding that.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also on how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that were created/edited throughout the project.&lt;br /&gt;
* views/auth/_login.html.erb&lt;br /&gt;
* views/users/request_new.html.erb&lt;br /&gt;
* views/users/review.html&lt;br /&gt;
* views/instructions/home.html.erb&lt;br /&gt;
* views/users/edit.html.erb&lt;br /&gt;
* views/mailer/request_user_message.html.erb&lt;br /&gt;
* views/users/new.html.erb&lt;br /&gt;
* views/users/_password.html.erb&lt;br /&gt;
* views/users/_user.html.erb&lt;br /&gt;
* users_controller.rb&lt;br /&gt;
* routes.rb&lt;br /&gt;
* models&lt;br /&gt;
* mailer_helper.rb&lt;br /&gt;
* mailer.rb&lt;br /&gt;
* models/requested_user.rb&lt;br /&gt;
* config/initializers/recaptcha.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''_login.html.erb''' a new button called Request Sign Up was added for the new users to register. The register page will look as above. On clicking '''Request sign up''', a user will be redirected to a page like below: &lt;br /&gt;
&lt;br /&gt;
[[File:login_screen.png]]&lt;br /&gt;
&lt;br /&gt;
User will have to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Manage/users/review requested users''' menu as shown below&lt;br /&gt;
[[File:Approval_new2.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin can either approve/reject a user. The view for this page would be as shown below.&lt;br /&gt;
[[File:req_approval_table.png]]&lt;br /&gt;
&lt;br /&gt;
In addition to the above files a new file in instructions, named home.html.erb is created which will have all the videos explaining how Expertiza works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two new methods. One method (request_user_create) to the new user to request for an account in Expertiza and also mail all the super admins about the new user request. Other method (create_approved_user) is for the super admin to either approve or reject the user request and send a mail to the requested user if his/her account is created. The mail also contains a password for the user to login. &lt;br /&gt;
&lt;br /&gt;
The codes for each method are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def request_user_create&lt;br /&gt;
    #TODO: Do not allow duplicates&lt;br /&gt;
    #TODO: All fields should be entered&lt;br /&gt;
    @user = RequestedUser.new(user_params)&lt;br /&gt;
    @user.institution_id = params[:user][:institution_id]&lt;br /&gt;
    @user.status = 'Under Review'&lt;br /&gt;
    #The super admin receives a mail about a new user request with the user name&lt;br /&gt;
    if verify_recaptcha(model: @user) &amp;amp;&amp;amp; @user.save&lt;br /&gt;
      @super_users = User.joins(:role).where('roles.name' =&amp;gt;'Super-Administrator');&lt;br /&gt;
      @super_users.each do |super_user|&lt;br /&gt;
        prepared_mail = MailerHelper.send_mail_to_all_super_users(super_user,@user, &amp;quot;New account Request&amp;quot;)&lt;br /&gt;
        prepared_mail.deliver&lt;br /&gt;
      end&lt;br /&gt;
      flash[:success] = &amp;quot;User signup for \&amp;quot;#{@user.name}\&amp;quot; has been successfully requested. &amp;quot;&lt;br /&gt;
      redirect_to '/instructions/home'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;Error requesting sign up &amp;quot;&lt;br /&gt;
      redirect_to :controller =&amp;gt; 'users', :action =&amp;gt; 'request_new', :role=&amp;gt;&amp;quot;Student&amp;quot;   &lt;br /&gt;
    end&lt;br /&gt;
  end  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create_approved_user&lt;br /&gt;
    @user = RequestedUser.find params[:id]&lt;br /&gt;
    @user.status=params[:status]&lt;br /&gt;
    @user.reason=params[:reason]&lt;br /&gt;
    if @user.status.nil?&lt;br /&gt;
      flash[:error] = &amp;quot;Please Approve or Reject before submitting&amp;quot;&lt;br /&gt;
    elsif @user.update_attributes(params[:user])&lt;br /&gt;
      flash[:success] = &amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been successfully updated.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if @user.status==&amp;quot;Approved&amp;quot;&lt;br /&gt;
      check = User.find_by_name(@user.name)&lt;br /&gt;
      @usernew = User.new()&lt;br /&gt;
      @usernew.name = @user.name&lt;br /&gt;
      @usernew.role_id = @user.role_id&lt;br /&gt;
      @usernew.institution_id = @user.institution_id&lt;br /&gt;
      @usernew.fullname = @user.fullname&lt;br /&gt;
      @usernew.email = @user.email&lt;br /&gt;
      # record the person who created this new user&lt;br /&gt;
      @usernew.parent_id = session[:user].id&lt;br /&gt;
      # set the user's timezone to its parent's&lt;br /&gt;
      @usernew.timezonepref = User.find(@usernew.parent_id).timezonepref&lt;br /&gt;
&lt;br /&gt;
      if @usernew.save&lt;br /&gt;
        password = @usernew.reset_password # the password is reset&lt;br /&gt;
        # Mail is sent to the user with a new password&lt;br /&gt;
        prepared_mail = MailerHelper.send_mail_to_user(@usernew, &amp;quot;Your Expertiza account and password &lt;br /&gt;
                                                            have been created.&amp;quot;, &amp;quot;user_welcome&amp;quot;, password)&lt;br /&gt;
        prepared_mail.deliver&lt;br /&gt;
        flash[:success] = &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
        if @usernew.role.name == &amp;quot;Instructor&amp;quot; or @usernew.role.name == &amp;quot;Administrator&amp;quot;&lt;br /&gt;
          AssignmentQuestionnaire.create(user_id: @user.id)&lt;br /&gt;
        end&lt;br /&gt;
        undo_link(&amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been successfully created. &amp;quot;)&lt;br /&gt;
      else&lt;br /&gt;
        foreign&lt;br /&gt;
      end&lt;br /&gt;
    else &lt;br /&gt;
      if @user.status==&amp;quot;Rejected&amp;quot;    &lt;br /&gt;
        #If the user request has been rejected, a flash message is shown and redirected to review page&lt;br /&gt;
        if @user.update_columns(reason: params[:reason], status: params[:status])&lt;br /&gt;
          flash[:success] = &amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been Rejected.&amp;quot;&lt;br /&gt;
          redirect_to action: 'review'&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash[:error] = &amp;quot;Error processing request.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'review'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We have created a new table called '''requested_users''' with table description that is similar to '''users'''. The status column, which isn't present in the users tables indicates the approval/rejection of the request of the user. The description of the table is as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Requested_user_db.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
=='''Screencast'''==&lt;br /&gt;
&lt;br /&gt;
Screencast [https://youtu.be/4HAs8jhbkw4 link] to our demonstration&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
We will be testing each of the functionality separately.&lt;br /&gt;
&lt;br /&gt;
1. Test all views - will be testing if '''_login.html.erb''' and '''Request_new.html.erb''' are rendered properly.&lt;br /&gt;
&lt;br /&gt;
2. Test all controller methods. New test cases will be included for each case: &lt;br /&gt;
* Does '''create_approved_user''' actually create a new user&lt;br /&gt;
* Does '''request_user_create''' actually not create a new user request&lt;br /&gt;
&lt;br /&gt;
3. Test the model '''requested_user''' so that no invalid entries (blank email ID, blank name etc.) are accepted. &lt;br /&gt;
&lt;br /&gt;
4. Test the mailer to verify if the body, subject, the mail id sent to/from are correctly functioning.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=106498</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=106498"/>
		<updated>2016-12-04T23:07:00Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register by filling up the form and click the register button. There is a captcha that shall be shown below, to make sure that it isn't any bot that is accessing. It provides security to the application.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin receives a mail informing about the request with the name of the requested user. The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. Once the super admin approves the user request, the user gets a mail notifying the same. If the request is rejected, then the reason should be mentioned in the reason tab of the form. But there is no mail sent to the user regarding that.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also on how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that were created/edited throughout the project.&lt;br /&gt;
* views/auth/_login.html.erb&lt;br /&gt;
* views/users/request_new.html.erb&lt;br /&gt;
* views/users/review.html&lt;br /&gt;
* views/instructions/home.html.erb&lt;br /&gt;
* views/users/edit.html.erb&lt;br /&gt;
* views/mailer/request_user_message.html.erb&lt;br /&gt;
* views/users/new.html.erb&lt;br /&gt;
* views/users/_password.html.erb&lt;br /&gt;
* views/users/_user.html.erb&lt;br /&gt;
* users_controller.rb&lt;br /&gt;
* routes.rb&lt;br /&gt;
* models&lt;br /&gt;
* mailer_helper.rb&lt;br /&gt;
* mailer.rb&lt;br /&gt;
* models/requested_user.rb&lt;br /&gt;
* config/initializers/recaptcha.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''_login.html.erb''' a new button called Request Sign Up was added for the new users to register. The register page will look as above. On clicking '''Request sign up''', a user will be redirected to a page like below: &lt;br /&gt;
&lt;br /&gt;
[[File:login_screen.png]]&lt;br /&gt;
&lt;br /&gt;
User will have to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Manage/users/review requested users''' menu as shown below&lt;br /&gt;
[[File:Approval_new2.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin can either approve/reject a user. The view for this page would be as shown below.&lt;br /&gt;
[[File:req_approval_table.png]]&lt;br /&gt;
&lt;br /&gt;
In addition to the above files a new file in instructions, named home.html.erb is created which will have all the videos explaining how Expertiza works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two new methods. One method (request_user_create) to the new user to request for an account in Expertiza and also mail all the super admins about the new user request. Other method (create_approved_user) is for the super admin to either approve or reject the user request and send a mail to the requested user if his/her account is created. The mail also contains a password for the user to login. &lt;br /&gt;
&lt;br /&gt;
The codes for each method are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def request_user_create&lt;br /&gt;
    #TODO: Do not allow duplicates&lt;br /&gt;
    #TODO: All fields should be entered&lt;br /&gt;
    @user = RequestedUser.new(user_params)&lt;br /&gt;
    @user.institution_id = params[:user][:institution_id]&lt;br /&gt;
    @user.status = 'Under Review'&lt;br /&gt;
    #The super admin receives a mail about a new user request with the user name&lt;br /&gt;
    if verify_recaptcha(model: @user) &amp;amp;&amp;amp; @user.save&lt;br /&gt;
      @super_users = User.joins(:role).where('roles.name' =&amp;gt;'Super-Administrator');&lt;br /&gt;
      @super_users.each do |super_user|&lt;br /&gt;
        prepared_mail = MailerHelper.send_mail_to_all_super_users(super_user,@user, &amp;quot;New account Request&amp;quot;)&lt;br /&gt;
        prepared_mail.deliver&lt;br /&gt;
      end&lt;br /&gt;
      flash[:success] = &amp;quot;User signup for \&amp;quot;#{@user.name}\&amp;quot; has been successfully requested. &amp;quot;&lt;br /&gt;
      redirect_to '/instructions/home'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;Error requesting sign up &amp;quot;&lt;br /&gt;
      redirect_to :controller =&amp;gt; 'users', :action =&amp;gt; 'request_new', :role=&amp;gt;&amp;quot;Student&amp;quot;   &lt;br /&gt;
    end&lt;br /&gt;
  end  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create_approved_user&lt;br /&gt;
    @user = RequestedUser.find params[:id]&lt;br /&gt;
    @user.status=params[:status]&lt;br /&gt;
    @user.reason=params[:reason]&lt;br /&gt;
    if @user.status.nil?&lt;br /&gt;
      flash[:error] = &amp;quot;Please Approve or Reject before submitting&amp;quot;&lt;br /&gt;
    elsif @user.update_attributes(params[:user])&lt;br /&gt;
      flash[:success] = &amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been successfully updated.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if @user.status==&amp;quot;Approved&amp;quot;&lt;br /&gt;
      check = User.find_by_name(@user.name)&lt;br /&gt;
      @usernew = User.new()&lt;br /&gt;
      @usernew.name = @user.name&lt;br /&gt;
      @usernew.role_id = @user.role_id&lt;br /&gt;
      @usernew.institution_id = @user.institution_id&lt;br /&gt;
      @usernew.fullname = @user.fullname&lt;br /&gt;
      @usernew.email = @user.email&lt;br /&gt;
      # record the person who created this new user&lt;br /&gt;
      @usernew.parent_id = session[:user].id&lt;br /&gt;
      # set the user's timezone to its parent's&lt;br /&gt;
      @usernew.timezonepref = User.find(@usernew.parent_id).timezonepref&lt;br /&gt;
&lt;br /&gt;
      if @usernew.save&lt;br /&gt;
        password = @usernew.reset_password # the password is reset&lt;br /&gt;
        # Mail is sent to the user with a new password&lt;br /&gt;
        prepared_mail = MailerHelper.send_mail_to_user(@usernew, &amp;quot;Your Expertiza account and password &lt;br /&gt;
                                                            have been created.&amp;quot;, &amp;quot;user_welcome&amp;quot;, password)&lt;br /&gt;
        prepared_mail.deliver&lt;br /&gt;
        flash[:success] = &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
        if @usernew.role.name == &amp;quot;Instructor&amp;quot; or @usernew.role.name == &amp;quot;Administrator&amp;quot;&lt;br /&gt;
          AssignmentQuestionnaire.create(user_id: @user.id)&lt;br /&gt;
        end&lt;br /&gt;
        undo_link(&amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been successfully created. &amp;quot;)&lt;br /&gt;
      else&lt;br /&gt;
        foreign&lt;br /&gt;
      end&lt;br /&gt;
    else &lt;br /&gt;
      if @user.status==&amp;quot;Rejected&amp;quot;    &lt;br /&gt;
        #If the user request has been rejected, a flash message is shown and redirected to review page&lt;br /&gt;
        if @user.update_columns(reason: params[:reason], status: params[:status])&lt;br /&gt;
          flash[:success] = &amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been Rejected.&amp;quot;&lt;br /&gt;
          redirect_to action: 'review'&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash[:error] = &amp;quot;Error processing request.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'review'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We have created a new table called '''requested_users''' with table description that is similar to '''users'''. The status column, which isn't present in the users tables indicates the approval/rejection of the request of the user. The description of the table is as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Requested_user_db.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
=='''Screencast'''==&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/4HAs8jhbkw4&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
We will be testing each of the functionality separately.&lt;br /&gt;
&lt;br /&gt;
1. Test all views - will be testing if '''_login.html.erb''' and '''Request_new.html.erb''' are rendered properly.&lt;br /&gt;
&lt;br /&gt;
2. Test all controller methods. New test cases will be included for each case: &lt;br /&gt;
* Does '''create_approved_user''' actually create a new user&lt;br /&gt;
* Does '''request_user_create''' actually not create a new user request&lt;br /&gt;
&lt;br /&gt;
3. Test the model '''requested_user''' so that no invalid entries (blank email ID, blank name etc.) are accepted. &lt;br /&gt;
&lt;br /&gt;
4. Test the mailer to verify if the body, subject, the mail id sent to/from are correctly functioning.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=106497</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=106497"/>
		<updated>2016-12-04T22:56:53Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register by filling up the form and click the register button. There is a captcha that shall be shown below, to make sure that it isn't any bot that is accessing. It provides security to the application.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin receives a mail informing about the request with the name of the requested user. The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. Once the super admin approves the user request, the user gets a mail notifying the same. If the request is rejected, then the reason should be mentioned in the reason tab of the form. But there is no mail sent to the user regarding that.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also on how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that were created/edited throughout the project.&lt;br /&gt;
* views/auth/_login.html.erb&lt;br /&gt;
* views/users/request_new.html.erb&lt;br /&gt;
* views/users/review.html&lt;br /&gt;
* views/instructions/home.html.erb&lt;br /&gt;
* views/users/edit.html.erb&lt;br /&gt;
* views/mailer/request_user_message.html.erb&lt;br /&gt;
* views/users/new.html.erb&lt;br /&gt;
* views/users/_password.html.erb&lt;br /&gt;
* views/users/_user.html.erb&lt;br /&gt;
* users_controller.rb&lt;br /&gt;
* routes.rb&lt;br /&gt;
* models&lt;br /&gt;
* mailer_helper.rb&lt;br /&gt;
* mailer.rb&lt;br /&gt;
* models/requested_user.rb&lt;br /&gt;
* config/initializers/recaptcha.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''_login.html.erb''' a new button called Request Sign Up was added for the new users to register. The register page will look as above. On clicking '''Request sign up''', a user will be redirected to a page like below: &lt;br /&gt;
&lt;br /&gt;
[[File:login_screen.png]]&lt;br /&gt;
&lt;br /&gt;
User will have to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Manage/users/review requested users''' menu as shown below&lt;br /&gt;
[[File:Approval_new2.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin can either approve/reject a user. The view for this page would be as shown below.&lt;br /&gt;
[[File:req_approval_table.png]]&lt;br /&gt;
&lt;br /&gt;
In addition to the above files a new file in instructions, named home.html.erb is created which will have all the videos explaining how Expertiza works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two new methods. One method (request_user_create) to the new user to request for an account in Expertiza and also mail all the super admins about the new user request. Other method (create_approved_user) is for the super admin to either approve or reject the user request and send a mail to the requested user if his/her account is created. The mail also contains a password for the user to login. &lt;br /&gt;
&lt;br /&gt;
The codes for each method are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def request_user_create&lt;br /&gt;
    #TODO: Do not allow duplicates&lt;br /&gt;
    #TODO: All fields should be entered&lt;br /&gt;
    @user = RequestedUser.new(user_params)&lt;br /&gt;
    @user.institution_id = params[:user][:institution_id]&lt;br /&gt;
    @user.status = 'Under Review'&lt;br /&gt;
    #The super admin receives a mail about a new user request with the user name&lt;br /&gt;
    if verify_recaptcha(model: @user) &amp;amp;&amp;amp; @user.save&lt;br /&gt;
      @super_users = User.joins(:role).where('roles.name' =&amp;gt;'Super-Administrator');&lt;br /&gt;
      @super_users.each do |super_user|&lt;br /&gt;
        prepared_mail = MailerHelper.send_mail_to_all_super_users(super_user,@user, &amp;quot;New account Request&amp;quot;)&lt;br /&gt;
        prepared_mail.deliver&lt;br /&gt;
      end&lt;br /&gt;
      flash[:success] = &amp;quot;User signup for \&amp;quot;#{@user.name}\&amp;quot; has been successfully requested. &amp;quot;&lt;br /&gt;
      redirect_to '/instructions/home'&lt;br /&gt;
    else&lt;br /&gt;
      flash[:error] = &amp;quot;Error requesting sign up &amp;quot;&lt;br /&gt;
      redirect_to :controller =&amp;gt; 'users', :action =&amp;gt; 'request_new', :role=&amp;gt;&amp;quot;Student&amp;quot;   &lt;br /&gt;
    end&lt;br /&gt;
  end  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def create_approved_user&lt;br /&gt;
    @user = RequestedUser.find params[:id]&lt;br /&gt;
    @user.status=params[:status]&lt;br /&gt;
    @user.reason=params[:reason]&lt;br /&gt;
    if @user.status.nil?&lt;br /&gt;
      flash[:error] = &amp;quot;Please Approve or Reject before submitting&amp;quot;&lt;br /&gt;
    elsif @user.update_attributes(params[:user])&lt;br /&gt;
      flash[:success] = &amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been successfully updated.&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    if @user.status==&amp;quot;Approved&amp;quot;&lt;br /&gt;
      check = User.find_by_name(@user.name)&lt;br /&gt;
      @usernew = User.new()&lt;br /&gt;
      @usernew.name = @user.name&lt;br /&gt;
      @usernew.role_id = @user.role_id&lt;br /&gt;
      @usernew.institution_id = @user.institution_id&lt;br /&gt;
      @usernew.fullname = @user.fullname&lt;br /&gt;
      @usernew.email = @user.email&lt;br /&gt;
      # record the person who created this new user&lt;br /&gt;
      @usernew.parent_id = session[:user].id&lt;br /&gt;
      # set the user's timezone to its parent's&lt;br /&gt;
      @usernew.timezonepref = User.find(@usernew.parent_id).timezonepref&lt;br /&gt;
&lt;br /&gt;
      if @usernew.save&lt;br /&gt;
        password = @usernew.reset_password # the password is reset&lt;br /&gt;
        # Mail is sent to the user with a new password&lt;br /&gt;
        prepared_mail = MailerHelper.send_mail_to_user(@usernew, &amp;quot;Your Expertiza account and password &lt;br /&gt;
                                                            have been created.&amp;quot;, &amp;quot;user_welcome&amp;quot;, password)&lt;br /&gt;
        prepared_mail.deliver&lt;br /&gt;
        flash[:success] = &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
        if @usernew.role.name == &amp;quot;Instructor&amp;quot; or @usernew.role.name == &amp;quot;Administrator&amp;quot;&lt;br /&gt;
          AssignmentQuestionnaire.create(user_id: @user.id)&lt;br /&gt;
        end&lt;br /&gt;
        undo_link(&amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been successfully created. &amp;quot;)&lt;br /&gt;
      else&lt;br /&gt;
        foreign&lt;br /&gt;
      end&lt;br /&gt;
    else &lt;br /&gt;
      if @user.status==&amp;quot;Rejected&amp;quot;    &lt;br /&gt;
        #If the user request has been rejected, a flash message is shown and redirected to review page&lt;br /&gt;
        if @user.update_columns(reason: params[:reason], status: params[:status])&lt;br /&gt;
          flash[:success] = &amp;quot;The user \&amp;quot;#{@user.name}\&amp;quot; has been Rejected.&amp;quot;&lt;br /&gt;
          redirect_to action: 'review'&lt;br /&gt;
          return&lt;br /&gt;
        else&lt;br /&gt;
          flash[:error] = &amp;quot;Error processing request.&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to action: 'review'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We have created a new table called '''requested_users''' with table description that is similar to '''users'''. The status column, which isn't present in the users tables indicates the approval/rejection of the request of the user. The description of the table is as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Requested_user_db.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
We will be testing each of the functionality separately.&lt;br /&gt;
&lt;br /&gt;
1. Test all views - will be testing if '''_login.html.erb''' and '''Request_new.html.erb''' are rendered properly.&lt;br /&gt;
&lt;br /&gt;
2. Test all controller methods. New test cases will be included for each case: &lt;br /&gt;
* Does '''create_approved_user''' actually create a new user&lt;br /&gt;
* Does '''request_user_create''' actually not create a new user request&lt;br /&gt;
&lt;br /&gt;
3. Test the model '''requested_user''' so that no invalid entries (blank email ID, blank name etc.) are accepted. &lt;br /&gt;
&lt;br /&gt;
4. Test the mailer to verify if the body, subject, the mail id sent to/from are correctly functioning.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Approval_new2.png&amp;diff=106496</id>
		<title>File:Approval new2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Approval_new2.png&amp;diff=106496"/>
		<updated>2016-12-04T22:56:47Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</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=106004</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=106004"/>
		<updated>2016-11-20T05:12:20Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Implementation */&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.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN6.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'''.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN3.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.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:HomeKN4.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', &lt;br /&gt;
                             :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.&amp;lt;br&amp;gt;&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:Sv2N.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.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk3N.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Svk4N.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>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105959</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105959"/>
		<updated>2016-11-15T20:14:09Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Views changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
&lt;br /&gt;
'''_login.html.erb''' add new button called Request Sign Up&lt;br /&gt;
The welcome page will look as above. On clicking '''request sign up''', a user will be redirected to a page like below:&lt;br /&gt;
'''Request_new.html.erb''' which renders partial view - '''_user.html.erb'''&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
&lt;br /&gt;
User will be able to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Request/reject users''' menu as shown below&lt;br /&gt;
[[File:Approval_new.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin can either approve/reject a user. The page will look like below(''' approve.html.erb'''):&lt;br /&gt;
&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
In addition to the above files a new file called Instructions.html.erb which will have all the videos and instructions on how Expertiza works.&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two new methods:&lt;br /&gt;
&lt;br /&gt;
1. '''request_list'''&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
2. '''approve_user'''&lt;br /&gt;
&lt;br /&gt;
  def approve_user&lt;br /&gt;
    # will be calling create method with required parameters and setting the status in request_users table to approved.&lt;br /&gt;
    # apter the user is created, email is sent to user.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3. '''reject_user'''&lt;br /&gt;
  &lt;br /&gt;
  def reject_user&lt;br /&gt;
    #will set the status in request_users to reject and send an email to user about the same.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
We will be testing each of the functionality separately.&lt;br /&gt;
&lt;br /&gt;
1. Test all views&lt;br /&gt;
&lt;br /&gt;
will be testing if '''_login.html.erb''', '''Request_new.html.erb''' and ''' approve.html.erb''' are rendered properly.&lt;br /&gt;
&lt;br /&gt;
2. Test all controller methods.&lt;br /&gt;
&lt;br /&gt;
New test cases will be included for each case: &lt;br /&gt;
   a) Does '''request_list''' method gives the proper list of requested users?&lt;br /&gt;
   b) Does '''approve_user''' actually create a new user&lt;br /&gt;
   c) Does '''reject_user''' actually not create a new user and change the status properly.&lt;br /&gt;
   d) Also test cases where the functions should not work.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105958</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105958"/>
		<updated>2016-11-15T20:13:47Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Views changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
&lt;br /&gt;
'''_login.html.erb''' add new button called Request Sign Up&lt;br /&gt;
The welcome page will look as above. On clicking '''request sign up''', a user will be redirected to a page like below:&lt;br /&gt;
'''Request_new.html.erb''' which renders partial view - '''_user.html.erb'''&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
&lt;br /&gt;
User will be able to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Request/reject users''' menu as shown below&lt;br /&gt;
[[File:Approval_new.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin can either approve/reject a user. The page will look like below(''' approve.html.erb'''):&lt;br /&gt;
&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
In addition to the above files a new file called Instructions.html.erb which will have all the videos and instructions on how Expertiza works.&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two new methods:&lt;br /&gt;
&lt;br /&gt;
1. '''request_list'''&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
2. '''approve_user'''&lt;br /&gt;
&lt;br /&gt;
  def approve_user&lt;br /&gt;
    # will be calling create method with required parameters and setting the status in request_users table to approved.&lt;br /&gt;
    # apter the user is created, email is sent to user.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3. '''reject_user'''&lt;br /&gt;
  &lt;br /&gt;
  def reject_user&lt;br /&gt;
    #will set the status in request_users to reject and send an email to user about the same.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
We will be testing each of the functionality separately.&lt;br /&gt;
&lt;br /&gt;
1. Test all views&lt;br /&gt;
will be testing if '''_login.html.erb''', '''Request_new.html.erb''' and ''' approve.html.erb''' are rendered properly.&lt;br /&gt;
&lt;br /&gt;
2. Test all controller methods.&lt;br /&gt;
New test cases will be included for each case: &lt;br /&gt;
   a) Does '''request_list''' method gives the proper list of requested users?&lt;br /&gt;
   b) Does '''approve_user''' actually create a new user&lt;br /&gt;
   c) Does '''reject_user''' actually not create a new user and change the status properly.&lt;br /&gt;
   d) Also test cases where the functions should not work.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105912</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105912"/>
		<updated>2016-11-15T04:42:24Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Views changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Views changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
&lt;br /&gt;
'''_login.html.erb''' add new button called Request Sign Up&lt;br /&gt;
The welcome page will look as above. On clicking '''request sign up''', a user will be redirected to a page like below:&lt;br /&gt;
'''Request_new.html.erb''' which renders partial view - '''_user.html.erb'''&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
&lt;br /&gt;
User will be able to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Request/reject users''' menu as shown below&lt;br /&gt;
[[File:Approval_new.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin will be able to approve/ reject a user. The page will look like below(''' approve.html.erb'''):&lt;br /&gt;
&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
In addition to the above files a new file called Instructions.html.erb which will have all the videos and instructions how expertiza works.&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two nuw methods:&lt;br /&gt;
&lt;br /&gt;
1. '''request_list'''&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
2. '''approve_user'''&lt;br /&gt;
&lt;br /&gt;
  def approve_user&lt;br /&gt;
    # will be calling create method with required parameters and setting the status in request_users table to approved.&lt;br /&gt;
    # apter the user is created, email is sent to user.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3. '''reject_user'''&lt;br /&gt;
  &lt;br /&gt;
  def reject_user&lt;br /&gt;
    #will set the status in request_users to reject and send an email to user about the same.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Approval_new.png&amp;diff=105911</id>
		<title>File:Approval new.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Approval_new.png&amp;diff=105911"/>
		<updated>2016-11-15T04:42:01Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105907</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105907"/>
		<updated>2016-11-15T04:39:31Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Views changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
&lt;br /&gt;
'''_login.html.erb''' add new button called Request Sign Up&lt;br /&gt;
The welcome page will look as above. On clicking '''request sign up''', a user will be redirected to a page like below:&lt;br /&gt;
'''Request_new.html.erb''' which renders partial view - '''_user.html.erb'''&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
&lt;br /&gt;
User will be able to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Request/reject users''' menu as shown below&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin will be able to approve/ reject a user. The page will look like below(''' approve.html.erb'''):&lt;br /&gt;
&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
In addition to the above files a new file called Instructions.html.erb which will have all the videos and instructions how expertiza works.&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two nuw methods:&lt;br /&gt;
&lt;br /&gt;
1. '''request_list'''&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
2. '''approve_user'''&lt;br /&gt;
&lt;br /&gt;
  def approve_user&lt;br /&gt;
    # will be calling create method with required parameters and setting the status in request_users table to approved.&lt;br /&gt;
    # apter the user is created, email is sent to user.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3. '''reject_user'''&lt;br /&gt;
  &lt;br /&gt;
  def reject_user&lt;br /&gt;
    #will set the status in request_users to reject and send an email to user about the same.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105905</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105905"/>
		<updated>2016-11-15T04:38:44Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
'''_login.html.erb''' add new button called Request Sign Up&lt;br /&gt;
The welcome page will look as above. On clicking '''request sign up''', a user will be redirected to a page like below:&lt;br /&gt;
'''Request_new.html.erb''' which renders partial view - '''_user.html.erb'''&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
&lt;br /&gt;
User will be able to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Request/reject users''' menu as shown below&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin will be able to approve/ reject a user. The page will look like below(''' approve.html.erb'''):&lt;br /&gt;
&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
In addition to the above files a new file called Instructions.html.erb which will have all the videos and instructions how expertiza works.&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two nuw methods:&lt;br /&gt;
&lt;br /&gt;
1. '''request_list'''&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
2. '''approve_user'''&lt;br /&gt;
&lt;br /&gt;
  def approve_user&lt;br /&gt;
    # will be calling create method with required parameters and setting the status in request_users table to approved.&lt;br /&gt;
    # apter the user is created, email is sent to user.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3. '''reject_user'''&lt;br /&gt;
  &lt;br /&gt;
  def reject_user&lt;br /&gt;
    #will set the status in request_users to reject and send an email to user about the same.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105902</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105902"/>
		<updated>2016-11-15T04:32:41Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
&lt;br /&gt;
The welcome page will look as above. On clicking '''request sign up''', a user will be redirected to a page like below:&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
&lt;br /&gt;
User will be able to fill up all the required details and request a signup.&lt;br /&gt;
When a super administrator logins to his account he can go to '''Request/reject users''' menu as shown below&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
&lt;br /&gt;
Super Admin will be able to approve/ reject a user. The page will look like below:&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two nuw methods:&lt;br /&gt;
&lt;br /&gt;
1. '''request_list'''&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
2. '''approve_user'''&lt;br /&gt;
&lt;br /&gt;
  def approve_user&lt;br /&gt;
    # will be calling create method with required parameters and setting the status in request_users table to approved.&lt;br /&gt;
    # apter the user is created, email is sent to user.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3. '''reject_user'''&lt;br /&gt;
  &lt;br /&gt;
  def reject_user&lt;br /&gt;
    #will set the status in request_users to reject and send an email to user about the same.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105895</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105895"/>
		<updated>2016-11-15T04:26:20Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two nuw methods:&lt;br /&gt;
&lt;br /&gt;
1. '''request_list'''&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
2. '''approve_user'''&lt;br /&gt;
&lt;br /&gt;
  def approve_user&lt;br /&gt;
    # will be calling create method with required parameters and setting the status in request_users table to approved.&lt;br /&gt;
    # apter the user is created, email is sent to user.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3. '''reject_user'''&lt;br /&gt;
  &lt;br /&gt;
  def reject_user&lt;br /&gt;
    #will set the status in request_users to reject and send an email to user about the same.&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105889</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105889"/>
		<updated>2016-11-15T04:24:37Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two nuw methods:&lt;br /&gt;
&lt;br /&gt;
1. '''request_list'''&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
2. '''approve_user'''&lt;br /&gt;
def approve_user&lt;br /&gt;
 # will be calling create method with required parameters and setting the status in request_users table to approved.&lt;br /&gt;
 # apter the user is created, email is sent to user.&lt;br /&gt;
end&lt;br /&gt;
3. '''reject_user'''&lt;br /&gt;
def reject_user&lt;br /&gt;
  #will set the status in request_users to reject and send an email to user about the same.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105885</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105885"/>
		<updated>2016-11-15T04:20:16Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two nuw methods:&lt;br /&gt;
1. request_list&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105882</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105882"/>
		<updated>2016-11-15T04:19:15Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''users_controller.rb''' we will be having two nuw methods:&lt;br /&gt;
1. request_list&lt;br /&gt;
&lt;br /&gt;
 def request_list&lt;br /&gt;
    user = session[:user]&lt;br /&gt;
    role = user.role&lt;br /&gt;
    all_users = request_user.get_requested_user_list&lt;br /&gt;
    letter = params[:letter]&lt;br /&gt;
    session[:letter] = letter&lt;br /&gt;
    if letter.nil?&lt;br /&gt;
      letter = all_users.first.name[0, 1].downcase unless all_users.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @letters = []&lt;br /&gt;
&lt;br /&gt;
    @per_page = 1&lt;br /&gt;
&lt;br /&gt;
    # Check if the &amp;quot;Show&amp;quot; button for pagination is clicked&lt;br /&gt;
    # If yes, set @per_page to the value of the selection dropdown&lt;br /&gt;
    # Else, if the request is from one of the letter links on the top&lt;br /&gt;
    # set @per_page to 1 (25 names per page).&lt;br /&gt;
    # Else, set @per_page to the :num_users param passed in from&lt;br /&gt;
    # the will_paginate method from the 'pagination' partial.&lt;br /&gt;
    @per_page = if params[:paginate_show]&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                elsif params[:from_letter]&lt;br /&gt;
                  1&lt;br /&gt;
                else&lt;br /&gt;
                  params[:num_users]&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
    # Get the requested users list to show on current page&lt;br /&gt;
&lt;br /&gt;
    @requested_users = paginate_list all_users&lt;br /&gt;
&lt;br /&gt;
    @letters = ('A'..'Z').to_a&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105879</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105879"/>
		<updated>2016-11-15T04:13:11Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105878</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105878"/>
		<updated>2016-11-15T04:12:43Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105877</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105877"/>
		<updated>2016-11-15T04:12:19Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&amp;lt;/br&amp;gt;&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105876</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105876"/>
		<updated>2016-11-15T04:12:08Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;br /&gt;
Our '''request_users''' will also be having a new column called '''status''' which describes that the user is approved or rejected.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105871</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105871"/>
		<updated>2016-11-15T04:06:16Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;br /&gt;
[[File:Users.png]]&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105870</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105870"/>
		<updated>2016-11-15T04:05:46Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description that is similar to '''users'''&lt;br /&gt;
Below is the table description of '''users''' table.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Users.png&amp;diff=105869</id>
		<title>File:Users.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Users.png&amp;diff=105869"/>
		<updated>2016-11-15T04:04:52Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105868</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105868"/>
		<updated>2016-11-15T04:01:28Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description as below which is similar to '''users'''&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
| Field                     | Type         | Null | Key | Default | Extra          |&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
| id                        | int(11)      | NO   | PRI | NULL    | auto_increment |&lt;br /&gt;
| name                      | varchar(255) | NO   |     |         |                |&lt;br /&gt;
| crypted_password          | varchar(40)  | NO   |     |         |                |&lt;br /&gt;
| role_id                   | int(11)      | NO   | MUL | 0       |                |&lt;br /&gt;
| password_salt             | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| fullname                  | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| email                     | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| parent_id                 | int(11)      | YES  |     | NULL    |                |&lt;br /&gt;
| private_by_default        | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| mru_directory_path        | varchar(128) | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_review           | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_submission       | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_review_of_review | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| is_new_user               | tinyint(1)   | NO   |     | 1       |                |&lt;br /&gt;
| master_permission_granted | tinyint(4)   | YES  |     | 0       |                |&lt;br /&gt;
| handle                    | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| leaderboard_privacy       | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| digital_certificate       | text         | YES  |     | NULL    |                |&lt;br /&gt;
| persistence_token         | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| timezonepref              | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| public_key                | text         | YES  |     | NULL    |                |&lt;br /&gt;
| copy_of_emails            | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| institution_id            | int(11)      | YES  |     | NULL    |                |&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
// Hello World in Microsoft C# (&amp;quot;C-Sharp&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
&lt;br /&gt;
class HelloWorld&lt;br /&gt;
{&lt;br /&gt;
    public static int Main(String[] args)&lt;br /&gt;
    {&lt;br /&gt;
        Console.WriteLine(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105867</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105867"/>
		<updated>2016-11-15T04:01:02Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Database Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called '''request_users''' with table description as below which is similar to '''users'''&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
| Field                     | Type         | Null | Key | Default | Extra          |&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
| id                        | int(11)      | NO   | PRI | NULL    | auto_increment |&lt;br /&gt;
| name                      | varchar(255) | NO   |     |         |                |&lt;br /&gt;
| crypted_password          | varchar(40)  | NO   |     |         |                |&lt;br /&gt;
| role_id                   | int(11)      | NO   | MUL | 0       |                |&lt;br /&gt;
| password_salt             | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| fullname                  | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| email                     | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| parent_id                 | int(11)      | YES  |     | NULL    |                |&lt;br /&gt;
| private_by_default        | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| mru_directory_path        | varchar(128) | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_review           | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_submission       | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_review_of_review | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| is_new_user               | tinyint(1)   | NO   |     | 1       |                |&lt;br /&gt;
| master_permission_granted | tinyint(4)   | YES  |     | 0       |                |&lt;br /&gt;
| handle                    | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| leaderboard_privacy       | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| digital_certificate       | text         | YES  |     | NULL    |                |&lt;br /&gt;
| persistence_token         | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| timezonepref              | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| public_key                | text         | YES  |     | NULL    |                |&lt;br /&gt;
| copy_of_emails            | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| institution_id            | int(11)      | YES  |     | NULL    |                |&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105866</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105866"/>
		<updated>2016-11-15T03:56:54Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;br /&gt;
&lt;br /&gt;
=='''Database Changes'''==&lt;br /&gt;
&lt;br /&gt;
We will be creating a new table called &amp;quot;request_users&amp;quot; with table description as below which is similar to &amp;quot;users&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
| Field                     | Type         | Null | Key | Default | Extra          |&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;
| id                        | int(11)      | NO   | PRI | NULL    | auto_increment |&lt;br /&gt;
| name                      | varchar(255) | NO   |     |         |                |&lt;br /&gt;
| crypted_password          | varchar(40)  | NO   |     |         |                |&lt;br /&gt;
| role_id                   | int(11)      | NO   | MUL | 0       |                |&lt;br /&gt;
| password_salt             | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| fullname                  | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| email                     | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| parent_id                 | int(11)      | YES  |     | NULL    |                |&lt;br /&gt;
| private_by_default        | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| mru_directory_path        | varchar(128) | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_review           | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_submission       | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| email_on_review_of_review | tinyint(1)   | YES  |     | NULL    |                |&lt;br /&gt;
| is_new_user               | tinyint(1)   | NO   |     | 1       |                |&lt;br /&gt;
| master_permission_granted | tinyint(4)   | YES  |     | 0       |                |&lt;br /&gt;
| handle                    | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| leaderboard_privacy       | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| digital_certificate       | text         | YES  |     | NULL    |                |&lt;br /&gt;
| persistence_token         | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| timezonepref              | varchar(255) | YES  |     | NULL    |                |&lt;br /&gt;
| public_key                | text         | YES  |     | NULL    |                |&lt;br /&gt;
| copy_of_emails            | tinyint(1)   | YES  |     | 0       |                |&lt;br /&gt;
| institution_id            | int(11)      | YES  |     | NULL    |                |&lt;br /&gt;
+---------------------------+--------------+------+-----+---------+----------------+&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105865</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105865"/>
		<updated>2016-11-15T03:48:35Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105864</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105864"/>
		<updated>2016-11-15T03:46:53Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png|200px]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105863</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105863"/>
		<updated>2016-11-15T03:46:11Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requestuserckonda.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105862</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105862"/>
		<updated>2016-11-15T03:43:08Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Requsr.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Requestuserckonda.png&amp;diff=105861</id>
		<title>File:Requestuserckonda.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Requestuserckonda.png&amp;diff=105861"/>
		<updated>2016-11-15T03:41:03Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Request_user.png&amp;diff=105860</id>
		<title>File:Request user.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Request_user.png&amp;diff=105860"/>
		<updated>2016-11-15T03:39:50Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105859</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105859"/>
		<updated>2016-11-15T03:36:40Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Sign_up.png]]&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sign_up.png&amp;diff=105858</id>
		<title>File:Sign up.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sign_up.png&amp;diff=105858"/>
		<updated>2016-11-15T03:36:18Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105857</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105857"/>
		<updated>2016-11-15T03:34:29Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Approval.png]]&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Approval.png&amp;diff=105856</id>
		<title>File:Approval.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Approval.png&amp;diff=105856"/>
		<updated>2016-11-15T03:34:12Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105852</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105852"/>
		<updated>2016-11-15T03:28:46Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Files changed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Approve.png]]&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105851</id>
		<title>CSC/ECE 517 Fall 2016 E1687 Instructor account creation over the web</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016_E1687_Instructor_account_creation_over_the_web&amp;diff=105851"/>
		<updated>2016-11-15T03:27:28Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1687. Instructor Account Creation Over the Web'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the final project of creating an instructor account over the web in Expertiza.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
In Expertiza, user and instructor accounts are currently created by existing super administrators, instructors or TAs. For new users to access the system and experiment the features offered by Expertiza, a “demo-like” feature needs to implemented. The following are the set of requirements that needs to be catered with this feature:&lt;br /&gt;
#Allow people to request instructor accounts over the web. This feature should also have security features such as Captchas to help avoid account creation by bots.&lt;br /&gt;
#When a user account is created over the web, the super-admin should get e-mail regarding the same and also the user should be notified upon approval/denial (if denied, then reason should be specified).&lt;br /&gt;
#Currently, Expertiza consists of a lot of entities that can be made publicly visible to all other users in the system. But, accounts created this way should not be able to see existing public features, until the super-admin manually gives them permission to view public courses, assignments, and questionnaires.&lt;br /&gt;
#A user who creates an account over the web should be pointed to an instruction page and/or video on how to create an assignment and register students for it, etc.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following solutions shall be addressing the problems discussed above. &lt;br /&gt;
===Problem 1===&lt;br /&gt;
Once a user wants to register and try the features of Expertiza, upon opening the website, one can register through the “Demo” button. So the first page would look something similar to the figure below. &lt;br /&gt;
&lt;br /&gt;
Clicking on “Demo” shall redirect to another page where the user enters his/her credentials. These shall be sent to the super admin for approval/denial of the account once the user clicks on “Register” button. This is also secured through captcha feature as shown below.&lt;br /&gt;
&lt;br /&gt;
===Problem 2===&lt;br /&gt;
Once the user requests for an account creation, the super admin should be receiving a mail informing about the request (need not have the user name/id). The super admin shall then, look for the details of the user in the Requests tab and can either approve/decline the request. The UI would be as follows:&lt;br /&gt;
As soon as the super admin performs an action, the user is notified about the same. But the reason is mentioned in the mail if the account has been rejected.&lt;br /&gt;
&lt;br /&gt;
===Problem 3===&lt;br /&gt;
There shall be a flash message saying, “Login denied. Needs permission from super admin” that can be seen on the login page if an unregistered user tries to access the features of Expertiza.  This helps in removing the access to few publicly visible features as it denies access completely. &lt;br /&gt;
&lt;br /&gt;
===Problem 4===&lt;br /&gt;
Once the user account is approved by the super admin and the user tries to login upon notification, he/she shall be redirected to an “Instructions” page on successful login. &lt;br /&gt;
&lt;br /&gt;
This page shall contain the video tutorials explaining various features of Expertiza and also n how to access them.&lt;br /&gt;
&lt;br /&gt;
=='''Files changed'''==&lt;br /&gt;
The following are the list of files that shall be edited throughout the project.&lt;br /&gt;
[[File:Approve.png|200px|thumb|left|alt text]]&lt;br /&gt;
#expertiza/app/views/auth/_login.html.erb &lt;br /&gt;
#expertiza/app/views/auth/_form.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_register_html.html.erb&lt;br /&gt;
#expertiza/app/views/mailer/partials/_user_welcome_html.html.erb&lt;br /&gt;
#expertiza/app/views/content_pages/view.html.erb&lt;br /&gt;
Apart from these there shall be two new files created in the View.&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Approve.png&amp;diff=105849</id>
		<title>File:Approve.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Approve.png&amp;diff=105849"/>
		<updated>2016-11-15T03:26:19Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ckonda</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=104551</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=104551"/>
		<updated>2016-11-04T23:20:09Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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;
* 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>Ckonda</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=104549</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=104549"/>
		<updated>2016-11-04T23:19:34Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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;
* 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>Ckonda</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=104547</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=104547"/>
		<updated>2016-11-04T23:19:15Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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;
* 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>Ckonda</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=104544</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=104544"/>
		<updated>2016-11-04T23:16:48Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Screencast */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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;
* 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>Ckonda</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=104542</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=104542"/>
		<updated>2016-11-04T22:55:48Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Screencast */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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;
* 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://github.com/chaitanya91k/expertiza link] to our demonstration&lt;/div&gt;</summary>
		<author><name>Ckonda</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=104541</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=104541"/>
		<updated>2016-11-04T22:55:32Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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;
* 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://github.com/chaitanya91k/expertiza Expertiza link] to our demonstration&lt;/div&gt;</summary>
		<author><name>Ckonda</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=104540</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=104540"/>
		<updated>2016-11-04T22:54:10Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Why These Changes? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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;
* 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;/div&gt;</summary>
		<author><name>Ckonda</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=104539</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=104539"/>
		<updated>2016-11-04T22:53:54Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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;
* 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;
&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;
&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;/div&gt;</summary>
		<author><name>Ckonda</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=104523</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=104523"/>
		<updated>2016-11-04T22:24:14Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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;
* 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;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Ckonda</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=104517</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=104517"/>
		<updated>2016-11-04T22:18:54Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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. &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;
&amp;lt;br&amp;gt; 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;
==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&lt;br /&gt;
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;
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;
'''''/app/views/shared/_navigation.html'''''&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;
* 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;
class User &amp;lt; ActiveRecord::Base&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;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Ckonda</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=104516</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=104516"/>
		<updated>2016-11-04T22:15:19Z</updated>

		<summary type="html">&lt;p&gt;Ckonda: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
__TOC__&lt;br /&gt;
&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. &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;
&amp;lt;br&amp;gt; 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;
==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&lt;br /&gt;
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;
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;
'''''/app/views/shared/_navigation.html'''''&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;
&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;
class User &amp;lt; ActiveRecord::Base&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;
==Repository==&lt;br /&gt;
[https://github.com/chaitanya91k/expertiza Expertiza Github link]&lt;/div&gt;</summary>
		<author><name>Ckonda</name></author>
	</entry>
</feed>