<?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=Aananth3</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=Aananth3"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Aananth3"/>
	<updated>2026-05-26T02:11:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108484</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108484"/>
		<updated>2017-04-13T02:05:25Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :   {Textbox}&lt;br /&gt;
* Date From:  {Date Filler}&lt;br /&gt;
* Date to:   {Date Filler}&lt;br /&gt;
* Event Type:  {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
====Changes to the database ====&lt;br /&gt;
&lt;br /&gt;
We plan to create a new table in the database for logging. A new migration needs to be created to add the new table to the database.&lt;br /&gt;
&lt;br /&gt;
'''Table: Event logs'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Element&lt;br /&gt;
! Type&lt;br /&gt;
|-&lt;br /&gt;
| user_id&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| start_date&lt;br /&gt;
| Datetime&lt;br /&gt;
|-&lt;br /&gt;
| event_type&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| event_description&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| user_role&lt;br /&gt;
| Integer&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
====New models====&lt;br /&gt;
&lt;br /&gt;
A new model will be created to add each log to the record. The model will contain fields pertaining to a model such as a user id, type of event, event description, timestamp etc. &lt;br /&gt;
&lt;br /&gt;
====New helpers====&lt;br /&gt;
&lt;br /&gt;
A new helper file will be created which will take care of what events to log. &lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 2: UI ==&lt;br /&gt;
&lt;br /&gt;
====New Views====&lt;br /&gt;
&lt;br /&gt;
A new view will be added which can be accessed only by the system admins which shows the admins the list of logs. A log entry will have a user id with whom the event is associated to, an event type, a description of the event and a timestamp. We will give the admin the option to filter the logs based on each of the mentioned values. Options to add multiple search criteria will also be provided.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Model Testing''': Since we are adding a new database table, we need to test Rails model with Rspec that checks if the validations are working fine such as it &amp;quot;is valid with valid attributes&amp;quot;, it &amp;quot;is not valid without a user&amp;quot;, it &amp;quot;is not valid without an event&amp;quot;, it &amp;quot;is not valid without a timestamp&amp;quot;&lt;br /&gt;
* '''Controller Testing''': Design includes the addition of a controller that takes care of storing the logs and then loading them up to fill the views if queried which requires a lot of testing. The tests include&lt;br /&gt;
** For each event, check if the respective method in the respective controller is called&lt;br /&gt;
** For each event, an entry is being correctly stored in the database&lt;br /&gt;
** A feature test that checks the UI part of the flow that includes Capybara mocking the admin fills the query page and the testing whether the results are viewed correctly&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108483</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108483"/>
		<updated>2017-04-13T02:04:55Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Adding database schema&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :   {Textbox}&lt;br /&gt;
* Date From:  {Date Filler}&lt;br /&gt;
* Date to:   {Date Filler}&lt;br /&gt;
* Event Type:  {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
====Changes to the database ====&lt;br /&gt;
&lt;br /&gt;
We plan to create a new table in the database for logging. A new migration needs to be created to add the new table to the database.&lt;br /&gt;
&lt;br /&gt;
Table: Event logs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Element&lt;br /&gt;
! Type&lt;br /&gt;
|-&lt;br /&gt;
| user_id&lt;br /&gt;
| Integer&lt;br /&gt;
|-&lt;br /&gt;
| start_date&lt;br /&gt;
| Datetime&lt;br /&gt;
|-&lt;br /&gt;
| event_type&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| event_description&lt;br /&gt;
| String&lt;br /&gt;
|-&lt;br /&gt;
| user_role&lt;br /&gt;
| Integer&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
====New models====&lt;br /&gt;
&lt;br /&gt;
A new model will be created to add each log to the record. The model will contain fields pertaining to a model such as a user id, type of event, event description, timestamp etc. &lt;br /&gt;
&lt;br /&gt;
====New helpers====&lt;br /&gt;
&lt;br /&gt;
A new helper file will be created which will take care of what events to log. &lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 2: UI ==&lt;br /&gt;
&lt;br /&gt;
====New Views====&lt;br /&gt;
&lt;br /&gt;
A new view will be added which can be accessed only by the system admins which shows the admins the list of logs. A log entry will have a user id with whom the event is associated to, an event type, a description of the event and a timestamp. We will give the admin the option to filter the logs based on each of the mentioned values. Options to add multiple search criteria will also be provided.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Model Testing''': Since we are adding a new database table, we need to test Rails model with Rspec that checks if the validations are working fine such as it &amp;quot;is valid with valid attributes&amp;quot;, it &amp;quot;is not valid without a user&amp;quot;, it &amp;quot;is not valid without an event&amp;quot;, it &amp;quot;is not valid without a timestamp&amp;quot;&lt;br /&gt;
* '''Controller Testing''': Design includes the addition of a controller that takes care of storing the logs and then loading them up to fill the views if queried which requires a lot of testing. The tests include&lt;br /&gt;
** For each event, check if the respective method in the respective controller is called&lt;br /&gt;
** For each event, an entry is being correctly stored in the database&lt;br /&gt;
** A feature test that checks the UI part of the flow that includes Capybara mocking the admin fills the query page and the testing whether the results are viewed correctly&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108256</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108256"/>
		<updated>2017-04-08T04:00:09Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :   {Textbox}&lt;br /&gt;
* Date From:  {Date Filler}&lt;br /&gt;
* Date to:   {Date Filler}&lt;br /&gt;
* Event Type:  {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
====Changes to the database ====&lt;br /&gt;
&lt;br /&gt;
We plan to create a new table in the database for logging. A new migration needs to be created to add the new table to the database. &lt;br /&gt;
&lt;br /&gt;
====New models====&lt;br /&gt;
&lt;br /&gt;
A new model will be created to add each log to the record. The model will contain fields pertaining to a model such as a user id, type of event, event description, timestamp etc. &lt;br /&gt;
&lt;br /&gt;
====New helpers====&lt;br /&gt;
&lt;br /&gt;
A new helper file will be created which will take care of what events to log. &lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 2: UI ==&lt;br /&gt;
&lt;br /&gt;
====New Views====&lt;br /&gt;
&lt;br /&gt;
A new view will be added which can be accessed only by the system admins which shows the admins the list of logs. A log entry will have a user id with whom the event is associated to, an event type, a description of the event and a timestamp. We will give the admin the option to filter the logs based on each of the mentioned values. Options to add multiple search criteria will also be provided.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Model Testing''': Since we are adding a new database table, we need to test Rails model with Rspec that checks if the validations are working fine such as it &amp;quot;is valid with valid attributes&amp;quot;, it &amp;quot;is not valid without a user&amp;quot;, it &amp;quot;is not valid without an event&amp;quot;, it &amp;quot;is not valid without a timestamp&amp;quot;&lt;br /&gt;
* '''Controller Testing''': Design includes the addition of a controller that takes care of storing the logs and then loading them up to fill the views if queried which requires a lot of testing. The tests include&lt;br /&gt;
** For each event, check if the respective method in the respective controller is called&lt;br /&gt;
** For each event, an entry is being correctly stored in the database&lt;br /&gt;
** A feature test that checks the UI part of the flow that includes Capybara mocking the admin fills the query page and the testing whether the results are viewed correctly&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108252</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108252"/>
		<updated>2017-04-08T03:55:13Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :   {Textbox}&lt;br /&gt;
* Date From:  {Date Filler}&lt;br /&gt;
* Date to:   {Date Filler}&lt;br /&gt;
* Event Type:  {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
====Changes to the database ====&lt;br /&gt;
&lt;br /&gt;
We plan to create a new table in the database for logging. A new migration needs to be created to add the new table to the database. &lt;br /&gt;
&lt;br /&gt;
====New models====&lt;br /&gt;
&lt;br /&gt;
A new model will be created to add each log to the record. The model will contain fields pertaining to a model such as a user id, type of event, event description, timestamp etc. &lt;br /&gt;
&lt;br /&gt;
====New helpers====&lt;br /&gt;
&lt;br /&gt;
A new helper file will be created which will take care of what events to log. &lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 2: UI ==&lt;br /&gt;
&lt;br /&gt;
====New Views====&lt;br /&gt;
&lt;br /&gt;
A new view will be added which can be accessed only by the system admins which shows the admins the list of logs with options to filter the logs based on the admin's needs.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Model Testing''': Since we are adding a new database table, we need to test Rails model with Rspec that checks if the validations are working fine such as it &amp;quot;is valid with valid attributes&amp;quot;, it &amp;quot;is not valid without a user&amp;quot;, it &amp;quot;is not valid without an event&amp;quot;, it &amp;quot;is not valid without a timestamp&amp;quot;&lt;br /&gt;
* '''Controller Testing''': Design includes the addition of a controller that takes care of storing the logs and then loading them up to fill the views if queried which requires a lot of testing. The tests include&lt;br /&gt;
** For each event, check if the respective method in the respective controller is called&lt;br /&gt;
** For each event, an entry is being correctly stored in the database&lt;br /&gt;
** A feature test that checks the UI part of the flow that includes Capybara mocking the admin fills the query page and the testing whether the results are viewed correctly&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108251</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108251"/>
		<updated>2017-04-08T03:54:08Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :   {Textbox}&lt;br /&gt;
* Date From:  {Date Filler}&lt;br /&gt;
* Date to:   {Date Filler}&lt;br /&gt;
* Event Type:  {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
====Changes to the database ====&lt;br /&gt;
&lt;br /&gt;
We plan to create a new table in the database for logging. A new migration needs to be created to add the new table to the database. &lt;br /&gt;
&lt;br /&gt;
===New models===&lt;br /&gt;
&lt;br /&gt;
A new model will be created to add each log to the record. The model will contain fields pertaining to a model such as a user id, type of event, event description, timestamp etc. &lt;br /&gt;
&lt;br /&gt;
===New helpers===&lt;br /&gt;
&lt;br /&gt;
A new helper file will be created which will take care of what events to log. &lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 2: UI ==&lt;br /&gt;
&lt;br /&gt;
===New Views===&lt;br /&gt;
&lt;br /&gt;
A new view will be added which can be accessed only by the system admins which shows the admins the list of logs with options to filter the logs based on the admin's needs.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Model Testing''': Since we are adding a new database table, we need to test Rails model with Rspec that checks if the validations are working fine such as it &amp;quot;is valid with valid attributes&amp;quot;, it &amp;quot;is not valid without a user&amp;quot;, it &amp;quot;is not valid without an event&amp;quot;, it &amp;quot;is not valid without a timestamp&amp;quot;&lt;br /&gt;
* '''Controller Testing''': Design includes the addition of a controller that takes care of storing the logs and then loading them up to fill the views if queried which requires a lot of testing. The tests include&lt;br /&gt;
** For each event, check if the respective method in the respective controller is called&lt;br /&gt;
** For each event, an entry is being correctly stored in the database&lt;br /&gt;
** A feature test that checks the UI part of the flow that includes Capybara mocking the admin fills the query page and the testing whether the results are viewed correctly&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108250</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108250"/>
		<updated>2017-04-08T03:53:32Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :   {Textbox}&lt;br /&gt;
* Date From:  {Date Filler}&lt;br /&gt;
* Date to:   {Date Filler}&lt;br /&gt;
* Event Type:  {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
===Changes to the database ===&lt;br /&gt;
&lt;br /&gt;
We plan to create a new table in the database for logging. A new migration needs to be created to add the new table to the database. &lt;br /&gt;
&lt;br /&gt;
===New models===&lt;br /&gt;
&lt;br /&gt;
A new model will be created to add each log to the record. The model will contain fields pertaining to a model such as a user id, type of event, event description, timestamp etc. &lt;br /&gt;
&lt;br /&gt;
===New helpers===&lt;br /&gt;
&lt;br /&gt;
A new helper file will be created which will take care of what events to log. &lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 2: UI ==&lt;br /&gt;
&lt;br /&gt;
===New Views===&lt;br /&gt;
&lt;br /&gt;
A new view will be added which can be accessed only by the system admins which shows the admins the list of logs with options to filter the logs based on the admin's needs.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Model Testing''': Since we are adding a new database table, we need to test Rails model with Rspec that checks if the validations are working fine such as it &amp;quot;is valid with valid attributes&amp;quot;, it &amp;quot;is not valid without a user&amp;quot;, it &amp;quot;is not valid without an event&amp;quot;, it &amp;quot;is not valid without a timestamp&amp;quot;&lt;br /&gt;
* '''Controller Testing''': Design includes the addition of a controller that takes care of storing the logs and then loading them up to fill the views if queried which requires a lot of testing. The tests include&lt;br /&gt;
** For each event, check if the respective method in the respective controller is called&lt;br /&gt;
** For each event, an entry is being correctly stored in the database&lt;br /&gt;
** A feature test that checks the UI part of the flow that includes Capybara mocking the admin fills the query page and the testing whether the results are viewed correctly&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108247</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108247"/>
		<updated>2017-04-08T03:46:49Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :   {Textbox}&lt;br /&gt;
* Date From:  {Date Filler}&lt;br /&gt;
* Date to:   {Date Filler}&lt;br /&gt;
* Event Type:  {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
We plan to create a new table in the database for logging. A new migration needs to be created to add the new table to the database. &lt;br /&gt;
&lt;br /&gt;
A new helper file will be created which will take care of what events to log. &lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 2: UI ==&lt;br /&gt;
&lt;br /&gt;
A new view will be added which can be accessed only by the system admins which shows the admins the list of logs with options to filter the logs based on the admin's needs.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108246</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108246"/>
		<updated>2017-04-08T03:45:02Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :   {Textbox}&lt;br /&gt;
* Date From:  {Date Filler}&lt;br /&gt;
* Date to:   {Date Filler}&lt;br /&gt;
* Event Type:  {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
== Implementation of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
We plan to create a new table in the database for logging. A new migration needs to be created to add the new table to the database. &lt;br /&gt;
&lt;br /&gt;
A new helper file will be created which will take care of what events to log. &lt;br /&gt;
&lt;br /&gt;
A new view will be added which can be accessed only by the system admins which shows the admins the list of logs with options to filter the logs based on the admin's needs.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108234</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108234"/>
		<updated>2017-04-08T03:31:28Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design of Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :       [____]      {Textbox}&lt;br /&gt;
* Date From:   [____]      {Date Filler}&lt;br /&gt;
* Date to:     [____]      {Date Filler}&lt;br /&gt;
* Event Type:  [____]      {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108232</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108232"/>
		<updated>2017-04-08T03:30:48Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Design for Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :       [____]      {Textbox}&lt;br /&gt;
* Date From:   [____]      {Date Filler}&lt;br /&gt;
* Date to:     [____]      {Date Filler}&lt;br /&gt;
* Event Type:  [____]      {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108231</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108231"/>
		<updated>2017-04-08T03:30:23Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Task 1: Logging == &lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - A un-handleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
We plan to implement a new helper file which deals logging the events which we want. We plan on doing it this way to separate out the logging code from the controller code.&lt;br /&gt;
&lt;br /&gt;
== Design of Task 2: UI Part ==&lt;br /&gt;
We nee to read the log data and put onto the user interface to make anyone view based on the filter they provide. Filters include user name, event type, from time and to time. &lt;br /&gt;
The look of the UI part would be a simple view that contains&lt;br /&gt;
* User :       [____]      {Textbox}&lt;br /&gt;
* Date From:   [____]      {Date Filler}&lt;br /&gt;
* Date to:     [____]      {Date Filler}&lt;br /&gt;
* Event Type:  [____]      {Drop Down box}&lt;br /&gt;
&lt;br /&gt;
The results after the querying would be populated in grid that makes it easy to observe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108222</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108222"/>
		<updated>2017-04-08T03:01:27Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Logger class in Rails has the following severity levels:&lt;br /&gt;
&lt;br /&gt;
* UNKNOWN - An unknown message that should always be logged.&lt;br /&gt;
* FATAL - An unhandleable error that results in a program crash.&lt;br /&gt;
* ERROR - A handleable error condition.&lt;br /&gt;
* WARN - A warning.&lt;br /&gt;
* INFO - Generic (useful) information about system operation.&lt;br /&gt;
* DEBUG - Low-level information for developers.&lt;br /&gt;
&lt;br /&gt;
Usually, in a production system Logger is set to INFO or WARN. For our project, we plan to use DEBUG level severity. For this, we first need to change the Formatter class to include DEBUG level severity to the log file. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108207</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108207"/>
		<updated>2017-04-08T02:24:23Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html Severity level in Logger]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108204</id>
		<title>CSC/ECE 517 Spring 2017/E1732 Additions to logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/E1732_Additions_to_logging&amp;diff=108204"/>
		<updated>2017-04-08T02:23:36Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Adding a reference section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Currently, Expertiza doesn’t log anything, beyond the events in the console log.  But often there is a need to know when a student logged in, reserved a topic, dropped off a team, reviewed etc. In real time, logs are the first thing to start checking the performance and other metrics. But it is also important to describe which data to log and why. Users activity may not be used for testing or debugging purposes, but can help an evaluator or admin to make sure the authenticity of student submissions and check the timelines. It sure can be used in future to read those logs and report back to users about their action timeline if required.&lt;br /&gt;
&lt;br /&gt;
== What to Log ==&lt;br /&gt;
For Students &amp;lt;br&amp;gt;&lt;br /&gt;
* Logins, logouts, signups&lt;br /&gt;
* submission of files/links&lt;br /&gt;
* issuing invitations, joining teams, dropping off teams&lt;br /&gt;
* requesting reviews, submitting reviews &lt;br /&gt;
* undoing any of these operations.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For Admin/ Instructor/ TA &amp;lt;br&amp;gt;&lt;br /&gt;
* creating/editing courses and assignments&lt;br /&gt;
* giving grades&lt;br /&gt;
* impersonating other users&lt;br /&gt;
* adding TAs, adding participants to courses or assignments&lt;br /&gt;
* assigning reviewers.&lt;br /&gt;
&lt;br /&gt;
== What we plan to implement ==&lt;br /&gt;
&lt;br /&gt;
The project mainly consists of two parts:&lt;br /&gt;
&lt;br /&gt;
1. Logging the various students and instructors logs and process them accordingly.&lt;br /&gt;
&lt;br /&gt;
2. Extend the existing UI or create one separately if needed along with the required fields as described in the project description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same has been mentioned in terms of a flowchart:&lt;br /&gt;
&lt;br /&gt;
[[File:flow.jpg]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107628</id>
		<title>CSC/ECE 517 Spring 2017/oss E1712</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107628"/>
		<updated>2017-03-31T03:04:59Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Future work added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project is part of an educational web application called Expertiza. This wiki gives the details on the refactoring tasks undertaken as part of continuous improvement of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is an open source project managed by the faculty and students of NCSU. It is a web application which offers a platform for assignments and allows learning through peer reviews. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the existing code the InvitationController and the JoinTeamRequestsController do the expected task but the there is a lot of redundancy and duplicity in the code, and the comments in the code are few and sparse. The aim of our project was to reduce the complexity of the controller by removing redundant code adding comments so that the code is easy to understand and all the variables used in the code are clearly explained.&lt;br /&gt;
&lt;br /&gt;
==Current Implementation==&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
Invitations controller handles the functions required to send invitations out to potential teammates for a project. Once a student decides to invite someone into his assignment team the controller performs some checks before sending out the invitations. These checks are performed in the create function. The current implementation has a lot of redundant code and many nested if statements. The ABC size of the method is also very high. The controller also has functions which take care of cases where an invitee accepts/declines an invitation. There is also an option to retract a sent invitation which is handled by the cancel function in the controller.&lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* The ABC size for create method is too high and needs to be refactored along by removing other nested if's in create and update_join_team_request methods.&lt;br /&gt;
* Use find_by instead of find_by_name and find_by_user_id_and_assignment_id.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used.&lt;br /&gt;
* Pending invitations needs to be displayed in the same format as other tables.&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
JoinTeamRequests controller deals with the actions to be performed after a student comes across an advertisement to join a project team. Whenever a project team creates an advertisement for others to join their team, students can see a link to the advertisement in the signup sheet. Once the student clicks on the link to the advertisement the student can then request to join the team. The create function in the JoinTeamRequestsController handles the checks before sending out the request. Again, the ABC size for this method is very high as there a lot of nested if conditions. Also, there is duplicate code in some of the functions in this controller which can be moved to a separate function. &lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Add comments on why some important variables are used.&lt;br /&gt;
* The ABC size for create method is too high.&lt;br /&gt;
* Nested if's need to be refactored.&lt;br /&gt;
* Duplicate code needs to be removed.&lt;br /&gt;
* Pending join team requests needs to be displayed in the same format as other tables&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Change Specifics==&lt;br /&gt;
The tasks identified above were implemented and the details are given below.&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
* A new private function check_users was added which performs some basic checks before the create function is called. In the original implementation, there were a lot of nested if conditions which checked if a user is valid, is a participant in the project, and if the team has slots available. All these checks were the cause of the nested if statements because they needed to be checked before an invitation is sent out to a student. The nested if's were removed by moving all these checks into the private function thereby reducing the ABC size of the create method.&lt;br /&gt;
* Nested if statements in the update_join_team_request were removed by breaking the nested statements into separate conditions and using return when the condition fails. For example, when checking if the user is valid, instead of using a nested condition to check validity, if the user is not valid then we throw an error message and return from the function.&lt;br /&gt;
* Call to the method find_by_user_id_and_assignment_id has been replaced by find_by and passing the user_id and assignment_id as arguments to find_by. The code snippet showing the change made is shown below.&lt;br /&gt;
Before refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by_user_id_and_assignment_id(inviter_user_id, assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
After refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by(user_id: inviter_user_id, parent_id: assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Styling was added to the pending invitations table in accordance with the existing tables so that the view is uniform across the entire page.&lt;br /&gt;
* The name of the controller was changed in accordance with the current naming convention and comments were added explaining why some important variables were used and also giving more clarity to whoever wants to modify the code in the future. There were very few comments earlier and they did not explain much about what was going on in the functions. &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
* A new private function check_team was added which takes most of the initial checks that are performed before a new join team request is successfully created. This significantly reduces the ABC size of the create method as almost all the conditional statements are moved to the private function which is called before the create function is called. The nested conditionals are also removed by making use of return statements just as in the invitations controller methods. &lt;br /&gt;
* The methods index, show and new all have code which is repeated. Another private function respond_after was written which makes the code DRYer.&lt;br /&gt;
* The view here too contained tables which did not follow the styling that is present throughout the other sections of the page. Styling was added to the pending join team requests table to make it same as the other tables.&lt;br /&gt;
* This controller had very comments and most of the variables were not explained, especially the codes used for reply_status which is used when a new request is sent and updated is not explained at all. The status codes 'A' - awaiting a reply etc. are clearly commented. Comments were also added explaining important pieces of code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Feature Test Scenarios==&lt;br /&gt;
Some of the possible test cases which can be used for the controllers are given below. &lt;br /&gt;
&lt;br /&gt;
* Test for create method in invitations controller: Before sending out an invitation to another student there a lot of checks that need to be performed such as checking if the invitee is a valid user, if the student is a participant in the project etc. All these scenarios are tested and finally, we make sure that a new invitation has been created in the database. The image below gives a visual representation of all the checks performed before sending out an invitation.&lt;br /&gt;
[[File:InvitationCTest2.png | center]]&lt;br /&gt;
&lt;br /&gt;
* Test for create method in join teams request controller: Similar to the create method in the invitations controller we need to do a lot of checks before sending out a new join team request. The below flow chart explains all the checks that need to be asserted before sending out a new request.&lt;br /&gt;
[[File:Test1.png|center]]&lt;br /&gt;
&lt;br /&gt;
* Test for cancel method: The cancel method is called when the student who sends out an invitation wishes to retract the sent invitation. In this scenario the invitation is destroyed from the database and we assert that change by checking the change in the count of the database. The below diagram is attached for further clarity.&lt;br /&gt;
[[File:InvitationsCTest3.png | center ]]&lt;br /&gt;
&lt;br /&gt;
* Test for decline method: In this test, we assert the change of reply_status to 'D' in the database.&lt;br /&gt;
&lt;br /&gt;
Further improvements to this project would be to write feature tests for the scenarios discussed above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running project remotely ==&lt;br /&gt;
VCL is used to host the project remotely. The login credentials as an instructor are &amp;quot;instructor6&amp;quot; with password &amp;quot;password&amp;quot;. To log in as a student, you can use 'student5425' with password 'password'&lt;br /&gt;
&lt;br /&gt;
http://152.46.20.227:3000&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/kira0992/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107615</id>
		<title>CSC/ECE 517 Spring 2017/oss E1712</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107615"/>
		<updated>2017-03-30T23:12:55Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project is part of an educational web application called Expertiza. This wiki gives the details on the refactoring tasks undertaken as part of continuous improvement of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is an open source project managed by the faculty and students of NCSU. It is a web application which offers a platform for assignments and allows learning through peer reviews. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the existing code the InvitationController and the JoinTeamRequestsController do the expected task but the there is a lot of redundancy and duplicity in the code, and the comments in the code are few and sparse. The aim of our project was to reduce the complexity of the controller by removing redundant code adding comments so that the code is easy to understand and all the variables used in the code are clearly explained.&lt;br /&gt;
&lt;br /&gt;
==Current Implementation==&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
Invitations controller handles the functions required to send invitations out to potential teammates for a project. Once a student decides to invite someone into his assignment team the controller performs some checks before sending out the invitations. These checks are performed in the create function. The current implementation has a lot of redundant code and many nested if statements. The ABC size of the method is also very high. The controller also has functions which take care of cases where an invitee accepts/declines an invitation. There is also an option to retract a sent invitation which is handled by the cancel function in the controller.&lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* The ABC size for create method is too high and needs to be refactored along by removing other nested if's in create and update_join_team_request methods.&lt;br /&gt;
* Use find_by instead of find_by_name and find_by_user_id_and_assignment_id.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used.&lt;br /&gt;
* Pending invitations needs to be displayed in the same format as other tables.&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
JoinTeamRequests controller deals with the actions to be performed after a student comes across an advertisement to join a project team. Whenever a project team creates an advertisement for others to join their team, students can see a link to the advertisement in the signup sheet. Once the student clicks on the link to the advertisement the student can then request to join the team. The create function in the JoinTeamRequestsController handles the checks before sending out the request. Again, the ABC size for this method is very high as there a lot of nested if conditions. Also, there is duplicate code in some of the functions in this controller which can be moved to a separate function. &lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Add comments on why some important variables are used.&lt;br /&gt;
* The ABC size for create method is too high.&lt;br /&gt;
* Nested if's need to be refactored.&lt;br /&gt;
* Duplicate code needs to be removed.&lt;br /&gt;
* Pending join team requests needs to be displayed in the same format as other tables&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Change Specifics==&lt;br /&gt;
The tasks identified above were implemented and the details are given below.&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
* A new private function check_users was added which performs some basic checks before the create function is called. In the original implementation, there were a lot of nested if conditions which checked if a user is valid, is a participant in the project, and if the team has slots available. All these checks were the cause of the nested if statements because they needed to be checked before an invitation is sent out to a student. The nested if's were removed by moving all these checks into the private function thereby reducing the ABC size of the create method.&lt;br /&gt;
* Nested if statements in the update_join_team_request were removed by breaking the nested statements into separate conditions and using return when the condition fails. For example, when checking if the user is valid, instead of using a nested condition to check validity, if the user is not valid then we throw an error message and return from the function.&lt;br /&gt;
* Call to the method find_by_user_id_and_assignment_id has been replaced by find_by and passing the user_id and assignment_id as arguments to find_by. The code snippet showing the change made is shown below.&lt;br /&gt;
Before refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by_user_id_and_assignment_id(inviter_user_id, assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
After refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by(user_id: inviter_user_id, parent_id: assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Styling was added to the pending invitations table in accordance with the existing tables so that the view is uniform across the entire page.&lt;br /&gt;
* The name of the controller was changed in accordance with the current naming convention and comments were added explaining why some important variables were used and also giving more clarity to whoever wants to modify the code in the future. There were very few comments earlier and they did not explain much about what was going on in the functions. &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
* A new private function check_team was added which takes most of the initial checks that are performed before a new join team request is successfully created. This significantly reduces the ABC size of the create method as almost all the conditional statements are moved to the private function which is called before the create function is called. The nested conditionals are also removed by making use of return statements just as in the invitations controller methods. &lt;br /&gt;
* The methods index, show and new all have code which is repeated. Another private function respond_after was written which makes the code DRYer.&lt;br /&gt;
* The view here too contained tables which did not follow the styling that is present throughout the other sections of the page. Styling was added to the pending join team requests table to make it same as the other tables.&lt;br /&gt;
* This controller had very comments and most of the variables were not explained, especially the codes used for reply_status which is used when a new request is sent and updated is not explained at all. The status codes 'A' - awaiting a reply etc. are clearly commented. Comments were also added explaining important pieces of code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
New test files were created and added to the project which deals with the test cases related to the invitations controller and join team requests controller. The files can be found in the spec/controllers folder. Some of the test cases are discussed in detail below. &lt;br /&gt;
&lt;br /&gt;
* Test for create method in invitations controller: Before sending out an invitation to another student there a lot of checks that need to be performed such as checking if the invitee is a valid user, if the student is a participant in the project etc. All these scenarios are tested and finally, we make sure that a new invitation has been created in the database. The image below gives a visual representation of all the checks performed before sending out an invitation.&lt;br /&gt;
[[File:InvitationCTest2.png | center]]&lt;br /&gt;
&lt;br /&gt;
* Test for create method in join teams request controller: Similar to the create method in the invitations controller we need to do a lot of checks before sending out a new join team request. The below flow chart explains all the checks that need to be asserted before sending out a new request.&lt;br /&gt;
[[File:Test1.png|center]]&lt;br /&gt;
&lt;br /&gt;
* Test for cancel method: The cancel method is called when the student who sends out an invitation wishes to retract the sent invitation. In this scenario the invitation is destroyed from the database and we assert that change by checking the change in the count of the database. The below diagram is attached for further clarity.&lt;br /&gt;
[[File:InvitationsCTest3.png | center ]]&lt;br /&gt;
&lt;br /&gt;
* Test for decline method: In this test, we assert the change of reply_status to 'D' in the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running project remotely ==&lt;br /&gt;
VCL is used to host the project remotely. The login credentials as an instructor are &amp;quot;instructor6&amp;quot; with password &amp;quot;password&amp;quot;. To log in as a student, you can use 'student5425' with password 'password'&lt;br /&gt;
&lt;br /&gt;
http://152.46.20.227:3000&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/kira0992/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107614</id>
		<title>CSC/ECE 517 Spring 2017/oss E1712</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107614"/>
		<updated>2017-03-30T23:08:16Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Explaining test scenarios in detail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project is part of an educational web application called Expertiza. This wiki gives the details on the refactoring tasks undertaken as part of continuous improvement of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is an open source project managed by the faculty and students of NCSU. It is a web application which offers a platform for assignments and allows learning through peer reviews. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the existing code the InvitationController and the JoinTeamRequestsController do the expected task but the there is a lot of redundancy and duplicity in the code, and the comments in the code are few and sparse. The aim of our project was to reduce the complexity of the controller by removing redundant code adding comments so that the code is easy to understand and all the variables used in the code are clearly explained.&lt;br /&gt;
&lt;br /&gt;
==Current Implementation==&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
Invitations controller handles the functions required to send invitations out to potential teammates for a project. Once a student decides to invite someone into his assignment team the controller performs some checks before sending out the invitations. These checks are performed in the create function. The current implementation has a lot of redundant code and many nested if statements. The ABC size of the method is also very high. The controller also has functions which take care of cases where an invitee accepts/declines an invitation. There is also an option to retract a sent invitation which is handled by the cancel function in the controller.&lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* The ABC size for create method is too high and needs to be refactored along by removing other nested if's in create and update_join_team_request methods.&lt;br /&gt;
* Use find_by instead of find_by_name and find_by_user_id_and_assignment_id.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used.&lt;br /&gt;
* Pending invitations needs to be displayed in the same format as other tables.&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
JoinTeamRequests controller deals with the actions to be performed after a student comes across an advertisement to join a project team. Whenever a project team creates an advertisement for others to join their team, students can see a link to the advertisement in the signup sheet. Once the student clicks on the link to the advertisement the student can then request to join the team. The create function in the JoinTeamRequestsController handles the checks before sending out the request. Again, the ABC size for this method is very high as there a lot of nested if conditions. Also, there is duplicate code in some of the functions in this controller which can be moved to a separate function. &lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Add comments on why some important variables are used.&lt;br /&gt;
* The ABC size for create method is too high.&lt;br /&gt;
* Nested if's need to be refactored.&lt;br /&gt;
* Duplicate code needs to be removed.&lt;br /&gt;
* Pending join team requests needs to be displayed in the same format as other tables&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Change Specifics==&lt;br /&gt;
The tasks identified above were implemented and the details are given below.&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
* A new private function check_users was added which performs some basic checks before the create function is called. In the original implementation, there were a lot of nested if conditions which checked if a user is valid, is a participant in the project, and if the team has slots available. All these checks were the cause of the nested if statements because they needed to be checked before an invitation is sent out to a student. The nested if's were removed by moving all these checks into the private function thereby reducing the ABC size of the create method.&lt;br /&gt;
* Nested if statements in the update_join_team_request were removed by breaking the nested statements into separate conditions and using return when the condition fails. For example, when checking if the user is valid, instead of using a nested condition to check validity, if the user is not valid then we throw an error message and return from the function.&lt;br /&gt;
* Call to the method find_by_user_id_and_assignment_id has been replaced by find_by and passing the user_id and assignment_id as arguments to find_by. The code snippet showing the change made is shown below.&lt;br /&gt;
Before refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by_user_id_and_assignment_id(inviter_user_id, assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
After refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by(user_id: inviter_user_id, parent_id: assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Styling was added to the pending invitations table in accordance with the existing tables so that the view is uniform across the entire page.&lt;br /&gt;
* The name of the controller was changed in accordance with the current naming convention and comments were added explaining why some important variables were used and also giving more clarity to whoever wants to modify the code in the future. There were very few comments earlier and they did not explain much about what was going on in the functions. &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
* A new private function check_team was added which takes most of the initial checks that are performed before a new join team request is successfully created. This significantly reduces the ABC size of the create method as almost all the conditional statements are moved to the private function which is called before the create function is called. The nested conditionals are also removed by making use of return statements just as in the invitations controller methods. &lt;br /&gt;
* The methods index, show and new all have code which is repeated. Another private function respond_after was written which makes the code DRYer.&lt;br /&gt;
* The view here too contained tables which did not follow the styling that is present throughout the other sections of the page. Styling was added to the pending join team requests table to make it same as the other tables.&lt;br /&gt;
* This controller had very comments and most of the variables were not explained, especially the codes used for reply_status which is used when a new request is sent and updated is not explained at all. The status codes 'A' - awaiting a reply etc. are clearly commented. Comments were also added explaining important pieces of code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
New test files were created and added to the project which deals with the test cases related to the invitations controller and join team requests controller. The files can be found in the spec/controllers folder. Some of the test cases are discussed in detail below. &lt;br /&gt;
&lt;br /&gt;
* Test for create method in invitations controller: Before sending out an invitation to another student there a lot of checks that need to be performed such as checking if the invitee is a valid user, if the student is a participant in the project etc. All these scenarios are tested and finally, we make sure that a new invitation has been created in the database. The image below gives a visual representation of all the checks performed before sending out an invitation.&lt;br /&gt;
[[File:InvitationCTest2.png | center]]&lt;br /&gt;
&lt;br /&gt;
* Test for create method in join teams request controller: Similar to the create method in the invitations controller we need to do a lot of checks before sending out a new join team request. The below flow chart explains all the checks that need to be asserted before sending out a new request.&lt;br /&gt;
[[File:Test1.png|center]]&lt;br /&gt;
&lt;br /&gt;
* Test for cancel method: The cancel method is called when the student who sends out an invitation wishes to retract the sent invitation. In this scenario the invitation is destroyed from the database and we assert that change by checking the change in the count of the database. The below diagram is attached for further clarity.&lt;br /&gt;
[[File:InvitationsCTest3.png | center ]]&lt;br /&gt;
&lt;br /&gt;
* Test for decline method: In this test, we assert the change of reply_status to 'D' in the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running project remotely ===&lt;br /&gt;
VCL is used to host the project remotely. The login credentials as an instructor are &amp;quot;instructor6&amp;quot; with password &amp;quot;password&amp;quot;. To log in as a student, you can use 'student5425' with password 'password'&lt;br /&gt;
&lt;br /&gt;
http://152.46.20.227:3000&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/kira0992/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107613</id>
		<title>CSC/ECE 517 Spring 2017/oss E1712</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107613"/>
		<updated>2017-03-30T22:49:54Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Adding more information about the tasks undertaken&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project is part of an educational web application called Expertiza. This wiki gives the details on the refactoring tasks undertaken as part of continuous improvement of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is an open source project managed by the faculty and students of NCSU. It is a web application which offers a platform for assignments and allows learning through peer reviews. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the existing code the InvitationController and the JoinTeamRequestsController do the expected task but the there is a lot of redundancy and duplicity in the code, and the comments in the code are few and sparse. The aim of our project was to reduce the complexity of the controller by removing redundant code adding comments so that the code is easy to understand and all the variables used in the code are clearly explained.&lt;br /&gt;
&lt;br /&gt;
==Current Implementation==&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
Invitations controller handles the functions required to send invitations out to potential teammates for a project. Once a student decides to invite someone into his assignment team the controller performs some checks before sending out the invitations. These checks are performed in the create function. The current implementation has a lot of redundant code and many nested if statements. The ABC size of the method is also very high. The controller also has functions which take care of cases where an invitee accepts/declines an invitation. There is also an option to retract a sent invitation which is handled by the cancel function in the controller.&lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* The ABC size for create method is too high and needs to be refactored along by removing other nested if's in create and update_join_team_request methods.&lt;br /&gt;
* Use find_by instead of find_by_name and find_by_user_id_and_assignment_id.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used.&lt;br /&gt;
* Pending invitations needs to be displayed in the same format as other tables.&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
JoinTeamRequests controller deals with the actions to be performed after a student comes across an advertisement to join a project team. Whenever a project team creates an advertisement for others to join their team, students can see a link to the advertisement in the signup sheet. Once the student clicks on the link to the advertisement the student can then request to join the team. The create function in the JoinTeamRequestsController handles the checks before sending out the request. Again, the ABC size for this method is very high as there a lot of nested if conditions. Also, there is duplicate code in some of the functions in this controller which can be moved to a separate function. &lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Add comments on why some important variables are used.&lt;br /&gt;
* The ABC size for create method is too high.&lt;br /&gt;
* Nested if's need to be refactored.&lt;br /&gt;
* Duplicate code needs to be removed.&lt;br /&gt;
* Pending join team requests needs to be displayed in the same format as other tables&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
==Change Specifics==&lt;br /&gt;
The tasks identified above were implemented and the details are given below.&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
* A new private function check_users was added which performs some basic checks before the create function is called. In the original implementation, there were a lot of nested if conditions which checked if a user is valid, is a participant in the project, and if the team has slots available. All these checks were the cause of the nested if statements because they needed to be checked before an invitation is sent out to a student. The nested if's were removed by moving all these checks into the private function thereby reducing the ABC size of the create method.&lt;br /&gt;
* Nested if statements in the update_join_team_request were removed by breaking the nested statements into separate conditions and using return when the condition fails. For example, when checking if the user is valid, instead of using a nested condition to check validity, if the user is not valid then we throw an error message and return from the function.&lt;br /&gt;
* Call to the method find_by_user_id_and_assignment_id has been replaced by find_by and passing the user_id and assignment_id as arguments to find_by. The code snippet showing the change made is shown below.&lt;br /&gt;
Before refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by_user_id_and_assignment_id(inviter_user_id, assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
After refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by(user_id: inviter_user_id, parent_id: assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Styling was added to the pending invitations table in accordance with the existing tables so that the view is uniform across the entire page.&lt;br /&gt;
* The name of the controller was changed in accordance with the current naming convention and comments were added explaining why some important variables were used and also giving more clarity to whoever wants to modify the code in the future. There were very few comments earlier and they did not explain much about what was going on in the functions. &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
* A new private function check_team was added which takes most of the initial checks that are performed before a new join team request is successfully created. This significantly reduces the ABC size of the create method as almost all the conditional statements are moved to the private function which is called before the create function is called. The nested conditionals are also removed by making use of return statements just as in the invitations controller methods. &lt;br /&gt;
* The methods index, show and new all have code which is repeated. Another private function respond_after was written which makes the code DRYer.&lt;br /&gt;
* The view here too contained tables which did not follow the styling that is present throughout the other sections of the page. Styling was added to the pending join team requests table to make it same as the other tables.&lt;br /&gt;
* This controller had very comments and most of the variables were not explained, especially the codes used for reply_status which is used when a new request is sent and updated is not explained at all. The status codes 'A' - awaiting a reply etc. are clearly commented. Comments were also added explaining important pieces of code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test case charts ==&lt;br /&gt;
'''Decline:'''&lt;br /&gt;
Assert the change of status to 'D' in the database&lt;br /&gt;
&lt;br /&gt;
'''Cancel'''&lt;br /&gt;
[[File:InvitationsCTest3.png | center ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Create function'''&lt;br /&gt;
[[File:Test1.png|center]]&lt;br /&gt;
[[File:InvitationCTest2.png | center]]&lt;br /&gt;
&lt;br /&gt;
=== Running project remotely ===&lt;br /&gt;
VCL is used to host the project remotely. The login credentials as an instructor are &amp;quot;instructor6&amp;quot; with password &amp;quot;password&amp;quot;. To log in as a student, you can use 'student5425' with password 'password'&lt;br /&gt;
&lt;br /&gt;
http://152.46.20.227:3000&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/kira0992/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107610</id>
		<title>CSC/ECE 517 Spring 2017/oss E1712</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107610"/>
		<updated>2017-03-30T22:23:55Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Adding specific tasks undertaken in the project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project is part of an educational web application called Expertiza. This wiki gives the details on the refactoring tasks undertaken as part of continuous improvement of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is an open source project managed by the faculty and students of NCSU. It is a web application which offers a platform for assignments and allows learning through peer reviews. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the existing code the InvitationController and the JoinTeamRequestsController do the expected task but the there is a lot of redundancy and duplicity in the code, and the comments in the code are few and sparse. The aim of our project was to reduce the complexity of the controller by removing redundant code adding comments so that the code is easy to understand and all the variables used in the code are clearly explained.&lt;br /&gt;
&lt;br /&gt;
==Current Implementation==&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
Invitations controller handles the functions required to send invitations out to potential teammates for a project. Once a student decides to invite someone into his assignment team the controller performs some checks before sending out the invitations. These checks are performed in the create function. The current implementation has a lot of redundant code and many nested if statements. The ABC size of the method is also very high. The controller also has functions which take care of cases where an invitee accepts/declines an invitation. There is also an option to retract a sent invitation which is handled by the cancel function in the controller.&lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* The ABC size for create method is too high and needs to be refactored along by removing other nested if's in create and update_join_team_request methods.&lt;br /&gt;
* Use find_by instead of find_by_name and find_by_user_id_and_assignment_id.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used.&lt;br /&gt;
* Pending invitations needs to be displayed in the same format as other tables.&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
JoinTeamRequests controller deals with the actions to be performed after a student comes across an advertisement to join a project team. Whenever a project team creates an advertisement for others to join their team, students can see a link to the advertisement in the signup sheet. Once the student clicks on the link to the advertisement the student can then request to join the team. The create function in the JoinTeamRequestsController handles the checks before sending out the request. Again, the ABC size for this method is very high as there a lot of nested if conditions. Also, there is duplicate code in some of the functions in this controller which can be moved to a separate function. &lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Add comments on why some important variables are used.&lt;br /&gt;
* The ABC size for create method is too high.&lt;br /&gt;
* Nested if's need to be refactored.&lt;br /&gt;
* Duplicate code needs to be removed.&lt;br /&gt;
* Pending join team requests needs to be displayed in the same format as other tables&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
==Change Specifics==&lt;br /&gt;
The tasks identified above were implemented and the details are given below.&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
* A new private function check_users was added which performs some basic checks before the create function is called. In the original implementation, there were a lot of nested if conditions which checked if a user is valid, is a participant in the project, and if the team has slots available. All these checks were the cause of the nested if statements because they needed to be checked before an invitation is sent out to a student. The nested if's were removed by moving all these checks into the private function thereby reducing the ABC size of the create method.&lt;br /&gt;
* Nested if statements in the update_join_team_request were removed by breaking the nested statements into separate conditions and using return when the condition fails. For example, when checking if the user is valid, instead of using a nested condition to check validity, if the user is not valid then we throw an error message and return from the function.&lt;br /&gt;
* Call to the method find_by_user_id_and_assignment_id has been replaced by find_by and passing the user_id and assignment_id as arguments to find_by. The code snippet showing the change made is shown below.&lt;br /&gt;
Before refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by_user_id_and_assignment_id(inviter_user_id, assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
After refactoring&lt;br /&gt;
&amp;lt;pre&amp;gt;AssignmentParticipant.find_by(user_id: inviter_user_id, parent_id: assignment_id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test case charts ==&lt;br /&gt;
'''Decline:'''&lt;br /&gt;
Assert the change of status to 'D' in the database&lt;br /&gt;
&lt;br /&gt;
'''Cancel'''&lt;br /&gt;
[[File:InvitationsCTest3.png | center ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Create function'''&lt;br /&gt;
[[File:Test1.png|center]]&lt;br /&gt;
[[File:InvitationCTest2.png | center]]&lt;br /&gt;
&lt;br /&gt;
=== Running project remotely ===&lt;br /&gt;
VCL is used to host the project remotely. The login credentials as an instructor are &amp;quot;instructor6&amp;quot; with password &amp;quot;password&amp;quot;. To login as a student, you can use 'student5425' with password 'password'&lt;br /&gt;
&lt;br /&gt;
http://152.46.20.227:3000&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/kira0992/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107609</id>
		<title>CSC/ECE 517 Spring 2017/oss E1712</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107609"/>
		<updated>2017-03-30T21:35:58Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Modified tasks section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project is part of an educational web application called Expertiza. This wiki gives the details on the refactoring tasks undertaken as part of continuous improvement of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is an open source project managed by the faculty and students of NCSU. It is a web application which offers a platform for assignments and allows learning through peer reviews. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the existing code the InvitationController and the JoinTeamRequestsController do the expected task but the there is a lot of redundancy and duplicity in the code, and the comments in the code are few and sparse. The aim of our project was to reduce the complexity of the controller by removing redundant code adding comments so that the code is easy to understand and all the variables used in the code are clearly explained.&lt;br /&gt;
&lt;br /&gt;
==Current Implementation==&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
Invitations controller handles the functions required to send invitations out to potential teammates for a project. Once a student decides to invite someone into his assignment team the controller performs some checks before sending out the invitations. These checks are performed in the create function. The current implementation has a lot of redundant code and many nested if statements. The ABC size of the method is also very high. The controller also has functions which take care of cases where an invitee accepts/declines an invitation. There is also an option to retract a sent invitation which is handled by the cancel function in the controller.&lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* The ABC size for create method is too high and needs to be refactored along by removing other nested if's in create and update_join_team_request methods.&lt;br /&gt;
* Use find_by instead of find_by_name and find_by_user_id_and_assignment_id.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used.&lt;br /&gt;
* Pending invitations needs to be displayed in the same format as other tables.&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
JoinTeamRequests controller deals with the actions to be performed after a student comes across an advertisement to join a project team. Whenever a project team creates an advertisement for others to join their team, students can see a link to the advertisement in the signup sheet. Once the student clicks on the link to the advertisement the student can then request to join the team. The create function in the JoinTeamRequestsController handles the checks before sending out the request. Again, the ABC size for this method is very high as there a lot of nested if conditions. Also, there is duplicate code in some of the functions in this controller which can be moved to a separate function. &lt;br /&gt;
====Tasks Identified====&lt;br /&gt;
* Add comments on why some important variables are used.&lt;br /&gt;
* The ABC size for create method is too high.&lt;br /&gt;
* Nested if's need to be refactored.&lt;br /&gt;
* Duplicate code needs to be removed.&lt;br /&gt;
* Pending join team requests needs to be displayed in the same format as other tables&lt;br /&gt;
* Feature tests need to be written for the controller &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Test case charts ===&lt;br /&gt;
'''Decline:'''&lt;br /&gt;
Assert the change of status to 'D' in the database&lt;br /&gt;
&lt;br /&gt;
'''Cancel'''&lt;br /&gt;
[[File:InvitationsCTest3.png | center ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Create function'''&lt;br /&gt;
[[File:Test1.png|center]]&lt;br /&gt;
[[File:InvitationCTest2.png | center]]&lt;br /&gt;
&lt;br /&gt;
=== Running project remotely ===&lt;br /&gt;
VCL is used to host the project remotely. The login credentials as an instructor are &amp;quot;instructor6&amp;quot; with password &amp;quot;password&amp;quot;. To login as a student, you can use 'student5425' with password 'password'&lt;br /&gt;
&lt;br /&gt;
http://152.46.20.227:3000&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/kira0992/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107605</id>
		<title>CSC/ECE 517 Spring 2017/oss E1712</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107605"/>
		<updated>2017-03-30T21:13:24Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Added more information about the current implementation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This project is part of an educational web application called Expertiza. This wiki gives the details on the refactoring tasks undertaken as part of continuous improvement of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is an open source project managed by the faculty and students of NCSU. It is a web application which offers a platform for assignments and allows learning through peer reviews. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the existing code the InvitationController and the JoinTeamRequestsController do the expected task but the there is a lot of redundancy and duplicity in the code, and the comments in the code are few and sparse. The aim of our project was to reduce the complexity of the controller by removing redundant code adding comments so that the code is easy to understand and all the variables used in the code are clearly explained.&lt;br /&gt;
&lt;br /&gt;
==Current Implementation==&lt;br /&gt;
===Invitations Controller===&lt;br /&gt;
Invitations controller handles the functions required to send invitations out to potential teammates for a project. Once a student decides to invite someone into his assignment team the controller performs some checks before sending out the invitations. These checks are performed in the create function. The current implementation has a lot of redundant code and many nested if statements. The ABC size of the method is also very high.&lt;br /&gt;
&lt;br /&gt;
===Join Team Requests Controller===&lt;br /&gt;
JoinTeamRequests controller deals with the actions to be performed after a student comes across an advertisement to join a project team. Whenever a project team creates an advertisement for others to join their team, students can see a link to the advertisement in the signup sheet. Once the student clicks on the link to the advertisement the student can then request to join the team. The create function in the JoinTeamRequestsController handles the checks before sending out the request. Again, the ABC size for this method is very high as there a lot of nested if conditions. Also, there is duplicate code in some of the functions in this controller which can be moved to a separate function. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tasks Identified ===&lt;br /&gt;
InvitationController&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* The ABC size for create method is too high and needs to be refactored along with removal of other nested if's in some methods&lt;br /&gt;
* Use find_by instead of find_by_name and find_by_user_id_and_assignment_id.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used&lt;br /&gt;
JoinTeamRequestsController&lt;br /&gt;
* Add comments on why some important variables are used. &lt;br /&gt;
* The ABC size for create method is too high and other 'nested-if's are refactored.  &lt;br /&gt;
* Duplicacy in code is to be removed.&lt;br /&gt;
&lt;br /&gt;
* Fix UI to maintain consistency in displaying information about team members. &lt;br /&gt;
Feature tests for theses controllers have to be updated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Test case charts ===&lt;br /&gt;
'''Decline:'''&lt;br /&gt;
Assert the change of status to 'D' in the database&lt;br /&gt;
&lt;br /&gt;
'''Cancel'''&lt;br /&gt;
[[File:InvitationsCTest3.png | center ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Create function'''&lt;br /&gt;
[[File:Test1.png|center]]&lt;br /&gt;
[[File:InvitationCTest2.png | center]]&lt;br /&gt;
&lt;br /&gt;
=== Running project remotely ===&lt;br /&gt;
VCL is used to host the project remotely. The login credentials as an instructor are &amp;quot;instructor6&amp;quot; with password &amp;quot;password&amp;quot;. To login as a student, you can use 'student5425' with password 'password'&lt;br /&gt;
&lt;br /&gt;
http://152.46.20.227:3000&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/kira0992/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107604</id>
		<title>CSC/ECE 517 Spring 2017/oss E1712</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1712&amp;diff=107604"/>
		<updated>2017-03-30T20:12:24Z</updated>

		<summary type="html">&lt;p&gt;Aananth3: Made changes to introduction and added a Background section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This project is part of an educational web application called Expertiza. This wiki gives the details on the refactoring tasks undertaken as part of continuous improvement of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is an open source project managed by the faculty and students of NCSU. It is a web application which offers a platform for assignments and allows learning through peer reviews. &lt;br /&gt;
&lt;br /&gt;
=== Description of project: ===&lt;br /&gt;
The project involves refactoring of  &amp;quot;join_team_requests_controller.rb&amp;quot; and &amp;quot;invitations_controller.rb&amp;quot;. The complexity of the methods is reduced and redundant code is removed. Comments are added to make the controllers easier to understand. &lt;br /&gt;
&lt;br /&gt;
Invitations controller handles the functions required to send invitations out to potential teammates for a project. &lt;br /&gt;
&lt;br /&gt;
JoinTeamRequests controller deals with the actions to be performed after a student comes across an advertisement to join a project team.&lt;br /&gt;
&lt;br /&gt;
=== Tasks Identified ===&lt;br /&gt;
InvitationController&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* The ABC size for create method is too high and needs to be refactored along with removal of other nested if's in some methods&lt;br /&gt;
* Use find_by instead of find_by_name and find_by_user_id_and_assignment_id.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used&lt;br /&gt;
JoinTeamRequestsController&lt;br /&gt;
* Add comments on why some important variables are used. &lt;br /&gt;
* The ABC size for create method is too high and other 'nested-if's are refactored.  &lt;br /&gt;
* Duplicacy in code is to be removed.&lt;br /&gt;
&lt;br /&gt;
* Fix UI to maintain consistency in displaying information about team members. &lt;br /&gt;
Feature tests for theses controllers have to be updated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Test case charts ===&lt;br /&gt;
'''Decline:'''&lt;br /&gt;
Assert the change of status to 'D' in the database&lt;br /&gt;
&lt;br /&gt;
'''Cancel'''&lt;br /&gt;
[[File:InvitationsCTest3.png | center ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Create function'''&lt;br /&gt;
[[File:Test1.png|center]]&lt;br /&gt;
[[File:InvitationCTest2.png | center]]&lt;br /&gt;
&lt;br /&gt;
=== Running project remotely ===&lt;br /&gt;
VCL is used to host the project remotely. The login credentials as an instructor are &amp;quot;instructor6&amp;quot; with password &amp;quot;password&amp;quot;. To login as a student, you can use 'student5425' with password 'password'&lt;br /&gt;
&lt;br /&gt;
http://152.46.20.227:3000&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/kira0992/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Aananth3</name></author>
	</entry>
</feed>