ASQ-USI / question-editor-asq

Question editor for ASQ
1 stars 0 forks source link

Editors Structure #13

Open marco9446 opened 8 years ago

marco9446 commented 8 years ago

Editors Structure

The idea is to maintain the structure of the current editor with some small changes.

The question properties should be an array which contains one object for each property with the following attributes:

var questionProperties=[
  {
    name:  <property name>
    label: OPTIONAL < property's name shown  to users. if not specified will be used the 'name' attribute >
    type:  < Boolean | Number | String | Enum  > ,
    widgetType: OPTIONAL < colour | richText  | range | code | text-code>
    description: OPTIONAL  <property description> ,
    default: OPTIONAL <default property value, if type == Enum will bean array of strings>
    referenceId: * OPTIONAL  <id of the item you want to apply this property> ,
    value:  <return the value of the property. Useful for data binding>
    isAdvancedProperty: <is visible only to advanced users>
    isAdvancedUser: <property use to set the level of the user>
  },
  {...},
  {...},
  {...}
]
*referenceId can be avoided using polymer data binding in declarative way

Each editor should contains the asq-stem and the asq-solution components and a way to modify them. In order to insert the solution the editor should have two 'modes' one for the creation of the question and the other where the user should answer the question in the correct way and save the state.

To prevent an overflow of informations to the user, there should be an option to enable or disable the view of the most advanced properties

Multi choice editor (asq-multi-choice-q)

questionProperties
triglian commented 8 years ago

Looks good. Some comments: