CSC/ECE 517 Fall 2016/E1680. Improve survey functionality

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction to Expertiza

The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. Expertiza is an open source project and is based on “Ruby on Rails” framework. Expertiza facilitates easy creation of assignments and a list of topics for the same. Expertiza, in other words, gives a very simple web interface for assignment management for both the students as well as instructors.

Problem Statement

Overview

Expertiza should be able to distribute surveys to the users. The survey can be one of the following: 1. Course survey (all the participants of the course can take it). 2. Global survey (all the users in Expertiza can take it).
The survey can also be targeted (the admin can specify a group of people who will receive this survey).
The three kinds of surveys in this project are:

  • 1. Assignment Survey questionnaire
  • 2. Global survey questionnaire
  • 3. Course evaluation questionnaire

Constraints

  • Survey questionnaire should be a subclass of questionnaire.
  • The creation, editing, filling in, and checking that all the questions have been answered survey should be similar to the procedure used for other types of questionnaires (e.g. peer-review questionnaires).
  • There should be a page to see the distribution of results for any question.
  • We should use the same controller method to take the survey as to fill in the peer-review, namely, response_controller.
  • We should use the same code to display the existing survey responses as to display the responses in peer reviews.
  • For each course or assignment, the admin/instructor should be able to create a survey and have some (or all) of the participants receive the survey.

Existing Models, Views and Controllers

Assignment Survey questionnaire, Global Survey questionnaire and Course Evaluation Questionnaire are the existing models which are subclasses of questionnaire. Their display types are survey, global survey and course evaluation respectively. The controller file present currently is survey_controller.rb.

Proposed Design

Structure

In the design we have three kinds of survey-

  • assignment_survey_questionnaire
  • global_survey_questionnaire
  • course_evaluation_questionnaire

These models should be made as subclasses of the class questionnaire. Complete refactoring is needed as the existing code is inefficient.

Taking the survey

  • There is a constraint that the survey has to be filled in using the same controller method as used for filling in peer review, namely response_controller. Also, the same code has to be used to display the existing survey responses as to display the responses in peer review.
  • The response_controller can be used to make sure that the survey can be taken only once by each user, depending upon the survey type and the users who are allowed to access (can be listed using 'action_allowed?'). The answers can be saved using the 'saving' method. Also, the responses can be viewed once, the survey is submitted.

Adding Participants to the survey

  • Instructor or admin both can add survey for any course or assignment
  • The creator would be able to select the participants based on the scope of the survey, that is, all the students or all the Expertiza users or specific group of people.

Adding all the global questionnaire questions

  • There would be a generic set of questions which will be included in global_survey_questionnaire.
  • These questions will be by default added to every survey the user creates.
  • But, creator will be able to omit them with one ‘checkbox’ button (Or, we can have specific selections for each of the questions to be included).
  • Or, there can be option of separating the global survey and course survey. The quiz taker will take the global survey first and then the course survey.

Files to be modified:

Controllers

  • app/controllers/survey_deployment_controller.rb
  • app/controllers/statistics_controller.rb
  • app/controllers/course_evaluation_controller.rb
  • app/controllers/survey_controller.rb

Models

  • app/models/global_survey_questionnaire.rb
  • app/models/survey_questionnaire.rb
  • app/models/survey_deployment.rb
  • app/models/metasurvey.rb
  • app/helpers/survey_helper.rb
  • app/models/survey_participant.rb
  • app/models/survey_response.rb
  • app/helpers/survey_response_helper.rb

Views

  • app/views/survey_deployment/
  • app/views/statistics/
  • app/views/survey_response/
  • app/views/survey

New Implementation

Changing names

  • Changing name of the model 'survey_questionnaire' to 'assignment_survey_questionnaire'
  • Changing all the entries in the database. That involves, migration of all questionnaire entries where type="survey_questionnaire" to "assignment_survey_questionnaire".
  • In our part of project implementation, there is no need to incorporate any changes to the Assignment Questionnaire.
  • Changing the name of 'Course Evaluation' tab in page header to 'Surveys'.

Deletion from previous implementation

  • Deleting all traces of 'survey_deployments','survey_participants', and 'survey_responses.'

Addition

  • Adding columns to the 'Assignments' table: survey_id and global_survey_id.
  • Adding columns to the 'Course' table: survey_id and global_survey_id.

Update

  • We update 'survey_id' and 'global_survey_id' in the 'assignments' table.
  • This requires checking if any entry for 'survey_id' is already present:

Case TRUE: Warning to user 'Update to an existing survey'. Case FALSE: Allow update.

Mapping

  • The survey is mapped to participants through 'participants' table.
  • In 'participants' table:

If type="Assignment participant" then parent id="assignment_id"
If type="Course participant" then parent id="course_id"
  • Using the 'type' we can get the type of object i.e. assignment or course, and then using parent_id the particular instance of that object can be mapped to the survey and listed for the user/participant.
  • There is no explicit assigning of surveys to participants. Updating the new columns in 'assignments' and and 'courses' table is sufficient for assigning the surveys.

New Implementation View

  • In place of 'Course Evaluation' tab, the 'Surveys' tab, will use the list method to enable student/user/participant to see all the surveys assigned to them particularly.
  • Depending upon the status of the response i.e. submitted or not submitted, the user/participant can view or update, respectively, the surveys.

Submitting Response

  • Checking the 'assignments' or 'courses' the participant has enrolled in.
  • Checking if the 'assignments' or 'courses'have active surveys (survey_id != NULL).
  • If participant has already responded to the survey, only 'View' option is available.
  • If there is no previous response, 'Submit Response' option is available.

Responses

  • There is a global table for all the responses in Expertiza-'response_map'. All the responses in expertiza are saved in this table.
  • When participant responds to the survey, based on the survey type, the entry in the response_map is:
 assignment_survey_response_map
 course_evaluation_response_map
 global_survey_response_map
  • The other entries are:
 reviewer_id is participant_id
 reviewed_object_id is assignment_id or course_id depending upon the previous conditional output.
 reviewee_id is same as object_id

Testing

Testing using UI

Login as instructor:
1. Use credentials username: instructor6, password:password.
2. Click on Manage -> Questionnaires-> Survey / Global Survey/ Course evaluation.
3. Create a new Survey/ Global Survey/ Course evaluation filling in the parameters asked for.


Login as student:
1. The course survey is for all the students, whereas the global survey is for a few random students using Expertiza.
2. Take the survey visible through your account.