CSC/ECE 517 Fall 2019 -E1974 Allow users to create an account and submit work to an ”assignment” Design: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
 
(13 intermediate revisions by 2 users not shown)
Line 10: Line 10:


===Existing Solution===
===Existing Solution===
Conference assignments are the type of assignments open for all the people. We can assign participants to assignments they are participating in, and they can submit their work for it. In today's scenario, participants share google doc, authors and co-authors name with instructor. Then instructor has to add those authors and co-authors as users in expertiza, assign them to the particular assignment.
Conference assignments are the type of assignments open for all the people. We can assign participants to assignments they are participating in, and they can submit their work for it. In today's scenario, participants share details of authors' names with instructor. Then instructor has to add those authors and co-authors as users in expertiza, assign them to the particular assignment.


===Proposed Solution===
===Proposed Solution===
This project concentrates on the use of expertiza assignments as conferences/journals. Using these assignments, people can submit their papers and get reviews for the same.
This project concentrates on the use of expertiza assignments as conferences/journals. Using these assignments, people can submit their papers and get reviews for the same.
The focus of this project will be to enable a particular conference participants to create an expertiza account and teams for conference submission by minimizing the inputs required from the application admin/instructor.
The focus of this project will be to enable a particular conference participants to create an expertiza account and teams for conference submission by minimizing the inputs required from the application admin/instructor.
===Pull Request===
https://github.com/expertiza/expertiza/pull/1649


==Task to be Accomplished==
==Task to be Accomplished==
* When creating a conference type assignment, a link to join the conference will be show on the assignment page.
* When creating a conference type assignment, a link to join the conference will be shown on the assignment page.
* Instructor will share the joining link with Author and they should be able to create account using that link, if account already does not exist.
* Instructor will share the joining link with Author and they should be able to create account using that link, if account already does not exist.
* Author will be able to create a new team in "Your Team" section and can invite other Co-Authors to join the team.
* Author will be able to create a new team in "Your Team" section and can invite other Co-Authors to join the team.
* If Co-Authors already exists in expertiza, they will be able to see invite on their homepage and if they do not exist in expertiza they will receive an email with joining link on email id used by Author while inviting them.
* If Co-Authors already exists in expertiza, they will be able to see invite on their homepage and if they do not exist in expertiza they will receive an email with joining link, username and temporary password.
* Once Co-Author sees the invite they can accept or reject it.
* Once Co-Author sees the invite they can accept or reject it.


Line 38: Line 41:
* This checkbox will be introduced in the Assignment’s edit page ('''app/views/assignments/edit/_general.html''')
* This checkbox will be introduced in the Assignment’s edit page ('''app/views/assignments/edit/_general.html''')


3. Based on the flag, once the assignment is created, a shareable URL will be displayed on the assignments page that can be used by the Instructor to share among students/authors. They will use this URL to be automatically assigned the given assignment.
3. Based on the flag, once the assignment is created, a shareable URL will be displayed on the assignments page that can be used by the Instructor to share among students/authors. They will use this URL to join the given assignment.


* Author of the assignment will use this URL to create the team and do conference paper submission. If author does not have account already in expertiza, Author will be asked to create account.
* Authors will use this assignment to submit conference papers. If author does not have account already in expertiza, a new account will be created for him.
 
The usage of the url and  working will be discussed in the next part.


===Changes for Conference's authors===
===Changes for Conference's authors===
Line 48: Line 49:
Following will be the high level steps the Author would be performing to create an account:
Following will be the high level steps the Author would be performing to create an account:


1. After instructor has created new assignment and a team for this assignment, instructor will be able to see a URL which will be shared by him with potential authors so that they can use their existing expertiza accounts or create new accounts to add submissions to the assignment. Creation of new account will not require approval from instructor/admin. URL will be visible on page '''/assignments/{id}/edit '''.
1. Once instructor shares the joining link with potential Authors, they can use their existing expertiza accounts or create new accounts for making a team and adding submissions to the assignment. Creation of new account will not require approval from instructor/admin. Joining URL will be visible on page '''/assignments/{id}/edit '''.
 
2. If Author already has an account he will be able to view the conference type assignment and his default team. If Author account does not exists he will be redirect to page '''/users/request_new?role=Student'''.  On this page author can input all the required details to create author account with role as student. This account will not require any approval from instructor to activation.


3. After Author account is created, the author can add co-authors to this assignments.
2. When Author clicks on joining link, there could be two cases based on whether author has expertiza account or not.  


4. Author can login in and navigate to '''assignment -> Your Team''' and invite co-authors into his team for working on the submission.
*If Author already has an account he will be able to view the assignment assigned to him and a default team.
*If Author does not have expertiza account, he/she will be asked to put some details to create account with role as student. After account creation, Author will receive email with login ID and password.  


5. Adding co-authors has following two cases - either the co-author's expertiza account already exists or a new user will be created otherwise in a similar way in which the author's account is created.
3. After Author logs in, he/she can navigate to '''assignment -> Your Team''' and invite co-authors into his team for working on the submission.


