Skip logic feature available for testing

Skip logic feature available for testing

by Joseph Rézeau -
Number of replies: 9
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

To all Questionnaire users.

The skip logic feature has been asked as a desirable feature for the Questionnaire plugin, e.g. here.

I have spent a couple of days of my Xmas holidays to implement a proposal which is available for testing and comment, on my Moodle test site. Login as teacher1, password Teacher1!, go to the Questionnaire Module Demo course where you can take the questionnaire entitled Testing the Skip Logic setting. For a more complete understanding of how the feature works, you can create your own questionnaire from scratch (or make a copy of the Testing the Skip Logic setting questionnaire instance) and add your own questions.

Please read carefully the online help provided for the Yes/No, Dropdown Box and Radio buttons question types, under the Skip Logic help button.

Please report here any remarks, questions, which may help improve this feature, before I commit it, after approval of my co-maintainer, Mike Churchward.

Joseph

An extract from the online Help file follows


Respondents can be routed through a questionnaire using 2 types of branching logic:

1. Skipping specific questions

A skip pattern will jump a respondent over a group of questions that isn't relevant to them. Use a Yes/No question for this.

Example 1

  1. Page 1
    • Question 1 Do you own a car? Yes/No.
      • Answer Yes -> go to page 2
      • Answer No -> go to page 3 (i.e. skip over irrelevant question(s) in page 2
  2. Page 2
    • Question 2: What is the color of your car?
    • Question 3: What is the make of your car?
    • Question 4: How long have you owned your car?
  3. Page 3
    • Question 5: Where do you work?
    • etc.

Procedure to be followed to obtain the above "skip logic" flow

  • Create Q1 as a Yes/No question, and set Skip Logic to "Yes" and set Response Required to Yes, of course!
  • Insert a Page Break ---
  • Create Q2 as a radio button or text or dropdown question type
  • Create Q3
  • Create Q4 (you can create as many questions as you like on that page)
  • Insert a Page Break---
  • Now continue creating questions normally, until you want to use Skip Logic again.

2. Conditional branching:

A branch pattern will route a respondent to the appropriate section of the questionnaire: each respondent follows one of the branches. Use a Radio Button or Dropdown Box question for this.

Example 2

  1. Page 1
    • Question 1: Where do you teach? Primary school / Secondary education sector / University.
      • Answer: Primary school -> go to page 2
      • Answer: Secondary education sector -> go to page 3
      • Answer: University -> go to page 4
  2. Page 2
    • Question 2: How long have you been a Primary school teacher?
    • Question 3: What age groups to you teach? [go to page 5]
  3. Page 3
    • Question 4: How long have you been a Secondary school teacher?
    • Question 5: What it your main subject [go to page 5]
  4. Page 4
    • Question 6: How long have you been a University professor?
    • Question 7: What is your domain of research? [go to page 5]
  5. Page 5
    • Question 8: Tell us what you think of Moodle in your everyday teaching routine...
    • etc.
etc.
Average of ratings: -
In reply to Joseph Rézeau

Re: Skip logic feature available for testing

by Amir Elion -
Hi Joseph,
Looks great! When can we expect to have to available?
In reply to Joseph Rézeau

Re: Skip logic feature available for testing

by Nadav Kavalerchik -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
indeed ! a beautiful piece of work (code)

looking foreword to use it smile
In reply to Joseph Rézeau

Re: Skip logic feature available for testing

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
To anyone interested in testing the new "skip logic feature" on their own Moodle (test) site and savvy enough to apply patch files... You are welcome to use the attached patch file (against the latest current Questionnaire files available); you might have to upgrade to those latest files FIRST, before applying the patch); the Help file is to be put directly in your English lang. questionnaire folders.
Use at own risk, please do not use on a production server, use on a test server only.
Joseph
Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Skip logic feature available for testing

by Mat Cannings -
Hi Joseph,
I have just tried this and it seems to be working perfectly after running a few simple branching tests. I found the way it works a little confusing at first, I was expecting to manually control the page to jump to. After playing with it for a few moments it became clear how it worked and is pretty straightforward to implement.

To help others...

If you add a Y/N question type and set skip logic to yes then a yes answer will show the respondent the following page, a no answer will skip the following page. i.e. a person answering no on page 1 will next be taken to page 3, a person answering yes will get page 2 and then onto page 3

If you add a radio button or drop down menu question and select skip logic then conditional branching becomes active which shows one page per option. e.g. you have a radio button list with three options on page 1. A person selecting the 1st option would be next shown page 2 and then be taken to page 5 (skipping 3 and 4), a person selecting the 2nd option would skip page 2 and be shown page 3 then skip page 4 and then onto page 5.
So...
The first page after the skip logic question is shown only to people who select the first option.
The second page after the skip logic question is shown only to people who select the second option and so on.
You need to make sure you have one page per option when you use the conditional branching.

If you want a yes/no question with different pages shown for yes and no responses then this is actually a branching question with two options. So you would use a Radio Button type with yes as the 1st option and no as the 2nd.

In reply to Mat Cannings

Re: Skip logic feature available for testing

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Mat,
Thanks you for daring to test my "skip logic" feature. Congratulations for being the first (and only one so far...) to do so. I'm glad you managed to get it to work, in spite of it not being terribly user-friendly as it stands. In forthcoming Moodle 2.1, a brand-new Survey module will hopefully be available, combining the best features of Feedback and Questionnaire. I hope skip logic (and other new features) will be able to get incorporated in that new module.
Oh and thank you for the extra explanations you provided; they might tempt new testers to try their luck.
ATB
Joseph
PS.- Please not that you do not have to install a patch on your own moodle site, you can test the skip logic feature on my moodle test site, as explained in my original post at the top of this thread. Note that the pword for teacher1 has changed.
In reply to Joseph Rézeau

Re: Skip logic feature available for testing

by Wim Van Borm -

Hello,

We have tried to implement this new feature. But we get often white pages at the end of the skip logic.

  • first question is set to : skip logic yes - user must complete the question.

the question has 3 possible choices:

  • answer A
  • answer B
  • answer C

After these are answered the suer should continue with the other questions.

  • question 1
  • Page break
  • question 2 (continuation of answer A)
  • page break
  • question 3 (continiuation of aswer B)
  • page break
  • question 4 (continiuation of aswer C)
  • page break
  • question 5
  • question 6
  • etc...

what happens is that we get a white page after answere ing question 2 or 3 or 4 instead of getting to see question 5 and then 6. What are we doing wrong here?Can anyone help me with this?

Kind regards,

Wim

In reply to Wim Van Borm

Re: Skip logic feature available for testing

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Wim,
Can you reproduce the problem on my Moodle test site? Or can you backup the questionnaire you created (with skip logic) and email it to me (see my email in my Moodle profile) so I can test it?
Thanks,
Joseph