HELP download in text format not working

HELP download in text format not working

od Christopher Toker -
Število odgovorov: 20

HELP, i am currently trying to download my responses in a text format but it is timing out, tried it from a few netwoked machines and peoples home machines and still no joy, CAN SOME ONE HELP PLEASE

chris

Povprečje ocenitev: -
V odgovor na Christopher Toker

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
About how many questions do you have in that questionnaire and how many people responded to it?
V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Christopher Toker -

there are 147 respondents and about 90 questions in total.

chris

V odgovor na Christopher Toker

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
That's more than 13 000 items to process; that is a lot!
Could you check and try to increase in php.ini
max_execution_time = ??? ; Maximum execution time of each script, in seconds
Joseph

V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Christopher Toker -

i dont mean to be a bother, but i am a newbie to this, how would i go about changing the php.ini

also is there any way to set up a questionnaire to cut down on the number of items to process as some of the questionnaires we are setting up have a lot more users.

thanks

chris

V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Christopher Toker -

hi i have gone into the site, amd a fellow moodeler told me to changes the max execution time on the htaccess file, could you tell me which one as i found about 5 different ones. 

thanks

chris toker

V odgovor na Christopher Toker

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
Hi Chris,
You will find it in your php.ini file
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 180 ; Maximum execution time of each script, in seconds
max_input_time = 180 ; Maximum amount of time each script may spend parsing request data
memory_limit = 100M ; Maximum amount of memory a script may consume (40MB)
--------
If you still have a problem with this, please ask for help in the General Problems forum on moodle.org.
Joseph
V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Christopher Toker -

Hi Joseph,

i made the above changes but i still can not get the data from my moodle site, is there any other way i can extract it.

thanks

chris

V odgovor na Christopher Toker

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
Hi
Did you try to increase the values? Which values did you put in?
Joseph
V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Christopher Toker -

#php_value upload_max_filesize 4M
#php_value post_max_size 4M
#php_value session.gc_maxlifetime 0
php_value max_execution_time 1200
php_value max_input_time 720
php_value memory_limit 256M

i am tweeking the numbers, but it is timing out still.  your help is much appreciated on this matter.

many thanks

chris

V odgovor na Christopher Toker

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
You could try this workaround. Divide the 147 students of that course into groups (5 or 6 groups maybe). In your questionnaire settings, set it to Groups Separate. On the View all responses, view the groups separately and export them as text one by one. Then, in your spreadsheet, import all the groups and, if needed, re-assemble them into one unique sheet.
Joseph
V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Christopher Toker -

YEAH that worked, will i still be able to use this work around on a survey fopr example 1000 users with 90questions on there.  thanks for your help again

chris

V odgovor na Christopher Toker

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
... that's a grand total of 90,000 items to process ! amazing ! Well, you might have to break up your course students into maybe 20 or more groups, and that would mean very tiresome export operation, but there is no reason it should not work out...
Keep us posted, please.
V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Christopher Toker -

i will keep you postd sir, we are doing some bit data grabs over the next few weeks, we are also working on a program hear to throw all the data back together.

as soon as i have news i will post.

1000 thanks again for your halp

chris

V odgovor na Christopher Toker

Re: HELP download in text format not working

od Nadav Kavalerchik -
Slika Core developers Slika Plugin developers Slika Testers Slika Translators
We have similar issue with 8500 users answering 6 multi rank questions with 5 inner questions each.

It just hangs žalosten

and we used greater values in the php.ini file than the ones you suggested.

I think it will require some sql optimizations...
V odgovor na Nadav Kavalerchik

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
I'm afraid the Moodle Questionnaire plugin was never built expecting such a vast amount of data to process. However, have you tried the workaround I suggested to Christopher?
V odgovor na Joseph Rézeau

תשובה ל: Re: HELP download in text format not working

od Irith Herman -

we did it but its not a good solution for us. we exported it to 40 groups

and now we have to put them all together its not a good idea.

V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Nadav Kavalerchik -
Slika Core developers Slika Plugin developers Slika Testers Slika Translators
well... (finally)

i helped Irit Herman patch the code in such a way the she could, now, divide the workload.

basically i added SQL "LIMIT $limitfrom , $limitnum ;" to the end of the SQL statement that is
responsible for building the user's responses list.

to patch:

open report.php and inside the section of "case 'dwnpg':"
just after the line:

print_checkbox('choicetext', 1, true, get_string('includechoicetext', 'questionnaire'));
echo "<br />\n";

add:

echo get_string('limitfrom', 'questionnaire');
print_textfield('limitfrom', 1, get_string('limitfrom', 'questionnaire'));
echo "<br />\n";
echo get_string('limitnum', 'questionnaire');
print_textfield('limitnum', 100, get_string('limitnum', 'questionnaire'));
echo "<br />\n";

which will add those two input field boxes for $limitfrom and $limitnum parameters i mentioned earlier.

now, open locallib.php

change function function generate_csv($rid='', $userid='', $choicecodes=1, $choicetext=0)

to:

function generate_csv($rid='', $userid='', $choicecodes=1, $choicetext=0,$limitfrom='',$limitnum='')

inside " if ($rid) { " change the line:
if (!($records = get_records_select('questionnaire_response', $select, 'submitted', $fields))) {

to:

if (!($records = get_records_select('questionnaire_response', $select, 'submitted', $fields,$limitfrom,$limitnum))) {

and just BEFORE :

if (!($records = get_records_sql($sql))) {

add:

if ($limitfrom != '' OR $limitnum != '' ) {
$sql .= " LIMIT $limitfrom , $limitnum ";
}


that's it ! your done nasmeh

btw, if you remove the 1 and 100 from the new input boxes you will get the previous behavior... all responses are processed.
V odgovor na Nadav Kavalerchik

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
Hi Nadav,
Thanks for this interesting feature. You were missing a couple of lines in the report.php file, as well as the correct start number (must be 0 to start from 1). I have attached a patch against current version of questionnaire for moodle 1.9 which I have tested and it should work.
I will also open a bug report in the tracker for interested people to vote.
ATB
Joseph
V odgovor na Joseph Rézeau

Re: HELP download in text format not working

od Nadav Kavalerchik -
Slika Core developers Slika Plugin developers Slika Testers Slika Translators
Hi Joseph nasmeh

Indeed i was žalosten . i forgot to copy them from the code.

Please submit the MDL after you open a bug report.
so i can see that we have similar code, after all.

I might be missing more code since it was a very (very) quick hack.
and it should be tested.

(We were/are in a little bit of a hurry. with the reports.
as we always are, here in Israel)

i have some more patches for the Questionnaire.
i will open MDLs for them too and notify you as well.

Thanks nasmeh
V odgovor na Nadav Kavalerchik

Re: HELP download in text format not working

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators
Created CONTRIB-1738 for which you can vote. Have attached to it the same patch attached to my previous e-mail, based on your contribution.
Thanks for re-testing and reporting in this thread as well as in the bug tracker.
Joseph