6. Author can provide email id of co-authors in invite list of “Your Team” and will be able to view a shareable URL on page '''student_teams/view?student_id={id}''', which will be shared by author to his team mates to join this team.
4. When inviting the Co-Authors, Author can give Expertiza user name of Co-Author if they already exists in expertiza or Author can invite them by giving email id of Co-Author.  


7. The role for both Author and Co-author is a student type because the difference in the 'conference type assignment' and a normal assignment is only in the way that users are added to it(i.e., by creating an account for themselves if they don't already have an account).
5. The role for both Author and Co-author is a student type because the difference in the 'conference type assignment' and a normal assignment is only in the way that users are added to it(i.e., by creating an account for themselves if they don't already have an account).


===Changes for Conference's co-authors===
===Changes for Conference's co-authors===


1. When a co-author click on the URL shared by author to join his team
1. If Co-Author's expertiza account already exists, then he or she will be able to see conference assignment in Assignments page and "Your Team" section will be having the invite sent by the author.


* If co-author already has an account, he will be asked to login and will be able to view his team and assignment.
2. If Co-Author's expertiza does not exists then he/she will receive an email with username and password and expertiza link on his/her email, that was given by author to invite the co-author. When co-author logs in with same email id or password, he/she will be able to see conference assignment in Assignments page and "Your Team" section will be having the invite sent by the author.
* If co-author does not exist, he will be redirected to page '''/users/request_new?role=Student'''. On this page all the details required to create a new user will be entered and a student account will be created which will not require approval from instructor for account activation.


2. Co-author's email will be verified while creating student account to validate if co-author is same person which author intended to add on his team. This will prevent spam/fake users from joining the author's team.
3. After that co-author can accept or reject the team invite and proceed with assignment submission.


===Database Changes===
===Database Changes===
As part of this project, the change in the database would be addition of a new column: 'is_conference_type_assignment' in 'Assignment' table with default value 0, and value = 1 if the assignment is of 'conference' type.
As part of this project, the change in the database would be addition of a new column: 'is_conference' in 'Assignment' table with default value 0, and value = 1 if the assignment is 'conference' type.


===Files to be changed===
===Files to be changed===
[[Image:Design_pic.png]]
[[Image:Design_g.png]]


==Test Plan==
==Test Plan==
Line 84: Line 83:
Please find below RSpec Test cases for this feature
Please find below RSpec Test cases for this feature


====Scenario 1: Creating student type user from controller by bypassing admin approval ====
====spec/controllers/invitations_controller_spec.rb====
After instructor creates a conference type assignment, author should be able to create an account and this account doesn't require approval from admin.
This spec would test the following scenarios when an author is inviting co-authors to join his/her team
 
Files associated with this functionality:
#users_controller_spec.rb
 
Following tests will be performed to verify whether the functionality is working as desired.
*Test case to check if author is able to to create and login into a new account without admin approval
 
====Scenario 2: Author/Co-author after creating an account is able to access conference type assignment====
After Author has created an account, he/she should be able to access the conference type account.


Files associated with this functionality:
1) When the co-author does not have an expertiza account:
#users_controller_spec.rb
It is expected that invitation creation should increase the User count by one and Invitations count by one


Following tests will be performed to verify whether the functionality is working as desired.
2) When the co-author already has an expertiza account:
*Test case to check if Author is assigned to conference type assignment and able to access it
It is expected that invitation creation should increase only the Invitations count by one as user is already existing
*Test case to check if Co-author is assigned to conference type assignment and able to access it
*Test case to check if Author has been added to default team
*Test case to check if Co-author is added to Author's team


====Scenario 3: Conference type assignment being created ====
3) When email entered by the author is in wrong format and co-author does not exist already:
Instructor should be able to create conference type assignment
It is expected that no new invitation should be created.


Files associated with this functionality:
4) (Regression) for a normal assignment, if author tries to add a teammate who does not have an expertiza account
#users_controller_spec.rb
It is expected that no new invitation or user should be created.


Following tests will be performed to verify whether the functionality is working as desired.
====spec/controllers/users_controller_spec.rb====
*Test case to check if Conference type assignment has been created
This spec would test the following scenarios when an author is joining the conference assignment as a participant


====Scenario 4: Author/Co-author should be able to see assignment if they already have an account ====
1) When the author does not have an expertiza account:
After Instructor creates a conference type assignment, Author/Co-author clicks on link provided to them. If they already have an account, they should see conference type assignment in their assignment page
It is expected that User count should be increased by one and participants count should increase by one


Files associated with this functionality:
2) When the author already has an expertiza account but is logged out:
#users_controller_spec.rb
It is expected that only participants count should increase by one


Following tests will be performed to verify whether the functionality is working as desired.
3) When the author already has an expertiza account and is logged in:
*Test case to check if Author/Co-author already have an account
It is expected that only participants count should increase by one
*Test case to validate if  Author/Co-author can see assignment in their assignment page if they already have an account


==Teammates==
==Teammates==

Latest revision as of 08:58, 13 March 2020

This page provides a description of the Expertiza based OSS project.

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.

Problem Statement

