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
btw, if you remove the 1 and 100 from the new input boxes you will get the previous behavior... all responses are processed.