====== Requirements ====== Enhancement #0000021 - Build Assessment/Quiz/Survey Functionality The assessment engine will consist of 5 steps:- - Questions creation (question bank) - Activity creation (Activity can be Quiz, Survey, Poll etc...) - Associating questions with an activity. (Includes Previewing, Publishing etc...) - Answering the quiz, survey or poll. - Analyse answers - Reports/Score etc... ===== Question management ===== 1. A user with 'instructor' role can access and modify the questions 2. Following questions types are to be supported initially * Multiple choice * Single choice * Essay/Descriptive text * Image Future question types can be * Single question with multiple sub questions e.g. a question that has a paragraph/story and then there are multiple questions that can be in context with the given paragraph. * Question that can accept multiple answers in form of text (Multiple textbox) * Question that can accept only numerical answers (Multiple textbox but accept only numbers) 3. When creating a question there should be and option to specify the grade/weightage for each choice.(At present we can fix the grade to be 100%, 50%, 0%). 4. Question should have an optional feedback field which can be shown to the taker of quiz/survey after submitting the quiz. 5. The UI should be intuitive and ajaxfied to provide simple interface to create questions. 6. There should be an option to preview each question individually. ===== Quiz/Survey management ===== - A user with 'instructor' role can access the Quiz management features - Creating a new quiz/survey will require selecting questions from the question bank and associating it with the quiz. - A quiz can have a title and introduction. introduction can be shown to user when the quiz starts which may have instructions. - There should be an option to specify how many questions should appear in one page when the quiz/survey is displayed to the end user. - There should be an option to rearrange the order of the questions. - There should be an option to specify whether to allow multiple attempts or not. If yes then how many attempts. - The quiz should have a state like (draft, published). Only published quiz can be visible to other users. - There should be an option to preview the quiz/survey - **Who can access/view/take the quiz/survey? Can the creator invite other users, or can other users subscribe to the quiz? Or is it visible to all?** - A quiz/survey once published cannot edited if it has responses corresponding to it. It can be copied over and a new survey/quiz can be created from it. A feature to copy a quiz can be handy. - A quiz can be time barred. ===== Implementation ===== ==== Table Design ==== 1. Table name - **question_types** Stores type of questions. i.e. multi choice, single choice, essay, true/false etc... ^ Column_name ^type ^ Description ^ | id | integer | primary key | | name | varchar | name of the type that will be shown in UI | | display_type | varchar | some constant value that will be used in the code to identify the question type and render appropriate UI template e.g. MULTICHOICE, SINGLECHOICE, ESSAY, YESNO etc.. | | created_at| date_time |created date | | updated_at| date_time|updated date | 2. Table name - **question_groups** There can be a single question with multiple sub questions. In such scenario the main question will be the stored in the question group and sub questions in the questions table. ^ Column_name ^type ^ Description ^ | id | integer | primary key | | text | text | the text of the question | | user_id | integer | user to whom the question belongs to | | created_at| date_time |created date | | updated_at| date_time|updated date | 3. Table name - **questions** This table stores the questions ^ Column_name ^type ^ Description ^ | id | integer | primary key | | text | text | the text of the question | | help_text | varchar | the text that can be displayed as help to the user in the UI | | feedback_text | text | the text that can be displayed when showing the results for the test. | | question_group_id | integer | foreign key to question_groups table. Can be NULL if the question is a simple question i.e. | | correct_answer_id | integer | foreign key to the answers table. Id of the answer which is correct one | | question_type_id | integer | foreign key to the question_types table. Indicates type of question i.e. multi choice, single choice etc... | | created_at| date_time |created date | | updated_at| date_time|updated date | 4. Table name - **answers** This table stores the answer choices ^ Column_name ^type ^ Description ^ | id | integer | primary key | | question_id | integer | foreign key to questions able. Indicates question to which the choice belongs to | | text | text | the text that will be shown in the choice in UI | | help_text | varchar | the text that can be displayed as help to the user in the UI | | weight | integer | Indicates the score earned when this answer is selected. This value will be in % age | | created_at| date_time |created date | | updated_at| date_time|updated date | 5. Table name - **questionnaires** This table stores the information about the quiz/survey ^ Column_name ^type ^ Description ^ | id | integer | primary key | | user_id | integer | foreign key to users table. Indicates user to whom the questionnaire belongs to | | questionnaire_type | varchar | Type of questionnaire (quiz or survey) | | introduction | text | an introductory text that can be displayed when quiz starts | | title | varchar | title of the questionnaire | | questions_per_page | integer | number of questions that will displayed on one page | | attempts_allowed | integer | number of attempts that a user will be allowed to take the quiz/survey | | state | varchar | indicates the state - draft/published | | has_time_limit | boolean | whether the quiz is time bared or not | | time_limit | integer | If the above field is true then this will contain the time value in minutes | | created_at| date_time |created date | | updated_at| date_time|updated date | 6. Table name - **questionnaire_questions** This table stores the association between the questions and questionnaire. ^ Column_name ^type ^ Description ^ | id | integer | primary key | | questionnaire_id | integer | foreign key to questionnaires table. | | question_id | integer | foreign key to questions table | | display_order | integer | indicates the order of question. this will be used to order the questions in the UI | | created_at| date_time |created date | | updated_at| date_time|updated date | 7. Table name - **response_sets** This table stores the basic details of the responses. As soon as the user starts taking the quiz an entry will be made in this table. The actual responses will be stored in the responses table. ^ Column_name ^type ^ Description ^ | id | integer | primary key | | questionnaire_id | integer | foreign key to questionnaires table. | | user_id | integer | user who had given the response | | access_code | varchar | access code to identify the response set. This will be random value and unique across the table | | completed_at| date_time | time when the quiz/survey was completed | | created_at| date_time |created date | | updated_at| date_time|updated date | 8. Table name - **responses** This table stores the actual responses. ^ Column_name ^type ^ Description ^ | id | integer | primary key | | response_set_id | integer | foreign key to response_sets table. | | question_id | integer | Id of the question for which the response was created | | answer_id | integer | Id of the answer for that was selected as a response | | response_group | integer | In case a question belongs to a question group all the responses should also be grouped logically. This field will be used for grouping. Responses for same question group will have common number here. | | created_at| date_time |created date | | updated_at| date_time|updated date | ==== UI ==== - Provided 2 links in the user menu (top right), for Manage Questions and Manage Quiz/Surveys - Manage Questions will allow creation/update/listing of questions and answers choices. - Manage Quiz/Surveys is the place where the Quiz/Survey can be created/updated. This shows list of the questionnaires and actions like "View", "Edit", "Show Questions", "Publish", "Expire". - Publish: Will publish the questionnaire and make it public. After publishing the questionnaire will appear under the "Quiz/Surveys" tab. - Expire: Will remove the questionnaire from the public list. - Show Questions: Will show the questions attached to the questionnaire. This view has 3 sections - **Add Questions:** This will list all the questions that are not part of the questionnaire. User can select multiple questions and click on "Add Selected" to association the questions to the questionnaire - **Remove Questions:** This will list all the questions that are part of the questionnaire. User can select multiple questions and click on "Remove Selected" to remove the association between the questions and the questionnaire - **Arrange Questions:** This can be used to arrange the order of the questions in the questionnaire. The questions can be dragged and dropped in vertical direction to change the ordering. - Added "Quiz/Surveys" tab in the main header. Clicking on this will list all the questionnaires that are public. There is a link to the questionnaire.