E1831 OSS Project Teal Email Notifications Enhancements: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 47: Line 47:
== Solutions Implemented ==
== Solutions Implemented ==
==== Sending mail to Instructor on creation of a new suggestion ====
==== Sending mail to Instructor on creation of a new suggestion ====
[[File:Mail_instructor_on_new_suggestion_2.jpg]] <br><br>
[[File:Mail_instructor_on_new_suggestion_2.jpg]] <br><br>
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”.
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”.
<br><br>
[[File:Mail_instructor_on_new_suggestion_3.jpg]] <br><br>
To send the email, a mail_instructor function was created. This function requires the suggestion title, proposer, and the email of the receiver.
# The proposer is set using the set_proposer function.
# The suggestion title is passed through @suggestion.
# 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.
<br><br>

Revision as of 04:04, 2 November 2018

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.