Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Survey 2 module

From MoodleDocs

For notes, discussion and eventually a full spec of the new Survey module for 2.1 that combines all the features of

  1. Survey
  2. Questionnaire
  3. Feedback

into one module.

This is the list of the frequently asked features request that moodle users addressed to me over last few years. It may be a good starting point. The following list is NOT ordered by feature relevance.

Module settings page

  • option: allow/deny save without submit
  • option: allow/deny record modification after submit
  • option: allow/deny public submitted answers

(Example: This option should appear like:

Submitted answers are available <select name="dropdown_7" size="1">

<option value="0">to all users</option> <option value="1" >to submitter only</option> <option value="2" >to submitter group only</option>

</select>

  • type of field (char(n), text, number, alphanumeric, boolean, date, picture, file, email, url...) with type check at submit time (and number of digit check for char(n) fields).

This information may not be used at field definition time but is useful for data verification/check.

(Example: Please, enter your card ID: _______ This field should be defined, for instance, as char(7))

  • opening and closing submission dates
  • relations between tables

(Example: one record for the profile of my company one related record for each intervention request submitted by my company)

Field level settings

  • mandatory/non mandatory field option
  • define a range of valid answers for fields allowing this

(Example: Please, enter your seniority. (limited between 0 and 50 years)

Example: Date of birth: (limited between 18 and 100 years ago))

  • define fields default to be loaded at "new record" display time
  • optional "other" text field for drop down menu/radio button/check box.

(Example for drop down:

Where were you born?

<select name="dropdown_14" size="1"> <option value="0"> </option> <option value="1" >Spain</option> <option value="2" >France</option> <option value="3" >other</option> </select>

<input type="text" name="dropdown_14_other" size="10" maxlength="10" value="" /> If you choose "other" in the "dropdown_14" drop down menu the field "dropdown_14_other" will become mandatory, otherwise it will be disabled. )

  • define read-only fields (auto filled by the software) like, current_date, user_name, record_ID...

New fields types

  • short date (with month and years only, to answer question like: When had you the first evidence of this disease?)
  • order list. A list of available items and the answer is supposed to order them.
  • time

(Example: When do you usually take breakfast? )

Uncategorised requested features

  • handle more than one view_single/view_list/find/input layout (and allow this or that layout to users on the basis of capabilities).

The idea is: On the basis of capability you will access your specific layout with only a field subset. If you have this capability, you will find all the fields of the survey, otherwise you will find only a subset of them.

The same feature may be provided in the following way: At fields level definition the course creator should be allowed to mark the field "field1" as

  1. visible and enabled to all
  2. visible to all but enabled to users with view_field1 capability only
  3. visible and enabled to users with view_field1 capability only
  • allow course creator to add custom number to question inside layouts (i.e.: 1, 2, 2a, 2b, 3...) to respect questions hierarchy
  • allow course creator to indent questions inside layouts to respect questions hierarchy (as it is already possible the indent of resources inside courses)
  • conditional branching

(Example: Gender: M F

if female: question for females only

if male: question for males only)