Difference between revisions of "Rotate answer options/sub questions"

From Catglobe Wiki
Jump to: navigation, search
Line 6: Line 6:
  
 
I want to control the rotation by setting explicitly the first item in a range after rotation  
 
I want to control the rotation by setting explicitly the first item in a range after rotation  
 +
 +
=== Rotate answer options  ===
  
 
'''Example'''  
 
'''Example'''  
Line 17: Line 19:
 
[[Image:QuestionTips Rotate 2.jpg]]   
 
[[Image:QuestionTips Rotate 2.jpg]]   
  
== Solution ==
+
'''Solution'''
  
 
Set the rotation range from 0-5 with rotation index is 3  
 
Set the rotation range from 0-5 with rotation index is 3  
  
== Code ==
+
'''Code'''
  
 
*Add a Single question to Questionnaire editor  
 
*Add a Single question to Questionnaire editor  
Line 30: Line 32:
 
</source>  
 
</source>  
  
[[Image:RotateAnswerOptions.jpg]]
+
[[Image:RotateAnswerOptions.jpg]]  
 +
 
 +
'''Source'''
 +
 
 +
Questionnaire resource Id on cg site: 159730
 +
 
 +
=== Rotate sub questions ===

Revision as of 10:49, 5 January 2012

Rotate answer options/sub questions

In order to synchronize the answer option/sub question rotation among more than one questions

As a questionnaire creator

I want to control the rotation by setting explicitly the first item in a range after rotation

Rotate answer options

Example

I have a list of drinks as answer options

QuestionTips Rotate 1.jpg

I want to have Mirinda as the top answer option in the list and keep None of the above in its original position

QuestionTips Rotate 2.jpg 

Solution

Set the rotation range from 0-5 with rotation index is 3

Code

  • Add a Single question to Questionnaire editor
  • Go to menu Properties -> Question scripts -> Java script and input below script
quest.rotateAnswerOptions(0, 5, 3);

RotateAnswerOptions.jpg

Source

Questionnaire resource Id on cg site: 159730

Rotate sub questions