<?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=Hbharat</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=Hbharat"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Hbharat"/>
	<updated>2026-08-20T11:27:02Z</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_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145604</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145604"/>
		<updated>2022-05-01T21:15:22Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* View */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
email_author_reviewers(subject, body, email) will be added which can be used in both the workflows to send an Email.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new view will be created. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send Email Method in MailerHelper===&lt;br /&gt;
We created a new method called send_mail_to_author_reviewers(subject, body, email), which accepts 3 parameters; subject, body and email. We used the same method for both sending emails to authors and reviewers.&lt;br /&gt;
&lt;br /&gt;
[[File:Email_method.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
====View====&lt;br /&gt;
We modified the view to add a link that redirects the author to the form. &lt;br /&gt;
&lt;br /&gt;
[[File:Email_the_author_link.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Author to Reviewers===&lt;br /&gt;
====View====&lt;br /&gt;
We modified the view to add a link that redirects the reviewer to the form. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_to_reviewers.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Future Scope==&lt;br /&gt;
&lt;br /&gt;
1. Currently, only a subject and a text message are provided to send an Email, in future the above functionality can be extended to include attachments in the Email. For example, Reviewer can send an image/screenshot for a failure they have come across to the Author.&lt;br /&gt;
&lt;br /&gt;
2. New functionality to send messages within expertiza&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145603</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145603"/>
		<updated>2022-05-01T21:15:07Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* View */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
email_author_reviewers(subject, body, email) will be added which can be used in both the workflows to send an Email.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new view will be created. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send Email Method in MailerHelper===&lt;br /&gt;
We created a new method called send_mail_to_author_reviewers(subject, body, email), which accepts 3 parameters; subject, body and email. We used the same method for both sending emails to authors and reviewers.&lt;br /&gt;
&lt;br /&gt;
[[File:Email_method.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
====View====&lt;br /&gt;
We modified the view to add a link that redirects the author to the form. &lt;br /&gt;
&lt;br /&gt;
[[File:Email_the_author_link.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Author to Reviewers===&lt;br /&gt;
====View====&lt;br /&gt;
We modified the view to add a link that redirects the reviewer to the form. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_to_reviewers.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Future Scope==&lt;br /&gt;
&lt;br /&gt;
1. Currently, only a subject and a text message are provided to send an Email, in future the above functionality can be extended to include attachments in the Email. For example, Reviewer can send an image/screenshot for a failure they have come across to the Author.&lt;br /&gt;
&lt;br /&gt;
2. New functionality to send messages within expertiza&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145602</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145602"/>
		<updated>2022-05-01T21:14:37Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
email_author_reviewers(subject, body, email) will be added which can be used in both the workflows to send an Email.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new view will be created. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send Email Method in MailerHelper===&lt;br /&gt;
We created a new method called send_mail_to_author_reviewers(subject, body, email), which accepts 3 parameters; subject, body and email. We used the same method for both sending emails to authors and reviewers.&lt;br /&gt;
&lt;br /&gt;
[[File:Email_method.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
====View====&lt;br /&gt;
We modified the view to add a link that redirects the author to the form. &lt;br /&gt;
&lt;br /&gt;
[[File:Email_the_author_link.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Author to Reviewers===&lt;br /&gt;
====View====&lt;br /&gt;
We modified the view to add a link that redirects the reviewer to the form. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_to_reviewers.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Future Scope==&lt;br /&gt;
&lt;br /&gt;
1. Currently, only a subject and a text message are provided to send an Email, in future the above functionality can be extended to include attachments in the Email. For example, Reviewer can send an image/screenshot for a failure they have come across to the Author.&lt;br /&gt;
&lt;br /&gt;
2. New functionality to send messages within expertiza&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Send_email_to_reviewers.png&amp;diff=145601</id>
		<title>File:Send email to reviewers.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Send_email_to_reviewers.png&amp;diff=145601"/>
		<updated>2022-05-01T21:13:53Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Email_the_author_link.png&amp;diff=145600</id>
		<title>File:Email the author link.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Email_the_author_link.png&amp;diff=145600"/>
		<updated>2022-05-01T21:12:50Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145596</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145596"/>
		<updated>2022-05-01T20:35:53Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Send Email Method in MailerHelper */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Send Email Method in MailerHelper===&lt;br /&gt;
We created a new method called send_mail_to_author_reviewers(subject, body, email), which accepts 3 parameters; subject, body and email. We used the same method for both sending emails to authors and reviewers.&lt;br /&gt;
&lt;br /&gt;
[[File:Email_method.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
====View====&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Author to Reviewers===&lt;br /&gt;
====View====&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145595</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145595"/>
		<updated>2022-05-01T20:35:40Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Send Email Method in MailerHelper */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Send Email Method in MailerHelper===&lt;br /&gt;
We created a new method called send_mail_to_author_reviewers(subject, body, email), which accepts 3 parameters; subject, body and email. We used the same method for both sending emails to authors and reviewers.&lt;br /&gt;
[[File:Email_method.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
====View====&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Author to Reviewers===&lt;br /&gt;
====View====&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Email_method.png&amp;diff=145594</id>
		<title>File:Email method.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Email_method.png&amp;diff=145594"/>
		<updated>2022-05-01T20:35:29Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145593</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145593"/>
		<updated>2022-05-01T20:35:02Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Implememtation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Send Email Method in MailerHelper===&lt;br /&gt;
We created a new method called send_mail_to_author_reviewers(subject, body, email), which accepts 3 parameters; subject, body and email. We used the same method for both sending emails to authors and reviewers.&lt;br /&gt;
[[File:Email_method.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
====View====&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Author to Reviewers===&lt;br /&gt;
====View====&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145592</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145592"/>
		<updated>2022-05-01T20:28:32Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Email from Reviewer to Author */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
====View====&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Author to Reviewers===&lt;br /&gt;
====View====&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145591</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145591"/>
		<updated>2022-05-01T20:28:07Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Reviewer View */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Email from Author to Reviewers===&lt;br /&gt;
====View====&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Controller====&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145590</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145590"/>
		<updated>2022-05-01T20:27:26Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Author View */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Email from Reviewer to Author===&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reviewer View===&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145589</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145589"/>
		<updated>2022-05-01T20:26:06Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Author View */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Author View===&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reviewer View===&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145588</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145588"/>
		<updated>2022-05-01T20:25:51Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Reviewer View */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Author View===&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reviewer View===&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145587</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145587"/>
		<updated>2022-05-01T20:25:29Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Reviewer View */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Author View===&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reviewer View===&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|900px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145586</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145586"/>
		<updated>2022-05-01T20:25:02Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Review View */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Author View===&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reviewer View===&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_reviewer.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145585</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145585"/>
		<updated>2022-05-01T20:24:20Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Implememtation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Author View===&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
We created a method called send_email in the response_controller which handles the functionality for sending an email. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we pass the subject, body, and email from the view to the controller and send them to a method called send_mail_to_author_reviewers which is a part of MailerHelper. This method is responsible for sending emails to the author. &lt;br /&gt;
&lt;br /&gt;
[[File:Send_email_author.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Review View===&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
To send an email to all the reviewers, we created a method called send_email in the student_task_controller. The method also contains validations that throw an error if the user is trying to submit the form without filling out the subject or body. If there are no validation errors, we go ahead and pass the parameters; subject, body, and reviewer.email to the send_mail_to_author_reviewers method from MailerHelper. &lt;br /&gt;
[[File:Send_email_reviewer.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145584</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=145584"/>
		<updated>2022-05-01T20:11:51Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implememtation==&lt;br /&gt;
&lt;br /&gt;
The following are the screenshots of the changes that we made in the codebase. &lt;br /&gt;
&lt;br /&gt;
===Author View===&lt;br /&gt;
To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter the subject and body. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Review View===&lt;br /&gt;
To create the reviewer view, we created a new view called email_reviewers.html.erb where we created a form that asks the user to enter the subject and body of the email. &lt;br /&gt;
[[File:Author_view.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implememtation==The following are the screenshots of the changes that we made in the codebase. ===Author View===To create the author view, we created a new view called author.html.erb and created a form in that file, which asks the user to enter email and subject.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Send_email_reviewer.png&amp;diff=145583</id>
		<title>File:Send email reviewer.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Send_email_reviewer.png&amp;diff=145583"/>
		<updated>2022-05-01T20:03:00Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Send_email_author.png&amp;diff=145582</id>
		<title>File:Send email author.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Send_email_author.png&amp;diff=145582"/>
		<updated>2022-05-01T20:02:39Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Reviewer_view.png&amp;diff=145581</id>
		<title>File:Reviewer view.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Reviewer_view.png&amp;diff=145581"/>
		<updated>2022-05-01T20:02:15Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Author_view.png&amp;diff=145580</id>
		<title>File:Author view.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Author_view.png&amp;diff=145580"/>
		<updated>2022-05-01T20:01:39Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144714</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144714"/>
		<updated>2022-04-11T21:53:28Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams==&lt;br /&gt;
&lt;br /&gt;
==='''Reviewers use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Reviewer_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Author's use case'''===&lt;br /&gt;
&lt;br /&gt;
:: [[File:Author_usecase.png|300px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'''def send_mail_to_user(user, subject, partial_name, password)''' can be used to send the email to an another from reviewer and&lt;br /&gt;
'''def send_mail_to_assigned_reviewers''' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/response/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/response_controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/response/email_author.html.erb :''' This is the new UI page. A mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. '''app/views/student_task/view.html.erb :''' link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. '''app/controllers/student_task controller.rb :''' implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. '''app/views/student_task/email_reviewers.html.erb :''' This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Assignment_page.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the response_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general repeatable solution to a commonly occurring problem in software design. It is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
We will be implementing the decorator design pattern in our code. The decorator pattern is used to add/extend existing functionality without modifying the existing code. Our code is also going to follow the open-closed principle.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment_page.png&amp;diff=144713</id>
		<title>File:Assignment page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment_page.png&amp;diff=144713"/>
		<updated>2022-04-11T21:52:35Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144695</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144695"/>
		<updated>2022-04-11T21:04:34Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'def send_mail_to_user(user, subject, partial_name, password)' can be used to send the email to an another from reviewer and&lt;br /&gt;
'def send_mail_to_assigned_reviewers' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. app/views/student_review/list.html.erb : link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. app/controllers/student_review_controller.rb : implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. app/views/student_review/email_author.html.erb ( new partial) : This is the new UI page. Mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. App/views/student_task/list.html.erb : link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. app/controllers/student_task controller.rb : implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. app/views/student_review/email_reviwers.html.erb ( new partial): This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Email-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_SS.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the student_review_controller.rb and student_task controller.rb.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general repeatable solution to a commonly occurring problem in software design. It is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
We will be implementing the decorator design pattern in our code. The decorator pattern is used to add/extend existing functionality without modifying the existing code. Our code is also going to follow the open-closed principle.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Author_SS.png&amp;diff=144694</id>
		<title>File:Author SS.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Author_SS.png&amp;diff=144694"/>
		<updated>2022-04-11T21:03:20Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144692</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144692"/>
		<updated>2022-04-11T21:00:36Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flowchart==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author's View''' : The flow for authors to email reviewers regarding the work they have been reviewed for:&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviewer's View''' : The flow for reviewers to email authors whose work they have reviewed:&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|1000px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
===Code Implementation===&lt;br /&gt;
&lt;br /&gt;
Expertiza code base already contains a module 'MailerHelper' which makes use of ActionMailer and contains methods to send emails to different users.&lt;br /&gt;
'def send_mail_to_user(user, subject, partial_name, password)' can be used to send the email to an another from reviewer and&lt;br /&gt;
'def send_mail_to_assigned_reviewers' can be used to send emails to all reviewers from an author.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
From the Reviewer's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. app/views/student_review/list.html.erb : link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. app/controllers/student_review_controller.rb : implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. app/views/student_review/email_author.html.erb ( new partial) : This is the new UI page. Mock up for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Author's perspective, the following files will be updated and a new partial will be created to render the new view. &lt;br /&gt;
&lt;br /&gt;
1. App/views/student_task/list.html.erb : link to the new view will be added to this file. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. app/controllers/student_task controller.rb : implementation of the action method for the send button will be added here. Methods from MailerHelper will be used here. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. app/views/student_review/email_reviwers.html.erb ( new partial): This is the new UI page. A mockup for the view is presented in the UI section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UI===&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Email-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Author_Screenshot.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
===RSPEC Testing===&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the MailHelper class method.&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
We are planning to cover the following test cases: &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;,&lt;br /&gt;
    the author must be redirected to email_reviewers_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the reviewers of the authors' work.&lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
 1. Upon Clicking on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;,&lt;br /&gt;
    the reviewer must be redirected to email_authors_view. &lt;br /&gt;
 2. Check if the recipients of the email are indeed the authors of the reviewed work.&lt;br /&gt;
&lt;br /&gt;
We will also be checking the below two edge cases:&lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
 1. Once the email is sent, the author should be redirected to the assignment page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
 2. Once the email is sent, the author should be redirected to the &amp;quot;others work&amp;quot; page with the corresponding success&lt;br /&gt;
    or failure message&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general repeatable solution to a commonly occurring problem in software design. It is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
We will be implementing the decorator design pattern in our code. The decorator pattern is used to add/extend existing functionality without modifying the existing code. Our code is also going to follow the open-closed principle.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek Arvindkumar Upadhyay (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Author_Screenshot.png&amp;diff=144691</id>
		<title>File:Author Screenshot.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Author_Screenshot.png&amp;diff=144691"/>
		<updated>2022-04-11T20:59:45Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144008</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144008"/>
		<updated>2022-04-04T21:44:35Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Manual Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Expertiza Background ===&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, codes, websites, etc). Instructors add and grade the assignments submitted by students to Expertiza. Students can be assigned in teams based on their selection of the topics. It has functionalities such as peer reviews in which students can provide feedback on other's work which helps peer in better developing the project. It is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Email-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Email-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Flowchart===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The flow for authors to email reviewers regarding the work they have been reviewed for:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The flow for reviewers to email authors whose work they have reviewed:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the MailHelper class method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
2. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general repeatable solution to a commonly occurring problem in software design. It is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
We will be implementing the decorator design pattern in our code. The decorator pattern is used to add/extend existing functionality without modifying the existing code. Our code is also going to follow the open-closed principle.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek  (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144007</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=144007"/>
		<updated>2022-04-04T21:44:11Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Manual Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Expertiza Background ===&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, codes, websites, etc). Instructors add and grade the assignments submitted by students to Expertiza. Students can be assigned in teams based on their selection of the topics. It has functionalities such as peer reviews in which students can provide feedback on other's work which helps peer in better developing the project. It is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Email-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Message-to-R.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Email-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Msg-to-A.png|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Flowchart===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The flow for authors to email reviewers regarding the work they have been reviewed for:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Author's view flowchart.jpg|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The flow for reviewers to email authors whose work they have reviewed:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Reviewers_View_Flowchart.jpg|800px]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the MailHelper class method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
For testing purposes, we are using the 'expertiza.debugging@gmail.com' as both author and reviewer. &lt;br /&gt;
There are two views that need to be tested manually. &lt;br /&gt;
&lt;br /&gt;
1. Author View:&lt;br /&gt;
&lt;br /&gt;
The author must follow the following steps:&lt;br /&gt;
 1. Go to the Assignments page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to reviewers&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the author must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send.&lt;br /&gt;
 5. Log in to the email to check if the message is received. &lt;br /&gt;
&lt;br /&gt;
1. Reviewer View:&lt;br /&gt;
&lt;br /&gt;
The reviewer must follow the following steps:&lt;br /&gt;
 1. Go to the other's work page.&lt;br /&gt;
 2. Click on the link which is placed on the right corner of the page called &amp;quot;send email to author&amp;quot;.&lt;br /&gt;
 3. On clicking the above link, the reviewer must be redirected to a page with an email text box. &lt;br /&gt;
 4. Type the email message and click on send. &lt;br /&gt;
 5. Log in to the email to check if the message is received.&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general repeatable solution to a commonly occurring problem in software design. It is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
We will be implementing the decorator design pattern in our code. The decorator pattern is used to add/extend existing functionality without modifying the existing code. Our code is also going to follow the open-closed principle.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek  (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=143994</id>
		<title>CSC/ECE 517 Spring 2022 - E2246: Email your authors/reviewers, with complete tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2246:_Email_your_authors/reviewers,_with_complete_tests&amp;diff=143994"/>
		<updated>2022-04-04T21:26:22Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Expertiza Background ===&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, codes, websites, etc). Instructors add and grade the assignments submitted by students to Expertiza. Students can be assigned in teams based on their selection of the topics. It has functionalities such as peer reviews in which students can provide feedback on other's work which helps peer in better developing the project. It is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
&lt;br /&gt;
This project adds a new feature which will enable a reviewer to send an Email to authors from inside Expertiza or for the author to email all those reviewing them. Often when reviewing another team’s submissions, a reviewer might notice that their deployment link is broken or there is some other issue. Currently, there is no way to email the authors. This features is proposed to solve this issue.&lt;br /&gt;
&lt;br /&gt;
==Scope of the Feature==&lt;br /&gt;
&lt;br /&gt;
- The feature allows authors to send a common Email to all the reviewers to report any issues or updates to their project to be reviewed. &amp;lt;br/&amp;gt;&lt;br /&gt;
- It can allow a reviewer to send an email to a particular author if the reviewer wants to convey any issues found with that particular project. &amp;lt;br/&amp;gt;&lt;br /&gt;
- Reviewers will be anonymous to authors. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Proposed Changes==&lt;br /&gt;
&lt;br /&gt;
As depicted below, Authors will be given a link on their main Assignment page “Send Email to Reviewers” which will take them to a new page where they are given a text box for typing and sending an email to all their reviewers.&lt;br /&gt;
&lt;br /&gt;
[[File:Email-A.png|500px]] &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Email-R.png|500px]] &lt;br /&gt;
[[File:File:Textbox-A.png|500px]] &lt;br /&gt;
[[File:Textbox-R.png|500px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Reviewers will be given a similar text box link on their “Other’s Work” page next to each review that they are doing. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Flowchart===&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
Since this is a new Feature, Rspec test cases will be added for all the new methods introduced in the MailHelper class method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general repeatable solution to a commonly occurring problem in software design. It is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
We will be implementing the decorator design pattern in our code. The decorator pattern is used to add/extend existing functionality without modifying the existing code. Our code is also going to follow the open-closed principle.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ashritha Bommagani  (abommag@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Abhishek  (aaupadhy@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2224:_Refactor_review_mapping_controller&amp;diff=143787</id>
		<title>CSC/ECE 517 Spring 2022 - E2224: Refactor review mapping controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2224:_Refactor_review_mapping_controller&amp;diff=143787"/>
		<updated>2022-03-28T02:40:53Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* review_mapping_controller_spec.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2224 OSS assignment for Spring 2022, CSC/ECE 517.&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project which is developed and maintained by NCSU faculty and students. It is based on Ruby on Rails framework and has many features supporting instructor-student activities. Instructors can create assignments and review student's work. Students can form groups, submit assignments and review peer's work.&lt;br /&gt;
&lt;br /&gt;
== Description of the project ==&lt;br /&gt;
The project aims to refactor a controller - review_mapping_controller. It is a long and a complex file and most of the methods do not include comments. The goal is to better re-structure it without modifying its original functionality and improving readability by using meaningful variable names and adding more comments.  &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/2303 Link to the Pull Request Submitted] &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://152.7.98.87:8080/ Link to the deployed project] &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/SriPallaviDamuluri/expertiza Link to the Repository] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functionality of review_mapping_controller ==&lt;br /&gt;
The functionality of review_mapping_controller is to provide mapping for reviewer and assignment. Basically, the controller handles assignment of reviews to different teams or single student user, such as the event of peer review and self review. Also, this controller is responsible to respond student user request for extra bonus reviews based on assignment policy.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The  review_mapping_controller is a long and complex file. Most of the methods are sparsely commented on. Some methods are way too long to understand, please break them down into pieces for better understanding. Also, the few instances of code duplication that exist should also be removed.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
-Refactor the long methods in review_mapping_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
-Rename variable names such as student_review_num, submission_review_num, calibrated_artifacts_num, participants_hash to convey what they are actually used for&amp;lt;br/&amp;gt;&lt;br /&gt;
-Replace switch statements with subclasses methods &amp;lt;br/&amp;gt;&lt;br /&gt;
-Create models for the subclasses&amp;lt;br/&amp;gt;&lt;br /&gt;
-Remove hardcoded parameters&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We followed several design patterns while refactoring our code. One of the most common ones is the “Extract Method.” There were several instances where the method was too long and complex. We moved some of the functionality to a different method to make it more readable. This way, it became easier and clearer to understand what the method achieved. &lt;br /&gt;
Another issue we observed with the code was that it had too many conditional statements. We used the “Refactoring conditionals” design pattern, which aims to place the block of code in the conditional statement in a different method and call that method. This improves the readability of our code.&lt;br /&gt;
&lt;br /&gt;
== Files modified/created in the current project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller_spec.rb ===&lt;br /&gt;
&lt;br /&gt;
=== _calibration.html.erb ===&lt;br /&gt;
&lt;br /&gt;
== Details of the changes made==&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller.rb ===&lt;br /&gt;
 &lt;br /&gt;
This controller will map the submissions made by the teams to the students for facilitating peer-reviewing. The following methods which were originally long and complex were broken down into simpler methods. &lt;br /&gt;
We have added comments for every new method that was added and updated existing comments where ever required.&lt;br /&gt;
&lt;br /&gt;
(i) '''peer_review_strategy''': &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above method assigns reviews evenly among the participants for each team. It doesn't allow the participant to review his/her own work. Initially, this method was almost 80 lines long containing multiply nested if statements and it was a conglomeration of various functionalities required to achieve the strategy. It was broken down meaningfully into 4 different functions to handle different functionalities. The DRY principle is followed.&amp;lt;br/&amp;gt; &lt;br /&gt;
peer_review_strategy() is divided into even_out_reviews_among_teams(), modify_selected_participants_to_review(), remove_students_with_enough_reviews(), get_random_participant_index() as the core functionality blocks.&amp;lt;br/&amp;gt; &lt;br /&gt;
[[File: Peer review 1.png|700px]]&lt;br /&gt;
[[File: Even out reviews.png|700px]]&lt;br /&gt;
[[File: Other methods.png|700px]]&lt;br /&gt;
&lt;br /&gt;
:'''even_out_reviews_among_teams''' - This method is used to even out the # of reviews among teams for the specified assignment ID&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''modify_selected_participants_to_review''' - This method is used to update the selected participants corresponding to a team to review&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''remove_students_with_enough_reviews''' - This method is used to remove students who have already been assigned enough num of reviews out of participants array&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''get_random_participant_index''' - This method is used to get random index to select a random participant for assigning a review&amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
(ii) '''assign_reviewer_dynamically''': &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Assign rev dynamically1.png|700px]]&lt;br /&gt;
[[File: Assign rev dynamically2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
The above method is used to assign submissions of students for peer reviews. It also makes sure that a reviewer can do only a certain number of reviews based on the assignment policy. We broke this method down by adding the assign_on_topic_availability method, which makes assignments based on the availability of the topic. It makes an assignment for both the cases where the topic is available and the topic is not available. &lt;br /&gt;
&lt;br /&gt;
(iii) '''automatic_review_mapping''':  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above method was also long and contained multiples tasks that can be separated into different methods. We have introduced the following methods: &amp;lt;br/&amp;gt;&lt;br /&gt;
:'''create_team''' -  creates teams for individual assignments&lt;br /&gt;
[[File: Create team.png|700px]]&lt;br /&gt;
&lt;br /&gt;
:'''mapping_strategy_without_artifacts'''- checks for pre-conditions when there are no artifacts and applies review strategy method&lt;br /&gt;
[[File: Mapping strategy without artifacts.png|700px]]&lt;br /&gt;
&lt;br /&gt;
:'''mapping_strategy_on_artifacts'''- applies review mapping strategy based on calibrated and un-calibrated artifacts&lt;br /&gt;
[[File: Mapping strategy on artifacts.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(iv) '''add_reviewer''' : &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Add reviewer.png|700px]]&lt;br /&gt;
[[File: Add reviewer to another team.png|700px]]&lt;br /&gt;
&lt;br /&gt;
The above method adds a reviewer to a student's work. Initially, the method checks whether the student is being assigned to review the work of his/her teammates and displays an error. If not, the student is assigned to review the work of students from a different team. The logic which handles the assignment of work from another team is moved to a separate method named as ''''add_reviewer_to_another_team''''. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(v) '''add_instructor_to_do_standard_peer_review''' : &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Add instructor to do standard peer review.png|700px]]&lt;br /&gt;
&lt;br /&gt;
The above method name was changed to add_instructor_to_do_standard_peer_review from add_calibration. The method add_instructor_to_do_standard_peer_review gets called when the instructor of this assignment wants to do the expert peer-review. It checks if a participant is an instructor of this assignment in corresponding views and in this function it checks with certain user_id exists in the AssignmentParticipant map. If it's not able to find it, it'll create one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We found that the functionality of both the delete_metareview method and delete_metareviewer method were of the same and hence we have removed the delete_metareview method to avoid code duplication.&lt;br /&gt;
&lt;br /&gt;
We have modified variable names throughout all the methods to make them more readable.&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller_spec.rb ===&lt;br /&gt;
&lt;br /&gt;
Updated following params variable names for better readability: &amp;lt;br/&amp;gt;&lt;br /&gt;
'''max_team_size''' &lt;br /&gt;
'''num_reviews_per_student''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_reviews_per_submission''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_calibrated_artifacts''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_uncalibrated_artifacts''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Rspec2png.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
==== Manual UI Testing ====&lt;br /&gt;
&lt;br /&gt;
According to the introduction, the modification of this project is about review_mapping_controller.rb. The main job of this controller is to correctly assign the review to each student who is requesting them for a certain assignment. Unfortunately, the deployed project database is not complete, and student accounts cannot be created. Therefore, we cannot use the deployed project to give a complete UI test plan. &lt;br /&gt;
&lt;br /&gt;
In fact, due to system reasons, the internal logic of these controllers cannot be tested using UI tests because they are work flow and logic that have nothing to do with the UI. (The work flow can be found here [https://expertiza.csc.ncsu.edu/index.php/Review_mappings]) So we will re-introduce and emphasis the tests in Rspec unit test section to explain why the project is still complete after modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Rspec Unit Tests ====&lt;br /&gt;
&lt;br /&gt;
As such no functionality changed in any function, only refactoring done. All the refactoring was carefully verified by running rspec tests. To run the spec file, run:&lt;br /&gt;
rspec spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Refactoring changes did not break any functionality. All the existing test cases passed successfully.&lt;br /&gt;
Adding new testcases is not in the scope of this project since its a refactoring project.&lt;br /&gt;
&lt;br /&gt;
[[File:Rspec-rmc.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Capybara Integration and Functional Tests === &lt;br /&gt;
&lt;br /&gt;
Our project passed the Travis CI build test.&lt;br /&gt;
&lt;br /&gt;
[[File:Travis-rmc.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Naman Shrimali (nshrima@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sravanth Reddy Bommana (sbomman@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Rspec2png.png&amp;diff=143786</id>
		<title>File:Rspec2png.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Rspec2png.png&amp;diff=143786"/>
		<updated>2022-03-28T02:38:20Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2224:_Refactor_review_mapping_controller&amp;diff=143783</id>
		<title>CSC/ECE 517 Spring 2022 - E2224: Refactor review mapping controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2224:_Refactor_review_mapping_controller&amp;diff=143783"/>
		<updated>2022-03-28T02:34:13Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2224 OSS assignment for Spring 2022, CSC/ECE 517.&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project which is developed and maintained by NCSU faculty and students. It is based on Ruby on Rails framework and has many features supporting instructor-student activities. Instructors can create assignments and review student's work. Students can form groups, submit assignments and review peer's work.&lt;br /&gt;
&lt;br /&gt;
== Description of the project ==&lt;br /&gt;
The project aims to refactor a controller - review_mapping_controller. It is a long and a complex file and most of the methods do not include comments. The goal is to better re-structure it without modifying its original functionality and improving readability by using meaningful variable names and adding more comments.  &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/2303 Link to the Pull Request Submitted] &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://152.7.98.87:8080/ Link to the deployed project] &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/SriPallaviDamuluri/expertiza Link to the Repository] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functionality of review_mapping_controller ==&lt;br /&gt;
The functionality of review_mapping_controller is to provide mapping for reviewer and assignment. Basically, the controller handles assignment of reviews to different teams or single student user, such as the event of peer review and self review. Also, this controller is responsible to respond student user request for extra bonus reviews based on assignment policy.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The  review_mapping_controller is a long and complex file. Most of the methods are sparsely commented on. Some methods are way too long to understand, please break them down into pieces for better understanding. Also, the few instances of code duplication that exist should also be removed.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
-Refactor the long methods in review_mapping_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
-Rename variable names such as student_review_num, submission_review_num, calibrated_artifacts_num, participants_hash to convey what they are actually used for&amp;lt;br/&amp;gt;&lt;br /&gt;
-Replace switch statements with subclasses methods &amp;lt;br/&amp;gt;&lt;br /&gt;
-Create models for the subclasses&amp;lt;br/&amp;gt;&lt;br /&gt;
-Remove hardcoded parameters&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We followed several design patterns while refactoring our code. One of the most common ones is the “Extract Method.” There were several instances where the method was too long and complex. We moved some of the functionality to a different method to make it more readable. This way, it became easier and clearer to understand what the method achieved. &lt;br /&gt;
Another issue we observed with the code was that it had too many conditional statements. We used the “Refactoring conditionals” design pattern, which aims to place the block of code in the conditional statement in a different method and call that method. This improves the readability of our code.&lt;br /&gt;
&lt;br /&gt;
== Files modified/created in the current project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller_spec.rb ===&lt;br /&gt;
&lt;br /&gt;
=== _calibration.html.erb ===&lt;br /&gt;
&lt;br /&gt;
== Details of the changes made==&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller.rb ===&lt;br /&gt;
 &lt;br /&gt;
This controller will map the submissions made by the teams to the students for facilitating peer-reviewing. The following methods which were originally long and complex were broken down into simpler methods. &lt;br /&gt;
We have added comments for every new method that was added and updated existing comments where ever required.&lt;br /&gt;
&lt;br /&gt;
(i) '''peer_review_strategy''': &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above method assigns reviews evenly among the participants for each team. It doesn't allow the participant to review his/her own work. Initially, this method was almost 80 lines long containing multiply nested if statements and it was a conglomeration of various functionalities required to achieve the strategy. It was broken down meaningfully into 4 different functions to handle different functionalities. The DRY principle is followed.&amp;lt;br/&amp;gt; &lt;br /&gt;
peer_review_strategy() is divided into even_out_reviews_among_teams(), modify_selected_participants_to_review(), remove_students_with_enough_reviews(), get_random_participant_index() as the core functionality blocks.&amp;lt;br/&amp;gt; &lt;br /&gt;
[[File: Peer review 1.png|700px]]&lt;br /&gt;
[[File: Even out reviews.png|700px]]&lt;br /&gt;
[[File: Other methods.png|700px]]&lt;br /&gt;
&lt;br /&gt;
:'''even_out_reviews_among_teams''' - This method is used to even out the # of reviews among teams for the specified assignment ID&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''modify_selected_participants_to_review''' - This method is used to update the selected participants corresponding to a team to review&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''remove_students_with_enough_reviews''' - This method is used to remove students who have already been assigned enough num of reviews out of participants array&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''get_random_participant_index''' - This method is used to get random index to select a random participant for assigning a review&amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
(ii) '''assign_reviewer_dynamically''': &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Assign rev dynamically1.png|700px]]&lt;br /&gt;
[[File: Assign rev dynamically2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
The above method is used to assign submissions of students for peer reviews. It also makes sure that a reviewer can do only a certain number of reviews based on the assignment policy. We broke this method down by adding the assign_on_topic_availability method, which makes assignments based on the availability of the topic. It makes an assignment for both the cases where the topic is available and the topic is not available. &lt;br /&gt;
&lt;br /&gt;
(iii) '''automatic_review_mapping''':  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above method was also long and contained multiples tasks that can be separated into different methods. We have introduced the following methods: &amp;lt;br/&amp;gt;&lt;br /&gt;
:'''create_team''' -  creates teams for individual assignments&lt;br /&gt;
[[File: Create team.png|700px]]&lt;br /&gt;
&lt;br /&gt;
:'''mapping_strategy_without_artifacts'''- checks for pre-conditions when there are no artifacts and applies review strategy method&lt;br /&gt;
[[File: Mapping strategy without artifacts.png|700px]]&lt;br /&gt;
&lt;br /&gt;
:'''mapping_strategy_on_artifacts'''- applies review mapping strategy based on calibrated and un-calibrated artifacts&lt;br /&gt;
[[File: Mapping strategy on artifacts.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(iv) '''add_reviewer''' : &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Add reviewer.png|700px]]&lt;br /&gt;
[[File: Add reviewer to another team.png|700px]]&lt;br /&gt;
&lt;br /&gt;
The above method adds a reviewer to a student's work. Initially, the method checks whether the student is being assigned to review the work of his/her teammates and displays an error. If not, the student is assigned to review the work of students from a different team. The logic which handles the assignment of work from another team is moved to a separate method named as ''''add_reviewer_to_another_team''''. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(v) '''add_instructor_to_do_standard_peer_review''' : &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Add instructor to do standard peer review.png|700px]]&lt;br /&gt;
&lt;br /&gt;
The above method name was changed to add_instructor_to_do_standard_peer_review from add_calibration. The method add_instructor_to_do_standard_peer_review gets called when the instructor of this assignment wants to do the expert peer-review. It checks if a participant is an instructor of this assignment in corresponding views and in this function it checks with certain user_id exists in the AssignmentParticipant map. If it's not able to find it, it'll create one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We found that the functionality of both the delete_metareview method and delete_metareviewer method were of the same and hence we have removed the delete_metareview method to avoid code duplication.&lt;br /&gt;
&lt;br /&gt;
We have modified variable names throughout all the methods to make them more readable.&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller_spec.rb ===&lt;br /&gt;
&lt;br /&gt;
Updated following params variable names for better readability: &amp;lt;br/&amp;gt;&lt;br /&gt;
'''max_team_size''' &lt;br /&gt;
'''num_reviews_per_student''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_reviews_per_submission''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_calibrated_artifacts''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_uncalibrated_artifacts''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
==== Manual UI Testing ====&lt;br /&gt;
&lt;br /&gt;
According to the introduction, the modification of this project is about review_mapping_controller.rb. The main job of this controller is to correctly assign the review to each student who is requesting them for a certain assignment. Unfortunately, the deployed project database is not complete, and student accounts cannot be created. Therefore, we cannot use the deployed project to give a complete UI test plan. &lt;br /&gt;
&lt;br /&gt;
In fact, due to system reasons, the internal logic of these controllers cannot be tested using UI tests because they are work flow and logic that have nothing to do with the UI. (The work flow can be found here [https://expertiza.csc.ncsu.edu/index.php/Review_mappings]) So we will re-introduce and emphasis the tests in Rspec unit test section to explain why the project is still complete after modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Rspec Unit Tests ====&lt;br /&gt;
&lt;br /&gt;
As such no functionality changed in any function, only refactoring done. All the refactoring was carefully verified by running rspec tests. To run the spec file, run:&lt;br /&gt;
rspec spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Refactoring changes did not break any functionality. All the existing test cases passed successfully.&lt;br /&gt;
Adding new testcases is not in the scope of this project since its a refactoring project.&lt;br /&gt;
&lt;br /&gt;
[[File:Rspec-rmc.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Capybara Integration and Functional Tests === &lt;br /&gt;
&lt;br /&gt;
Our project passed the Travis CI build test.&lt;br /&gt;
&lt;br /&gt;
[[File:Travis-rmc.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Naman Shrimali (nshrima@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sravanth Reddy Bommana (sbomman@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2224:_Refactor_review_mapping_controller&amp;diff=143782</id>
		<title>CSC/ECE 517 Spring 2022 - E2224: Refactor review mapping controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2224:_Refactor_review_mapping_controller&amp;diff=143782"/>
		<updated>2022-03-28T02:31:54Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2224 OSS assignment for Spring 2022, CSC/ECE 517.&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project which is developed and maintained by NCSU faculty and students. It is based on Ruby on Rails framework and has many features supporting instructor-student activities. Instructors can create assignments and review student's work. Students can form groups, submit assignments and review peer's work.&lt;br /&gt;
&lt;br /&gt;
== Description of the project ==&lt;br /&gt;
The project aims to refactor a controller - review_mapping_controller. It is a long and a complex file and most of the methods do not include comments. The goal is to better re-structure it without modifying its original functionality and improving readability by using meaningful variable names and adding more comments.  &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/2303 Link to the Pull Request Submitted] &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://152.7.98.87:8080/ Link to the deployed project] &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/SriPallaviDamuluri/expertiza Link to the Repository] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functionality of review_mapping_controller ==&lt;br /&gt;
The functionality of review_mapping_controller is to provide mapping for reviewer and assignment. Basically, the controller handles assignment of reviews to different teams or single student user, such as the event of peer review and self review. Also, this controller is responsible to respond student user request for extra bonus reviews based on assignment policy.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The  review_mapping_controller is a long and complex file. Most of the methods are sparsely commented on. Some methods are way too long to understand, please break them down into pieces for better understanding. Also, the few instances of code duplication that exist should also be removed.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
-Refactor the long methods in review_mapping_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
-Rename variable names such as student_review_num, submission_review_num, calibrated_artifacts_num, participants_hash to convey what they are actually used for&amp;lt;br/&amp;gt;&lt;br /&gt;
-Replace switch statements with subclasses methods &amp;lt;br/&amp;gt;&lt;br /&gt;
-Create models for the subclasses&amp;lt;br/&amp;gt;&lt;br /&gt;
-Remove hardcoded parameters&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We followed several design patterns while refactoring our code. One of the most common ones is the “Extract Method.” There were several instances where the method was too long and complex. We moved some of the functionality to a different method to make it more readable. This way, it became easier and clearer to understand what the method achieved. &lt;br /&gt;
Another issue we observed with the code was that it had too many conditional statements. We used the “Refactoring conditionals” design pattern, which aims to place the block of code in the conditional statement in a different method and call that method. This improves the readability of our code.&lt;br /&gt;
&lt;br /&gt;
== Files modified/created in the current project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller_spec.rb ===&lt;br /&gt;
&lt;br /&gt;
=== _calibration.html.erb ===&lt;br /&gt;
&lt;br /&gt;
== Details of the changes made==&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller.rb ===&lt;br /&gt;
 &lt;br /&gt;
This controller will map the submissions made by the teams to the students for facilitating peer-reviewing. The following methods which were originally long and complex were broken down into simpler methods. &lt;br /&gt;
We have added comments for every new method that was added and updated existing comments where ever required.&lt;br /&gt;
&lt;br /&gt;
(i) '''peer_review_strategy''': &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above method assigns reviews evenly among the participants for each team. It doesn't allow the participant to review his/her own work. Initially, this method was almost 80 lines long containing multiply nested if statements and it was a conglomeration of various functionalities required to achieve the strategy. It was broken down meaningfully into 4 different functions to handle different functionalities. The DRY principle is followed.&amp;lt;br/&amp;gt; &lt;br /&gt;
peer_review_strategy() is divided into even_out_reviews_among_teams(), modify_selected_participants_to_review(), remove_students_with_enough_reviews(), get_random_participant_index() as the core functionality blocks.&amp;lt;br/&amp;gt; &lt;br /&gt;
[[File: Peer review 1.png|500px]]&lt;br /&gt;
[[File: Even out reviews.png|500px]]&lt;br /&gt;
[[File: Other methods.png|500px]]&lt;br /&gt;
&lt;br /&gt;
:'''even_out_reviews_among_teams''' - This method is used to even out the # of reviews among teams for the specified assignment ID&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''modify_selected_participants_to_review''' - This method is used to update the selected participants corresponding to a team to review&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''remove_students_with_enough_reviews''' - This method is used to remove students who have already been assigned enough num of reviews out of participants array&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''get_random_participant_index''' - This method is used to get random index to select a random participant for assigning a review&amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
(ii) '''assign_reviewer_dynamically''': &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Assign rev dynamically1.png|500px]]&lt;br /&gt;
[[File: Assign rev dynamically2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
The above method is used to assign submissions of students for peer reviews. It also makes sure that a reviewer can do only a certain number of reviews based on the assignment policy. We broke this method down by adding the assign_on_topic_availability method, which makes assignments based on the availability of the topic. It makes an assignment for both the cases where the topic is available and the topic is not available. &lt;br /&gt;
&lt;br /&gt;
(iii) '''automatic_review_mapping''':  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above method was also long and contained multiples tasks that can be separated into different methods. We have introduced the following methods: &amp;lt;br/&amp;gt;&lt;br /&gt;
:'''create_team''' -  creates teams for individual assignments&lt;br /&gt;
[[File: Create team.png|500px]]&lt;br /&gt;
&lt;br /&gt;
:'''mapping_strategy_without_artifacts'''- checks for pre-conditions when there are no artifacts and applies review strategy method&lt;br /&gt;
[[File: Mapping strategy without artifacts.png]]&lt;br /&gt;
&lt;br /&gt;
:'''mapping_strategy_on_artifacts'''- applies review mapping strategy based on calibrated and un-calibrated artifacts&lt;br /&gt;
[[File: Mapping strategy on artifacts.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(iv) '''add_reviewer''' : &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Add reviewer.png|500px]]&lt;br /&gt;
[[File: Add reviewer to another team.png|500px]]&lt;br /&gt;
&lt;br /&gt;
The above method adds a reviewer to a student's work. Initially, the method checks whether the student is being assigned to review the work of his/her teammates and displays an error. If not, the student is assigned to review the work of students from a different team. The logic which handles the assignment of work from another team is moved to a separate method named as ''''add_reviewer_to_another_team''''. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(v) '''add_instructor_to_do_standard_peer_review''' : &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Add instructor to do standard peer review.png|500px]]&lt;br /&gt;
&lt;br /&gt;
The above method name was changed to add_instructor_to_do_standard_peer_review from add_calibration. The method add_instructor_to_do_standard_peer_review gets called when the instructor of this assignment wants to do the expert peer-review. It checks if a participant is an instructor of this assignment in corresponding views and in this function it checks with certain user_id exists in the AssignmentParticipant map. If it's not able to find it, it'll create one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We found that the functionality of both the delete_metareview method and delete_metareviewer method were of the same and hence we have removed the delete_metareview method to avoid code duplication.&lt;br /&gt;
&lt;br /&gt;
We have modified variable names throughout all the methods to make them more readable.&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller_spec.rb ===&lt;br /&gt;
&lt;br /&gt;
Updated following params variable names for better readability: &amp;lt;br/&amp;gt;&lt;br /&gt;
'''max_team_size''' &lt;br /&gt;
'''num_reviews_per_student''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_reviews_per_submission''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_calibrated_artifacts''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_uncalibrated_artifacts''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
==== Manual UI Testing ====&lt;br /&gt;
&lt;br /&gt;
According to the introduction, the modification of this project is about review_mapping_controller.rb. The main job of this controller is to correctly assign the review to each student who is requesting them for a certain assignment. Unfortunately, the deployed project database is not complete, and student accounts cannot be created. Therefore, we cannot use the deployed project to give a complete UI test plan. &lt;br /&gt;
&lt;br /&gt;
In fact, due to system reasons, the internal logic of these controllers cannot be tested using UI tests because they are work flow and logic that have nothing to do with the UI. (The work flow can be found here [https://expertiza.csc.ncsu.edu/index.php/Review_mappings]) So we will re-introduce and emphasis the tests in Rspec unit test section to explain why the project is still complete after modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Rspec Unit Tests ====&lt;br /&gt;
&lt;br /&gt;
As such no functionality changed in any function, only refactoring done. All the refactoring was carefully verified by running rspec tests. To run the spec file, run:&lt;br /&gt;
rspec spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Refactoring changes did not break any functionality. All the existing test cases passed successfully.&lt;br /&gt;
Adding new testcases is not in the scope of this project since its a refactoring project.&lt;br /&gt;
&lt;br /&gt;
[[File:Rspec-rmc.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Capybara Integration and Functional Tests === &lt;br /&gt;
&lt;br /&gt;
Our project passed the Travis CI build test.&lt;br /&gt;
&lt;br /&gt;
[[File:Travis-rmc.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Naman Shrimali (nshrima@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sravanth Reddy Bommana (sbomman@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2224:_Refactor_review_mapping_controller&amp;diff=143779</id>
		<title>CSC/ECE 517 Spring 2022 - E2224: Refactor review mapping controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2224:_Refactor_review_mapping_controller&amp;diff=143779"/>
		<updated>2022-03-28T02:29:44Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: /* review_mapping_controller.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2224 OSS assignment for Spring 2022, CSC/ECE 517.&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project which is developed and maintained by NCSU faculty and students. It is based on Ruby on Rails framework and has many features supporting instructor-student activities. Instructors can create assignments and review student's work. Students can form groups, submit assignments and review peer's work.&lt;br /&gt;
&lt;br /&gt;
== Description of the project ==&lt;br /&gt;
The project aims to refactor a controller - review_mapping_controller. It is a long and a complex file and most of the methods do not include comments. The goal is to better re-structure it without modifying its original functionality and improving readability by using meaningful variable names and adding more comments.  &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/2303 Link to the Pull Request Submitted] &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://152.7.98.87:8080/ Link to the deployed project] &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/SriPallaviDamuluri/expertiza Link to the Repository] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functionality of review_mapping_controller ==&lt;br /&gt;
The functionality of review_mapping_controller is to provide mapping for reviewer and assignment. Basically, the controller handles assignment of reviews to different teams or single student user, such as the event of peer review and self review. Also, this controller is responsible to respond student user request for extra bonus reviews based on assignment policy.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The  review_mapping_controller is a long and complex file. Most of the methods are sparsely commented on. Some methods are way too long to understand, please break them down into pieces for better understanding. Also, the few instances of code duplication that exist should also be removed.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
-Refactor the long methods in review_mapping_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
-Rename variable names such as student_review_num, submission_review_num, calibrated_artifacts_num, participants_hash to convey what they are actually used for&amp;lt;br/&amp;gt;&lt;br /&gt;
-Replace switch statements with subclasses methods &amp;lt;br/&amp;gt;&lt;br /&gt;
-Create models for the subclasses&amp;lt;br/&amp;gt;&lt;br /&gt;
-Remove hardcoded parameters&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We followed several design patterns while refactoring our code. One of the most common ones is the “Extract Method.” There were several instances where the method was too long and complex. We moved some of the functionality to a different method to make it more readable. This way, it became easier and clearer to understand what the method achieved. &lt;br /&gt;
Another issue we observed with the code was that it had too many conditional statements. We used the “Refactoring conditionals” design pattern, which aims to place the block of code in the conditional statement in a different method and call that method. This improves the readability of our code.&lt;br /&gt;
&lt;br /&gt;
== Files modified/created in the current project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller.rb ===&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller_spec.rb ===&lt;br /&gt;
&lt;br /&gt;
=== _calibration.html.erb ===&lt;br /&gt;
&lt;br /&gt;
== Details of the changes made==&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller.rb ===&lt;br /&gt;
 &lt;br /&gt;
This controller will map the submissions made by the teams to the students for facilitating peer-reviewing. The following methods which were originally long and complex were broken down into simpler methods. &lt;br /&gt;
We have added comments for every new method that was added and updated existing comments where ever required.&lt;br /&gt;
&lt;br /&gt;
(i) '''peer_review_strategy''': &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above method assigns reviews evenly among the participants for each team. It doesn't allow the participant to review his/her own work. Initially, this method was almost 80 lines long containing multiply nested if statements and it was a conglomeration of various functionalities required to achieve the strategy. It was broken down meaningfully into 4 different functions to handle different functionalities. The DRY principle is followed.&amp;lt;br/&amp;gt; &lt;br /&gt;
peer_review_strategy() is divided into even_out_reviews_among_teams(), modify_selected_participants_to_review(), remove_students_with_enough_reviews(), get_random_participant_index() as the core functionality blocks.&amp;lt;br/&amp;gt; &lt;br /&gt;
[[File: Peer review 1.png]]&lt;br /&gt;
[[File: Even out reviews.png]]&lt;br /&gt;
[[File: Other methods.png]]&lt;br /&gt;
&lt;br /&gt;
:'''even_out_reviews_among_teams''' - This method is used to even out the # of reviews among teams for the specified assignment ID&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''modify_selected_participants_to_review''' - This method is used to update the selected participants corresponding to a team to review&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''remove_students_with_enough_reviews''' - This method is used to remove students who have already been assigned enough num of reviews out of participants array&amp;lt;br/&amp;gt; &lt;br /&gt;
:'''get_random_participant_index''' - This method is used to get random index to select a random participant for assigning a review&amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
(ii) '''assign_reviewer_dynamically''': &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Assign rev dynamically1.png]]&lt;br /&gt;
[[File: Assign rev dynamically2.png]]&lt;br /&gt;
&lt;br /&gt;
The above method is used to assign submissions of students for peer reviews. It also makes sure that a reviewer can do only a certain number of reviews based on the assignment policy. We broke this method down by adding the assign_on_topic_availability method, which makes assignments based on the availability of the topic. It makes an assignment for both the cases where the topic is available and the topic is not available. &lt;br /&gt;
&lt;br /&gt;
(iii) '''automatic_review_mapping''':  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above method was also long and contained multiples tasks that can be separated into different methods. We have introduced the following methods: &amp;lt;br/&amp;gt;&lt;br /&gt;
:'''create_team''' -  creates teams for individual assignments&lt;br /&gt;
[[File: Create team.png]]&lt;br /&gt;
&lt;br /&gt;
:'''mapping_strategy_without_artifacts'''- checks for pre-conditions when there are no artifacts and applies review strategy method&lt;br /&gt;
[[File: Mapping strategy without artifacts.png]]&lt;br /&gt;
&lt;br /&gt;
:'''mapping_strategy_on_artifacts'''- applies review mapping strategy based on calibrated and un-calibrated artifacts&lt;br /&gt;
[[File: Mapping strategy on artifacts.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(iv) '''add_reviewer''' : &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Add reviewer.png]]&lt;br /&gt;
[[File: Add reviewer to another team.png ]]&lt;br /&gt;
&lt;br /&gt;
The above method adds a reviewer to a student's work. Initially, the method checks whether the student is being assigned to review the work of his/her teammates and displays an error. If not, the student is assigned to review the work of students from a different team. The logic which handles the assignment of work from another team is moved to a separate method named as ''''add_reviewer_to_another_team''''. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(v) '''add_instructor_to_do_standard_peer_review''' : &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File: Add instructor to do standard peer review.png]]&lt;br /&gt;
&lt;br /&gt;
The above method name was changed to add_instructor_to_do_standard_peer_review from add_calibration. The method add_instructor_to_do_standard_peer_review gets called when the instructor of this assignment wants to do the expert peer-review. It checks if a participant is an instructor of this assignment in corresponding views and in this function it checks with certain user_id exists in the AssignmentParticipant map. If it's not able to find it, it'll create one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We found that the functionality of both the delete_metareview method and delete_metareviewer method were of the same and hence we have removed the delete_metareview method to avoid code duplication.&lt;br /&gt;
&lt;br /&gt;
We have modified variable names throughout all the methods to make them more readable.&lt;br /&gt;
&lt;br /&gt;
=== review_mapping_controller_spec.rb ===&lt;br /&gt;
&lt;br /&gt;
Updated following params variable names for better readability: &amp;lt;br/&amp;gt;&lt;br /&gt;
'''max_team_size''' &lt;br /&gt;
'''num_reviews_per_student''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_reviews_per_submission''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_calibrated_artifacts''' &amp;lt;br/&amp;gt; &lt;br /&gt;
'''num_uncalibrated_artifacts''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
==== Manual UI Testing ====&lt;br /&gt;
&lt;br /&gt;
According to the introduction, the modification of this project is about review_mapping_controller.rb. The main job of this controller is to correctly assign the review to each student who is requesting them for a certain assignment. Unfortunately, the deployed project database is not complete, and student accounts cannot be created. Therefore, we cannot use the deployed project to give a complete UI test plan. &lt;br /&gt;
&lt;br /&gt;
In fact, due to system reasons, the internal logic of these controllers cannot be tested using UI tests because they are work flow and logic that have nothing to do with the UI. (The work flow can be found here [https://expertiza.csc.ncsu.edu/index.php/Review_mappings]) So we will re-introduce and emphasis the tests in Rspec unit test section to explain why the project is still complete after modification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Rspec Unit Tests ====&lt;br /&gt;
&lt;br /&gt;
As such no functionality changed in any function, only refactoring done. All the refactoring was carefully verified by running rspec tests. To run the spec file, run:&lt;br /&gt;
rspec spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Refactoring changes did not break any functionality. All the existing test cases passed successfully.&lt;br /&gt;
Adding new testcases is not in the scope of this project since its a refactoring project.&lt;br /&gt;
&lt;br /&gt;
[[File:Rspec-rmc.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Capybara Integration and Functional Tests === &lt;br /&gt;
&lt;br /&gt;
Our project passed the Travis CI build test.&lt;br /&gt;
&lt;br /&gt;
[[File:Travis-rmc.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Naman Shrimali (nshrima@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Harini Bharata (hbharat@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sravanth Reddy Bommana (sbomman@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sri Pallavi Damuluri (sdamulu@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Peer_review_1.png&amp;diff=143771</id>
		<title>File:Peer review 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Peer_review_1.png&amp;diff=143771"/>
		<updated>2022-03-28T02:12:06Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Other_methods.png&amp;diff=143757</id>
		<title>File:Other methods.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Other_methods.png&amp;diff=143757"/>
		<updated>2022-03-28T01:54:55Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Mapping_strategy_without_artifacts.png&amp;diff=143755</id>
		<title>File:Mapping strategy without artifacts.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Mapping_strategy_without_artifacts.png&amp;diff=143755"/>
		<updated>2022-03-28T01:54:25Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Mapping_strategy_on_artifacts.png&amp;diff=143754</id>
		<title>File:Mapping strategy on artifacts.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Mapping_strategy_on_artifacts.png&amp;diff=143754"/>
		<updated>2022-03-28T01:53:58Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Even_out_reviews.png&amp;diff=143753</id>
		<title>File:Even out reviews.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Even_out_reviews.png&amp;diff=143753"/>
		<updated>2022-03-28T01:53:38Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Create_team.png&amp;diff=143752</id>
		<title>File:Create team.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Create_team.png&amp;diff=143752"/>
		<updated>2022-03-28T01:53:20Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Assign_rev_dynamically2.png&amp;diff=143751</id>
		<title>File:Assign rev dynamically2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Assign_rev_dynamically2.png&amp;diff=143751"/>
		<updated>2022-03-28T01:52:49Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Assign_rev_dynamically1.png&amp;diff=143749</id>
		<title>File:Assign rev dynamically1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Assign_rev_dynamically1.png&amp;diff=143749"/>
		<updated>2022-03-28T01:52:26Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_reviewer_to_another_team.png&amp;diff=143748</id>
		<title>File:Add reviewer to another team.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_reviewer_to_another_team.png&amp;diff=143748"/>
		<updated>2022-03-28T01:51:34Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_reviewer.png&amp;diff=143747</id>
		<title>File:Add reviewer.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_reviewer.png&amp;diff=143747"/>
		<updated>2022-03-28T01:51:13Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_instructor_to_do_standard_peer_review.png&amp;diff=143746</id>
		<title>File:Add instructor to do standard peer review.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_instructor_to_do_standard_peer_review.png&amp;diff=143746"/>
		<updated>2022-03-28T01:50:29Z</updated>

		<summary type="html">&lt;p&gt;Hbharat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hbharat</name></author>
	</entry>
</feed>