CSC/ECE 517 Spring 2016 E1620 Improve Survey Functionality: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Created page with "== Introduction == === Purpose === The purpose of the ‘Improve survey questionnaire’ project, as the title suggests is to improve the existing survey questionnaire function...")
 
Line 259: Line 259:
== Overview of Code Changes ==
== Overview of Code Changes ==


As per our initial investigation, the following files have been identified that will be changed as part of the project. As this project requires a lot of refactoring and also may require a complete redesign of the survey functionality, we are still in the process of analyzing the existing code and survey functionality. Once the changes that needs to be done are identified, we will keep updating the document with the code changes.
As per our initial investigation, the following files have been identified that will be changed as part of the project.  


- app/controllers/survey_controller.rb,
- app/controllers/survey_controller.rb,
Line 284: Line 284:


- app/models/metasurvey.rb
- app/models/metasurvey.rb
= Changes Made =
1. Fixed Assignment survey feature - Previously, the assignment survey feature was not able to display the presently assigned surveys. As a part of this project, the feature was fixed and the original implementation in javascript was changed by making use of more rails features.
2. Added survey for course feature - Previously, surveys could only exist for an assignment. As a part of this project, the surveys can be used for a particular course as well. This includes course evaluation surveys and the survey questionnaires.
3. Added selection of global surveys feature - As a part of this project, the instructor should have the ability to select if he/she wants the questions from the global surveys to be present in the course surveys. This feature was added by providing the list of all global surveys and allowing the instructor to choose from them.
3. Added selection of students feature - As a part of this project, the instructor should have the ability to select only a subset of the students taking the course for a particular survey. This feature was added by providing the list of all students for the course and allowing the instructor to choose from them.
4. Edit survey deployment dates - The date when the surveys had to be deployed can be set along with the date they can be removed. This feature was added in this project.
5. View survey response distribution feature - When students have answered questions in the survey, the instructor should be able to view the distribution of the responses for each question of the survey. This feature was provided for both the assignment and course surveys.


== Conclusion ==
== Conclusion ==


After completion of this project, the survey functionality will be fully functional and the code will be ready to be deployed.
After completion of this project, the survey functionality will be fully functional and the code will be ready to be deployed.

Revision as of 18:48, 24 April 2016

Introduction

Purpose

The purpose of the ‘Improve survey questionnaire’ project, as the title suggests is to improve the existing survey questionnaire functionality on Expertiza. Some of the improvements involve providing instructors with the ability to pull questions from the global survey and to refactor the code to ensure the survey functionality is similar to the other questionnaires on Expertiza.

Scope

This project focuses on the ‘survey’ functionality in Expertiza. Since the survey functionality has generally not been used due to the existence of other survey tools, the code had not been improved in the past. Hence there is a need to improve the code. As the survey is a subclass of questionnaire, it shares a lot of commonalities with other existing questionnaire types. So polymorphism needs to be used to improve the survey functionality. Moreover, there will also be changes to the course evaluation and global survey features. Another feature which can be implemented is the distribution of survey results which can also be used for other types of questionnaires. Finally, some tests will be run on the implemented functionalities.


System Architecture

System Requirements

The system requirements focuses on the ‘survey’ functionality in Expertiza. This feature allows administrators and instructors to create surveys. The surveys can be course or global surveys. The surveys can also be targeted. Whenever an instructor/admin creates a survey, a corresponding survey_participant entry should be made in the database. Another requirement is to make the code DRY. The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.

Summary of Product Requirements

The user requirements (UR table) has been created from project description document. Multiple user requirements have been identified for each User Requirement Statement. The URS table has each requirement identified by a unique Requirement ID.

URS - User-Requirement Statements

1 - Ability to create Survey for different scenarios.

2 - Create a page to display the distribution of results for each question in questionnaires and surveys.

3 - Storing the survey responses.


Requirement ID - Requirements - URS

1.1 - Create a link to create a survey for all the users enrolled in a course. - 1

1.2 - Create a link to create a survey for a selected users of a course. - 1

1.3 - Add a new survey_participant record in the database when a survey is created. - 1

