E1831 OSS Project Teal Email Notifications Enhancements

From Expertiza_Wiki
Revision as of 21:56, 2 November 2018 by Atewari (talk | contribs)
Jump to navigation Jump to search

This wiki page is for the description of changes made under E1831 OSS assignment for Fall 2018, CSC 517.

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 supports submission across various document types, including the URLs and wiki pages.

What has been done previously

Students and instructors are notified of various events by e-mail, e.g., creation of a new account, submission of a review on their work, or updating of work that they have reviewed. This project is focused on adding new email functionalities.

Problem Statement

  • Issue #296: Send out an email to the invitee when a participant sends out an invitation to another participant to join a team. 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, the person who created the advertisement must be notified by email. In general, all activity on ad responses and invitations should be reported to the other party by email (unless these emails are turned off in a (new) profile field).
  • Notify an instructor by e-mail when a student suggests a topic.
  • Issue #87: Create an option (in the instructor’s profile) to get a copy of emails being sent to students.

Files modified under in this project

Controllers

Views

Mailers

Models

Database Migrations

Specs

Solutions Implemented

Sending mail to Instructor on creation of a new suggestion




As part of the email that is to be sent to the instructor, an important piece of information is the proposer. When a suggestion is made by a student, they can choose to make the suggestion in anonymous mode. The function set_proposer within suggestions controller determines whether the user has checked anonymous suggestion and then assigns the user_id to the proposer. In case, the student has chosen to make an anonymous suggestion, the proposer variable is set as the string “Anonymous”.



To send the email, a mail_instructor function was created. This function requires the suggestion title, proposer, and the email of the receiver.

  1. The proposer is set using the set_proposer function.
  2. The suggestion title is passed through @suggestion.
  3. The assignment to which this suggestion is being made references to the instructor who created the assignment through instructor_id.

This function then calls new_suggested_topic function in the mailer.rb file to send the mail with the information.



The mailer.rb file also gets a new function new_suggested_topic referenced above.



The last change made to suggestions controller is calling the mail_instructor method in the create suggestion method. If the assignment references an instructor, the mail method is called on any suggestion being saved. The ‘if’ condition here is put in for a test condition where an assignment is created through the factories and this assignment does not reference an instructor.



The final change is the addition of a new file which contains the content and formatting of the mail being sent to the instructor.

Option for instructor to create a participant which does not exist




The precondition here is that there is no participant and the instructor can add a non-existent participant. Further, a flash message is added when instructor adds a new participant. Instructor is forwarded to the user creation page by the corresponding link.



User should have the provision to review projects. For that, the user needs to access the review page. A link has been added just for this purpose. The link would take the user to the respective review page.



Link for submission deadline reminder User should get a deadline reminder in e-mail once a deadline to review is nearing. Once a user gets a deadline reminder e-mail, the user could review a team then. Email should have the link to review a team.

Modifications made to the email that the instructor receives for contradicting reviews


More functionalities added to the e-mail that the instructor receives for contradicting reviews. The average scores of the total reviews done previously and the score of the new review are included in this. It looks so much better with the bullet points included, thus increasing the readability.




response.rb




notify_grade_conflict_message.html.erb



E-mail to the invitee to join a team


Participants would require other participants to team up for a project. In such a case, a participant would invite another participant to join a team. Subsequently, an e-mail should be received to join the team. The e-mail should have the join request with it to join the group. It is important that the e-mail is received by the receiver when a participant student invites him.

File:Karan 7.jpg
invitations_controller.rb



File:Karan 8.jpg
mailer_helper.rb



Ad responses and invitations reported by e-mail


When a student responds to a teammate advertisement, the person who created the advertisement must be notified by email. Three new files have been created to send e-mails to both the inviter and the invitee, the three files being accept, decline and pending. These three would be the responses of the invitations to join the team.


_invitation_accepted_html.html.erb
_invitation_declined_html.html.erb
_invitation_pending_html.html.erb



Option for the instructor to get a copy of emails being sent to the student

Any activity done on the assignment by a student can be viewed by the instructor. The instructor can make suggestions to the students. An e-mail could be sent by the instructor to the students regarding the activities done on the assignment. Now, the instructor has the option to choose to get all the e-mails that have been sent to the participants (students).


profile_controller.rb




users_controller.rb




delayed_mailer.rb




mailer.rb




user.rb




_prefs.html.erb.rb