CSC/ECE 517 Fall 2017/E1780 OSS Project Teal Email Notification Enhancements

From Expertiza_Wiki
Jump to navigation Jump to search

This wiki page is for the description of changes made under E1780 OSS Project Teal Email Notification Enhancements.

About Expertiza

Expertiza is an open source project based on Ruby on Rails framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza also sends automated emails to the instructor, reviewers and participants for most of the above mentioned activities.

Problem Statement

The following tasks were accomplished in this project:

  • Instructor should get an option to create a participant if (s)he does not already exist in the system.
  • E-mails about reviews should direct the user to the page where the review is found.
  • Deadline reminders should include a link on where to go to perform the needed function.
  • Instructor notifications of where reviews disagree by more than a threshold # of points should point the instructor to the reviews that disagree.
  • Send out an email to the invitee when a participant sends out an invitation to another participant to join a team.
  • All activity on ad responses and invitations should be reported to the other party by e-mail.
  • Notify an instructor by e-mail when a student suggests a topic.
  • Instructor should get a copy of all emails sent to the student.

UML Diagram

The UML diagram shows the functionality that is being developed in the project.

  • Use Case1
  • Use Case Description: Create an Option to create a participant when he doesn't exist
  • Actor: Instructor
  • Precondition: Participant does not exist
  • Post Condition:Gets option to create participant
  • Use Case2
  • Use Case Description: Get an Email once a review is done with a link for the review page
  • Actor: Student
  • Precondition: Reviews a team
  • Post Condition:Reviewed team gets emails with review link. On clicking the link , it directs to the corresponding review page
  • Use Case3
  • Use Case Description: Get an Dead line reminder Email once a deadline to review is approaching
  • Actor: Student
  • Precondition: Reviews a team
  • Post Condition: Gets deadline reminder in email to review a team.Email has the link to the review page
  • Use Case4
  • Use Case Description: Gets email notifications for reviews contradicting by a particular threshold
  • Actor: Instructor
  • Precondition: Team reviews are done by at least 2 reviewers
  • Post Condition: Instructor gets email notifications for reviews contradicting by a particular threshold along with the links the contradicting reviews.
  • Use Case5
  • Use Case Description: Email should be sent to the invitee with the team -join request when join request is sent.
  • Actor: Student
  • Precondition: Invites another participant to join a team
  • Post Condition: Email sent to the invitee with the team -join request
  • Use Case6
  • Use Case Description: All activity Emails should be sent to student
  • Actor: Student
  • Precondition: Activity is done in expertiza by team members.
  • Post Condition: Student receives email on all activity on ad responses and invitations performed by other team members.
  • Use Case7
  • Use Case Description: Instructor receives an email for the suggestion request by student
  • Actor: Student
  • Precondition: Suggests a topic
  • Post Condition: Instructor receives an email for the suggestion request
  • Use Case8
  • Use Case Description: Instructor receives a copy of email for all the mails sent to student on assignment.
  • Actor: Instructor
  • Precondition: Activity done on assignment.
  • Post Condition: Gets a copy of all emails sent to the student regarding the activities done on assignment.

Peer Review Information

  • The CodeClimate build is failed for the files which are already present, and not for the changes made
  • For the changes to be tested use Instructor Login: username: instructor6 password: password
  • A self explanatory video has been uploaded for the same.
  • Design principles are not needed as we mostly modified existing work.
  • The Project Demo Video is present at : https://drive.google.com/open?id=0B4GJ154MimyPVGxqOWhZYk1mWFE

Files changed

Controllers

  • invitations_controller.rb
  • profile_controller.rb
  • suggestion_controller.rb
  • users_controller.rb

Helpers

  • mailer_helper.rb
  • login_helper.rb

Mailers

  • delayed_mailer.rb
  • mailer.rb

Models

  • response.rb
  • user.rb

Views

  • invite_message.html.erb
  • new_topic_suggested_message.html.erb
  • notify_grade_conflict_message.html.erb
  • _invitation_accepted_html.html.erb
  • _invitation_declined_html.html.erb
  • _invitation_pending_html.html.erb
  • _new_submission_html.html.erb
  • _submission_deadline_test_html.html.erb
  • _additional_links.html.erb
  • add.js.erb
  • _prefs.html.erb

Spec

  • factories.rb
  • user_spec.rb

Solutions Implemented

Providing option to instructor to create non-existent participant

A flash message was added when the instructor adds a non-existent user as a participant.A new link to redirect the instructor to the user creation page is also added.
Related code snippet

Link provided to redirect user to page where review is found

A new link was incorporated in the email to redirect the user to the corresponding review page.
Related code snippet

Incorporating a link for submission deadline reminder

Tests were done for already existing functionality as deadline reminders are not being sent as per the current functionality.
Related code snippet

Enhancing the email that the instructor receives for contradicting reviews

The email that the instructor receives for contradicting reviews was enhanced by adding the previous average score of the total reviews and the score of the new review. The readability of the email was also increased by adding bullet points wherever necessary.
Related code snippet





Sending email to the invitee to join a team

When a particular student invites another student(s) to join a team for a particular assignment, then the invitee(s) should receive an email for the same.
Related code snippet




All activities on ad responses and invitations should be reported to the other party by e-mail

Three new partials have been created to send emails to both inviter and invitee for the responses(accept, decline, pending) of invitations to join a team
Related code snippet




Emailing to the instructor when a student suggest a new topic