1.4 - Add a checkbox to include the questions from global_survey in the new survey being created. - 1

2.1 - Create a link to the results distribution page for a particular questionnaire in the page where the questionnaire is listed. - 2

2.2 - Create a link to the results distribution page for a particular survey in the page where the survey is listed. - 2

2.3 - Create a new page to display each question of the questionnaire and the distribution of results of each question. - 2

2.4 - Create a new page to display each question of the survey and the distribution of results of each question. - 2

2.5 - Create a link to the results distribution next to the assignment results link for each student for the reviews of his/her assignment. - 2

3.1 - Add the ability to store the response given by a user to the database. - 3

Summary of Testing Requirements

The table below identifies test cases required to be performed on each requirement. Each test case is numbered the same as the requirement id it is testing as well as an identifier.

Test Case ID - Test Case Description

1.1-0 Login to the system as an admin/instructor. Select the course for which you want to create the survey. Create the survey and add the questions to the survey. Post the survey as a course survey. This survey should be available to all the participants of the course.

1.2-0 Login to the system as an admin/instructor. Select the course for which you want to create the survey. Create the survey and add the questions to the survey. Once the survey is created select the participants of the course to whom this survey should be sent and the post the survey. The survey should be sent to the selected participants.

1.3-0 Login to the system as an admin/instructor. Select the course for which you want to create the survey. Create the survey and add the questions to the survey. Once the survey is created select the participants of the course to whom this survey should be sent and the post the survey. Once, the survey is created there should be a corresponding survey_participant record in the database.

1.4-0 Login to the system as an admin/instructor. Create the survey and select the checkbox to include the questions from the global questionnaire. The questions from the global questionnaire should be added to the survey.

2.1-0 Login to the system as an admin/instructor. Choose an existing questionnaire. Check if a link exists with the questionnaire which will lead to a results distribution page.

2.2-0 Login to the system as an admin/instructor. Choose an existing survey. Check if a link exists with the survey which will lead to a results distribution page.

2.3-0 Login to the system as an admin/instructor. Click an existing questionnaire’s response page link. Check if all the questions of the questionnaire are present along with answers and the distribution.

2.4-0 Login to the system as an admin/instructor. Click an existing survey’s response page link. Check if all the questions of the survey are present along with answers and the distribution.

2.5-0 Login to the system as a student. Click on a submitted assignment which has been reviewed. Click on the link for response distribution and look at the distribution for the questions of the review for the assignment.

3.1-0 Login to the system as a student. Choose a survey which is assigned to this user. Fill out the survey questions and click on submit. The response to the survey should be stored in database.

Requirements - Testing Cross Reference Matrix

Test Case ID : Requirement ID

1.1-0 : 1.1

1.2-0 : 1.2

1.3-0 : 1.3

1.4-0 : 1.4

2.1-0 : 2.1

2.2-0 : 2.2

2.3-0 : 2.3

2.4-0 : 2.4

2.5-0 : 2.5

3.1-0 : 3.1

Assumptions

In the design of this system, we have made the following assumptions.

1. Only instructor or admin can create the survey.

2. When a survey is sent as global survey, it is sent to all the users of Expertiza including admins and instructors.

Use Cases

UC 1.1

Name: Ability to create a survey for a particular course.

Preconditions: - The user is logged in as an admin or instructor. - There is at least one course in the system for which the survey can be created.

Detailed Steps: - The user selects the course for which the survey needs to be created. - The user creates a survey and adds the questions to the survey. - The user posts the survey as a course survey for all the participants of the course.

Post conditions: - A course survey is sent to all the participants of the selected course.


UC 1.2

Name: Ability to create a survey for some selected participants of a course.

Preconditions: - The user is logged in as an admin or instructor. - There is at least one course in the system for which the survey can be created. - There is one or more participants in the course.

Detailed Steps: - The user selects the course for which the survey needs to be created. - The user creates a survey and adds the questions to the survey. - The user selects the participants from the course participants list to whom the survey should be sent.

Post conditions: - A survey is sent to the selected participants of the selected course.


UC 1.3

