User:Rpothir: Difference between revisions
Line 40: | Line 40: | ||
'''Test plan:''' | '''Test plan:''' | ||
The mail should be sent to the instructor as soon as a new topic is suggested by the student. Since the process going here is a method call and mailer invocation, corresponding tests to check whether the | The mail should be sent to the instructor as soon as a new topic is suggested by the student. Since the process going here is a method call and mailer invocation, corresponding tests to check whether the emails are sent to instructor have been written in the RSpec. | ||
[[File:suggestion test.jpg]] | [[File:suggestion test.jpg]] | ||
Line 58: | Line 58: | ||
[[File:suggestion save.jpg]] | [[File:suggestion save.jpg]] | ||
The mailer function as shown below contains the to | The mailer function as shown below contains the to address which is the instructor's email address, the subject along with the topic name and body with the proposer's details. This function invokes the suggestion_topic function in the mailer which send the mail. | ||
[[File:suggestion mail call.jpg]] | [[File:suggestion mail call.jpg]] | ||
Line 145: | Line 145: | ||
'''Copy of emails to Instructor''' | '''Copy of emails to Instructor''' | ||
Proposal: In | Proposal: | ||
To creation an option to get a copy of ‘e-mails being sent to students so the instructor can verify correct functioning of the system. | |||
Changes: | |||
In regard with the proposal, we created an option in the instructor profile which allows the instructor to get all the emails that are being sent to the students. On consultation with the instructor, the instructor email was added as cc in the mails being sent. | |||
Inside the mailer, the option is checked and if satisfied, all the generic mails are also forwarded to the instructor. | |||
[[File:mailer.jpg]] |
Revision as of 20:42, 31 March 2017
This wiki page describes the work on the OSS project titled E1716-Improve email notifications for the course CSC/ECE 517, Spring 2017.
Expertiza
Expertiza is an online collaboration tool for the students and instructors. It is an open source project developed on Ruby on Rails platform. It has several features that help the users to contribute jointly by creating the list of users by importing CSV file, assigning work, share the work, giving reviews, forming teams and finally notifying every action using email notifications.
Motivation
Though expertiza is a great platform, there are quite a few enhancements in sending emails to users on the reviews, deadlines and accounts creations. So this contribution helps in learning to contribute to open source projects.
Description of the current project
The existing functionality implements the email notifications' feature in response to certain events. However, there are cases where email notifications are sent which are redundant as well as cases where email notifications need to be sent but are not sent. The current project aims at improving this email-notification functionality. For example, Expertiza uses a peer review system wherein, after the first round of submission, submitted work is peer reviewed. Using the recommendations made and the improvements suggested in the peer reviews, an assignment participant can then proceed to improve his work. Thus, a participant is notified via email whenever a review for his/her submitted work is provided. Similarly, a reviewer is notified via email when a new submission is made for the work that he/she reviewed. Now, if the participant makes an improvement in his/her submission after the last round of reviews has been done, sending an email to the reviewer regarding this is redundant. However, in the current state of application, a reviewer is notified in this case too. Thus, there are similar cases, where the email notification needs to be enabled/disabled and that is the objective of our project.
Peer Review Information
For users intending to view the deployed Expertiza associated with this assignment, the user login credentials are below: user_name: 'expertiza.development@gmail.com' password: 'qwer@1234'
The issues/tasks that needed modifications were identified:
1. Notify an instructor by e-mail when a student suggests a topic.
2. The email message telling reviewers to revise their reviews should not be sent after the last review deadline has passed.
3.Send out an email to the invitee when a participant sends out an invitation to another participant to join a team.
4. The student who issued the invitation should also be e-mailed when the invitee joins the team.
5. Create an option (in the instructor’s profile) to get a copy of ‘e-mails being sent to students (this is so the instructor can verify correct functioning of the system).
6.When students' accounts are created by importing a CSV file on the Users page, they receive e-mails with their user-ID and password. But if an account is created by adding them as participants to an assignment when they don't already have an account, e-mail is not sent. Students should receive e-mails upon account creation, regardless of how their account is created.
Test Plan and Development
Topic Suggestion
Test plan:
The mail should be sent to the instructor as soon as a new topic is suggested by the student. Since the process going here is a method call and mailer invocation, corresponding tests to check whether the emails are sent to instructor have been written in the RSpec.
Development:
Earlier Scenario:
Some of the assignments have an option to suggest a topic to the instructor. But when a student suggests a topic, this event is not notified to the instructor leaving it to go unnoticed and the student must mail the instructor regarding the suggestion.
Updates/Changes:
The suggestions controller is modified so that whenever a student suggests a topic, an email is sent to the professor. The changes made are shown below.
Updated the controllers/suggestion_controller.rb so that whenever a new suggestion is getting saved it must invoke the mailer function. This is also being done when the suggestion is getting accepted too.
The mailer function as shown below contains the to address which is the instructor's email address, the subject along with the topic name and body with the proposer's details. This function invokes the suggestion_topic function in the mailer which send the mail.
As mentioned above the function defined in the mailer send the mail in the following format to the instructor.
The mail format and view would be
Inviting a participant to join the team
Test Plan
The main features to test in this particular task is to make sure that the defined methods are getting called at right times with the right parameters. Also, it is required to test whether the mailer is invoked at right time thereby avoiding unnecessary emails. Here, both the controller and mailers are being tested. The RSpec tests for both the invitation and acceptance are mentioned below.
Development
Earlier Scenario:
Whenever a user invites another participant to join the team, he/she can just add them in expertiza and must wait until the participant logs into expertiza to see the invitation.
Changes/Updates:
We have included the mailer call whenever a user is inviting a participant so that an email is sent out stating that an invitation is pending.
Whenever a new invitation is created and set into waiting status, the email is call is made in controllers/invitation_controller.rb
The email call calls a function named 'accept_invitation' in the invitation controller where the appropriate fields required for the email are gathered and the mailer is called.
In the mailer, the 'accept_invitation' function is invoked where the to address is addressed to the participant who is being invited.
The format of the mail being set is customized in views/mailer/accept_invitation.html.erb as shown below.
Notification regarding the Accepted Invitation
Earlier scenario:
As mentioned earlier, whenever a participant accepts the team invitation the user who sent the invitation gets to know about the news only after logging into Expertiza which may take longer to form the team.
Changes/Updates:
So here, we have included a mailer so that whenever a participant accepts the team request, an email is sent to the user who invited him/her. This makes sure that the user who invited has been notified immediately after the team request has been accepted thereby avoiding delays in team formation.
Whenever a new invitation is accepted the status is confirmed and the email call is made in controllers/invitation_controller.rb
The email call calls a function named 'accepted_invitation' in the invitation controller where the appropriate fields required for the email are gathered and the mailer is called.
In the mailer, the 'accepted_invitation' function is invoked where the to address is addressed to the user who invited the participant to join the team in the first place.
The format of the mail being set is customized in views/mailer/accepted_invitation.html.erb as shown below.
Copy of emails to Instructor
Proposal:
To creation an option to get a copy of ‘e-mails being sent to students so the instructor can verify correct functioning of the system.
Changes:
In regard with the proposal, we created an option in the instructor profile which allows the instructor to get all the emails that are being sent to the students. On consultation with the instructor, the instructor email was added as cc in the mails being sent.
Inside the mailer, the option is checked and if satisfied, all the generic mails are also forwarded to the instructor.