Existing Solution

Conference assignments are the type of assignments open for all the people. We can assign participants to assignments they are participating in, and they can submit their work for it. In today's scenario, participants share details of authors' names with instructor. Then instructor has to add those authors and co-authors as users in expertiza, assign them to the particular assignment.

Proposed Solution

This project concentrates on the use of expertiza assignments as conferences/journals. Using these assignments, people can submit their papers and get reviews for the same. The focus of this project will be to enable a particular conference participants to create an expertiza account and teams for conference submission by minimizing the inputs required from the application admin/instructor.

Pull Request

https://github.com/expertiza/expertiza/pull/1649

Task to be Accomplished

  • When creating a conference type assignment, a link to join the conference will be shown on the assignment page.
  • Instructor will share the joining link with Author and they should be able to create account using that link, if account already does not exist.
  • Author will be able to create a new team in "Your Team" section and can invite other Co-Authors to join the team.
  • If Co-Authors already exists in expertiza, they will be able to see invite on their homepage and if they do not exist in expertiza they will receive an email with joining link, username and temporary password.
  • Once Co-Author sees the invite they can accept or reject it.

Sequence Diagram

Design - The Grubby Details

Creating The conference type assignment

Following will be the high level steps the instructor would be performing to create a conference type assignment along with the changes required:

1. Instructor logs in with his credentials.

2. Instructor creates an assignment by checking a new check box - “Will this be a conference type of assignment”, to mark the assignment to be of conference type.

  • This checkbox will be introduced in the Assignment’s edit page (app/views/assignments/edit/_general.html)

3. Based on the flag, once the assignment is created, a shareable URL will be displayed on the assignments page that can be used by the Instructor to share among students/authors. They will use this URL to join the given assignment.

  • Authors will use this assignment to submit conference papers. If author does not have account already in expertiza, a new account will be created for him.

Changes for Conference's authors

Following will be the high level steps the Author would be performing to create an account:

1. Once instructor shares the joining link with potential Authors, they can use their existing expertiza accounts or create new accounts for making a team and adding submissions to the assignment. Creation of new account will not require approval from instructor/admin. Joining URL will be visible on page /assignments/{id}/edit .

2. When Author clicks on joining link, there could be two cases based on whether author has expertiza account or not.

  • If Author already has an account he will be able to view the assignment assigned to him and a default team.
  • If Author does not have expertiza account, he/she will be asked to put some details to create account with role as student. After account creation, Author will receive email with login ID and password.

3. After Author logs in, he/she can navigate to assignment -> Your Team and invite co-authors into his team for working on the submission.

4. When inviting the Co-Authors, Author can give Expertiza user name of Co-Author if they already exists in expertiza or Author can invite them by giving email id of Co-Author.

5. The role for both Author and Co-author is a student type because the difference in the 'conference type assignment' and a normal assignment is only in the way that users are added to it(i.e., by creating an account for themselves if they don't already have an account).

Changes for Conference's co-authors

1. If Co-Author's expertiza account already exists, then he or she will be able to see conference assignment in Assignments page and "Your Team" section will be having the invite sent by the author.

2. If Co-Author's expertiza does not exists then he/she will receive an email with username and password and expertiza link on his/her email, that was given by author to invite the co-author. When co-author logs in with same email id or password, he/she will be able to see conference assignment in Assignments page and "Your Team" section will be having the invite sent by the author.

3. After that co-author can accept or reject the team invite and proceed with assignment submission.

Database Changes

As part of this project, the change in the database would be addition of a new column: 'is_conference' in 'Assignment' table with default value 0, and value = 1 if the assignment is 'conference' type.

Files to be changed

Test Plan

Please find the below plan to test the functionality

RSpec Tests

Please find below RSpec Test cases for this feature

spec/controllers/invitations_controller_spec.rb

This spec would test the following scenarios when an author is inviting co-authors to join his/her team

1) When the co-author does not have an expertiza account: It is expected that invitation creation should increase the User count by one and Invitations count by one

2) When the co-author already has an expertiza account: It is expected that invitation creation should increase only the Invitations count by one as user is already existing

3) When email entered by the author is in wrong format and co-author does not exist already: It is expected that no new invitation should be created.

4) (Regression) for a normal assignment, if author tries to add a teammate who does not have an expertiza account It is expected that no new invitation or user should be created.

spec/controllers/users_controller_spec.rb

This spec would test the following scenarios when an author is joining the conference assignment as a participant

1) When the author does not have an expertiza account: It is expected that User count should be increased by one and participants count should increase by one

2) When the author already has an expertiza account but is logged out: It is expected that only participants count should increase by one

3) When the author already has an expertiza account and is logged in: It is expected that only participants count should increase by one

Teammates

Mentor - Prof. Edward Gehringer

  • Sameer Adhikari (sadhika2)
  • Gurman Singh (gsingh23)
  • Garima Garima (ggarima)
  • Bharat Bhardwaj (bbhardw)

References

  1. Github Repository for Expertiza
  2. Expertiza Documentation on Database Tables
  3. Rails Guide Documentation