Extracting answers from questionnaire

Extracting answers from questionnaire

by Fong Yee Chua -
Number of replies: 9

I wanted to know how can I extract the answers users provide for the questionnaire from the codes so that i can use it for analysis on another php page. Have been browsing through the codes and found arrays but I am not really sure which are the ones.

Average of ratings: -
In reply to Fong Yee Chua

Re: Extracting answers from questionnaire

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
The easiest way to have access to the respondents' answers is to use the Download as text (CSV) feature. I don't understand what you mean by "analysis on another php page".
Joseph
In reply to Joseph Rézeau

Re: Extracting answers from questionnaire

by Fong Yee Chua -
I dont want an external file for the answers. I wanted the data to be passed through to another page where i can play with the data to create graphs etc.
In reply to Fong Yee Chua

Re: Extracting answers from questionnaire

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
You can examine the code in questionnaire/locallib, especially function survey_results() and call that function to produce your own code.
In reply to Joseph Rézeau

Re: Extracting answers from questionnaire

by Clare Wallace -

Dear Joseph/All

I am having a really hard time downloading a q'aire to CSV format - here is the really crazy part of it..........I created the q'aire and used the sharing cart to move it to other courses. In the other courses I can download the results to CSV but in the orginal one I cant!...............any ideas about what is going on.

I click on Download and it circles back to the original results summary again!

Thank you

Clare

In reply to Clare Wallace

Re: Extracting answers from questionnaire

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

Clare "I created the questionnaire and used the sharing cart to move it to other courses...".

Sorry, but I have no idea what that means. Could you be more explicit and give use an exact step-by-step of what you did?

TIA

Joseph

In reply to Joseph Rézeau

Re: Extracting answers from questionnaire

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi Clare; Joseph.
Joseph - the sharing cart is a contributed module that enables you quickly to move/copy items between courses - it's here
Clare - I can't help with the issue sorry but I am wondering why you chose to use the sharing cart instead of saving the questionnaire as a template or a public questionnaire to use elsewhere- and I am wondering also if duplicating it this way might have had an effect on the way the responses are appearing (or not)?
Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Extracting answers from questionnaire

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

Mary,

Thanks for clarifying.

Clare, please answer Mary's query as to why you resorted to the sharing cart rather than using the "template" or "public" questionnaire feature.

Joseph

In reply to Joseph Rézeau

Re: Extracting answers from questionnaire

by Clare Wallace -
Dear Mary and Joseph

I fess up that I didn't know about those options and the sharing cart has worked well till now. How can I redeem this situation now though as alot of work has gone into creating the questionaires and I need to download the results??? I will henceforth use the pubic option (which I actually did learn about today!)

The thing is that its the original q'aire that wont allow me to download - though in other courses where I use the sharing cart it will allow me to download from the original so I dont think it is a sharing cart issue!

Thank you both................always on the Moodle learning curve!

Clare xxx
In reply to Clare Wallace

Re: Extracting answers from questionnaire

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Claire,
Since I do not use the sharing cart I cannot reproduce your problem and am afraid I cannot help.
Joseph