When a new topic is suggested by a student to the instructor , an email is sent to the instructor regarding the same for his decision to approve or decline.
Related code snippet


Instructor should receive copy of emails being sent to the student if (s)he wishes to

Instructor can choose to receive all the emails being sent to the students to understand proper functioning of the system.
Related code snippet
















Testing Details and TestPlan

Testing with UI(Manual Testing)

Requirement1

  • If someone attempts to assign a nonexistent user as a participant in an assignment by filling out the form on the Add Participants page, (s)he should be warned that the user does not exist. This is reasonable behaviour because the username may have been mistyped, and you wouldn't want to create a new user account due to a typo.
Testing Steps

Adding a non-existent user as a participant in an assignment

  • Login as an instructor.
  • Click on an existing active Assignment .
  • Click on Add Participants and add any non-existent user ( any email id ).
  • Result : It gives a flash message regarding user does not exist and gives you the link to create a new user.

Requirement2

  • E-mails about reviews should direct the user to the page where the review is found.
Testing Steps
  • Login as an instructor.
  • Click on an existing active assignment.
  • Add an existing user as a reviewer and another user as a participant to this assignment.
  • Login as the reviewer and submit your review.
  • Result: The participant must have received an email on this review submission with a link to the review submitted.

Requirement3

  • As there are no deadline reminders implement in expertiza currently , we were asked to verify the Rspec test cases which are already present in delayed_mailer_spec.rb for the same . We were asked to fix if any bugs were found in that. But no bugs were found.
Testing Steps
  • Run the Rspec test cases by following a command :

bundle exec rspec delayed_mailer_spec.rb

  • Result : See the attachment for the screenshot.

Requirement4

  • Instructor notifications of where reviews disagree by more than a threshold # of points should point the instructor to the reviews that disagree.
  • Put the links in the bulleted list that is easy to read.
  • The mail should have the previous average score as well as the new score that is being assigned.
  • Any other kind of improvement to increase the readability of the email is welcome
Testing Steps
  • Login as an instructor and create three students.
  • Hover over Manage Tab --> click on Assignments --> choose an existing active assignment-->Click on Add Participants section of that assignment.
  • Out of the three users that you have created, add two as reviewers and one as participant to that assignment.
  • Login as the participant and submit any link as your work .
  • After the submission deadline is over, login as each of the reviewers and submit two contradicting reviews of the same assignment. ( Say, one gives all 0s , another gives all 5s).
  • Result : This should send an email to the instructor with the below text.

Requirement5

  • Send out an email to the invitee when a participant sends out an invitation to another participant to join a team.
Testing Steps
  • Login as an instructor --> click on Assignments tab --> Select an existing active assignment .
  • Add one user as a participant , login as the participant and invite a student to join the team for the assignment.
  • Result: Email has been sent to invitee.

Requirement6

  • The student who issued the invitation should also be e-mailed when the invitee joins the team. And also when a student responds to a teammate advertisement. In general, all activity on ad responses and invitations should be reported to the other party by e-mail (unless these e-mails are turned off in a (new) profile field).
Testing Steps
  • Continue from Requirement 5.
  • Result : Both the inviter and the invitee should get an email as per the requirement specified above.

Requirement7

  • Notify an instructor by e-mail when a student suggests a topic.
Testing Steps
  • Login as an instructor--> Create a user with Student role
  • Login as a student--> Click on existing active Assignment .
  • Click on suggest a topic handle and suggest any topic and save it
  • Result : Instructor is notified when the topic is suggested.
  • Login as an instructor--> Create a user with Student role
  • Login as a student--> Click on existing active Assignment .
  • Click on suggest a topic handle and suggest any topic and save it
  • Result : Instructor is notified when the topic is suggested.

Requirement8

  • 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).
  • Modified Requirement : Implemented for one such scenario, can easily be replicated for others.
Testing Steps
  • Login as an existing instructor --> go to profile tab.
  • Do not tick the check box mentioning "get copy of all emails" now.
  • Go to Manage Users --> Create a student.
  • Result 1 (negative testing) : Instructor does not receive an email.
  • 1. Login as the instructor and go to the Profile tab.
  • 2. Tick the check box mentioning "get copy of all emails" now and Save.
  • 3. Perform an event. Here, "Create any other user (may be a Student , Reader ) and Save. While creating the user , please ensure you give an email id that you can access.
  • Result2(positive testing) : Both the created user and the instructor receives the email.
  • Note : The instructor only receives copy of all emails happening in the system, if the check box is checked. In this case, we have just implemented for one such scenario . This can easily be replicated for the others.

Automated Testing Scenario(RSpec)

The test cases for the complete functionality testing are covered.
There were existing test cases for the delayed_mailer.rb and the functionality is checked by running those test cases.The snapshot of running the Rspec for the deadline reminder details is given below.
Related snippet

Future Work

  1. Reviewer is receiving an email after a submission is revised.
    1. The above mentioned email should also contain the Review round after which the submission has been revised.
    2. The above mentioned email must contain a link that redirects the reviewer to the link where the review is found.
  2. Reviewer does not receive the above mentioned email if the last round of review has been completed.
  3. Deadline reminder emails should be implemented in the system for both submissions and reviews.
    1. A link should be provided in that email so that the user knows where to go to perform the needed action.
  4. Alternative Approach that can be implemented
    1. All the changes done in view files could be changed to helpers following the OOD coding standards.

References