Name: Add a new survey_participant record in the database for each survey created.

Preconditions: - The user is logged in as an admin or instructor. - There is at least one course in the system for which the survey can be created.

Detailed Steps: - The user selects the course for which the survey needs to be created. - The user creates a survey and adds the questions to the survey. - The user posts the survey. Post conditions: - A new survey_participant record is created in the database for the newly created survey which keeps record of all the participants to whom the survey was posted.


UC 1.4

Name: Ability to not include global survey questions in the survey.

Preconditions: - User has instructor/admin privileges.

Detailed Steps: - User selects to create a survey. - User unchecks the global survey questions checkbox to not include global survey questions. (By default the global survey questions checkbox is checked)

- User submits the survey.

Post conditions: - System does not include the global survey questions if the checkbox is unchecked.


UC 2.1

Name: View distribution results for questionnaire as instructor/admin

Preconditions: - User must login to the Expertiza system as instructor/admin - A questionnaire already exists which the user has access to

Detailed Steps: - User selects the questionnaire which (s)he has access to - User selects the link ‘Results Distribution’ for that questionnaire - User views the results for each question of questionnaire

Post conditions: - The system displays the result distribution for each question belonging to that questionnaire.


UC 2.2

Name: View distribution results for survey as instructor/admin

Preconditions: - User must login to the Expertiza system as instructor/admin - A survey already exists which the user has access to

Detailed Steps: - User selects the questionnaire which (s)he has access to - User selects the link ‘Results Distribution’ for that survey - User views the results for each question of survey

Post conditions: - The system displays the result distribution for each question belonging to that survey.


UC 2.3

Name: View distribution results for review questionnaire as student

Preconditions: - User must login to the Expertiza system as instructor/admin - User must have submitted an assignment which has been reviewed

Detailed Steps: - User selects the assignment which (s)he has access to - User selects the link ‘Results Distribution’ for that assignment review - User views the results for each question of review questionnaire

Post conditions: - The system displays the result distribution for each question belonging to that review questionnaire.


UC 3.1

Name: Survey responses stored in database.

Preconditions: - User must login to the Expertiza system as student.

Detailed Steps: - User takes the survey and submits answer for the questions in the survey.

Post conditions: - A new table entry is created in the database with information regarding the answers submitted by the participants.

Overview of Code Changes

As per our initial investigation, the following files have been identified that will be changed as part of the project.

- app/controllers/survey_controller.rb,

- app/controllers/survey_deployment_controller.rb

- app/controllers/statistics_controller.rb

- app/helpers/survey_helper.rb

- app/models/survey_participant.rb

- app/models/survey_response.rb

- app/helpers/survey_response_helper.rb

- app/models/global_survey_questionnaire.rb

- app/models/survey_questionnaire.rb

- app/controllers/course_evaluation_controller.rb

- app/models/survey_deployment.rb

- app/models/metasurvey.rb

Changes Made

1. Fixed Assignment survey feature - Previously, the assignment survey feature was not able to display the presently assigned surveys. As a part of this project, the feature was fixed and the original implementation in javascript was changed by making use of more rails features.

2. Added survey for course feature - Previously, surveys could only exist for an assignment. As a part of this project, the surveys can be used for a particular course as well. This includes course evaluation surveys and the survey questionnaires.

3. Added selection of global surveys feature - As a part of this project, the instructor should have the ability to select if he/she wants the questions from the global surveys to be present in the course surveys. This feature was added by providing the list of all global surveys and allowing the instructor to choose from them.

3. Added selection of students feature - As a part of this project, the instructor should have the ability to select only a subset of the students taking the course for a particular survey. This feature was added by providing the list of all students for the course and allowing the instructor to choose from them.

4. Edit survey deployment dates - The date when the surveys had to be deployed can be set along with the date they can be removed. This feature was added in this project.

5. View survey response distribution feature - When students have answered questions in the survey, the instructor should be able to view the distribution of the responses for each question of the survey. This feature was provided for both the assignment and course surveys.

Conclusion

After completion of this project, the survey functionality will be fully functional and the code will be ready to be deployed.