User:Cbaruah

From Expertiza_Wiki
Jump to navigation Jump to search

CSC/ECE 517 Fall 2016 E1655/OSS Improve e-mail notification

Peer Review Information

For users intending to view the deployed Expertiza associated with this assignment, the credentials are as follows:

  • Instructor Login: Username: instructor6 , password: password
  • Student Login: Username: student5432 , password: password
  • Student Login: Username: testing11, password: password
  • Student Login: Username: testing12, password: password

Expertiza Background

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.

Mailers in Expertiza have their association with many other components like Users, Courses,Reviews,Participants and Invitations. The Mailer Helper in specific invokes methods which perform mailer related functions like sending mail to newly created user, sending mail to reviewer etc.

Motivation

This project in particular intends that the students collaborate with each other and work on making enhancements to the code base by applying the concepts of Rails,RSpec, DRY code,Test driven development etc. This provides an opportunity for students to contribute to an open source project and learn further about software deployment etc.

Currently, the mailer notifies the participants when a new user is created, to the reviewer when a submission of work is done. The scope of this project is to improve the present mail notifications and also plug gaps in some implementations.

Current Implementation

  • 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. So this functionality of account creation was fixed. No mail is triggered to the concerned user whenever their account is created regardless of how their account is created. The listed files were manipulated for updating this functionality
    1. controllers/import_file_controller.rb
    2. helpers/import_file_helper
  • Evidently if a file is revised after review, the system e-mails the reviewer saying to revise the review. This method was provided but wasn't working. This functionality was fixed and successfully implemented(Mail is only triggered for a file submission. For link submission their is no mailer functionalities). Also after the last round of review is over, mail is no longer triggered. The listed files were updated or created to get the functionality working.
    1. controllers/submitted_content_controller
    2. helpers/mailer_helper
    3. app/views/mailer/partials/_file_submission_plain.html.erb
    4. app/views/mailer/partials/_file_submission_html.html.erb
  • The message body of the mail is fixed to include the round of the review stage for which the review is provided along with a link to the site. Files are same as mentioned in second point.
  • Email is triggered to an invitee whenever a participant sends out an invitation to another participant to join a team. The listed files were updated or created to get the functionality working.
    1. controllers/invitation_controller
    2. helpers/participants_helper
    3. app/views/mailer/partials/_team_join_invite_html.html.erb
    4. app/views/mailer/partials/_team_join_invite_plain.html.erb
  • Whenever the invitee accepts the invitation, the student who issued the invitation gets a mail stating that the invitee has accepted his/her invitation. The controller and helper class are the same as mentioned in the 4th point. Although new views had to be created for this functionality
    1. app/views/mailer/partials/_team_accept_invite_html.html.erb
    2. app/views/mailer/partials/_team_accept_invite_plain.html.erb
  • Mail is also triggered when a student responds to a teammate advertisement. The controller and helper class are the same as mentioned in the 4th point. Although new views had to be created for this functionality.
    1. app/views/mailer/partials/_response_to_advertisement.html.erb
    2. app/views/mailer/partials/_response_to_advertisement.html.erb

Files modified in current project

Classes

  • controllers/import_file_controller
  • controllers/submitted_content_controller
  • controllers/invitation_controller
  • helpers/import_file_helper
  • helpers/participants_helper
  • helpers/mailer_helper

About import_file_controller

This controller derives from the Application Controller. It states the functionality of importing any kind of file like csv, xls, doc into the application. It defines the import function which takes the 'session' and 'params' as output and provides success message on successful import. It also provides the functionality of specifying the delimiter in the file which is being imported. The ImportFile method defined in the controller reads the file row by row based on the model concerned.

About submitted_content_controller

This controller also derives from the Application Controller. It states the CRUD operations on submitting the file or hyperlink for assignment. It provides functionality to download, create folder and delete folder after submission. It provides the functionality for submitting links and submitting hyperlinks separately.

About invitation_controller

This controller also derives from the Application Controller. It states the CRUD as well as other basic operations when an invitation is sent by an user to any participant to join their team. It provides the functionality to send and accept invitations as well as to reject invitations and leave team.

About import_file_helper

This is a helper file for the import_file_controller class which stores the attributes from the controller class as well as creates new users when user are created by importing a CSV file.

About participants_helper

This is a helper file for the participants_controller class. It provides some of the basic functionalities that is required to create participants that are added to expertiza.

About mailer_helper

This helper file is for the mailer class. Its creates the structure of the mail body that is needed by the mailer class to send mails. It also holds all the attributes that are required to send a mail.

Files created in current project

  • app/views/mailer/partials/_file_submission_plain.html.erb
  • app/views/mailer/partials/_file_submission_html.html.erb
  • app/views/mailer/partials/_team_join_invite_html.html.erb
  • app/views/mailer/partials/_team_join_invite_plain.html.erb
  • app/views/mailer/partials/_file_submission_html.html.erb
  • app/views/mailer/partials/_file_submission_plain.html.erb
  • app/views/mailer/partials/_team_accept_invite_html.html.erb
  • app/views/mailer/partials/_team_accept_invite_plain.html.erb

Testing Details

Scope for Future Improvement

References