-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RM - Update Resilience Survey Results Presentation #1402
base: develop
Are you sure you want to change the base?
Conversation
$header["question_$i"] = t('Question @number', ['@number' => $i]); | ||
} | ||
|
||
$query = db_select('node', 'n') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right query for the requirements.
What we want is to load the surveys, and process them.
So, the steps are:
- Generate appropriate
EntityFieldQuery()
- since there may be many results, use partial loading in batches. - Load the surveys with
node_load_multiple()
. - Process the answers.
See hedley_activity_handle_child_zscores()
as an example.
); | ||
|
||
for ($i = 1; $i <= 12; $i++) { | ||
$header["question_$i"] = t('Question @number', ['@number' => $i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=>t('Q@number', ['@number' => $i]);
|
||
// Output the CSV content. | ||
echo $csv_output; | ||
exit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anvmn yes they need to analysis the data on excel sheet and create some diagrams from it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Diama1 I mean is exit;
really needed;
#1400