Skip to content
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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Diama1
Copy link
Collaborator

@Diama1 Diama1 commented Jan 28, 2025

@Diama1
Copy link
Collaborator Author

Diama1 commented Jan 28, 2025

surveyreport

@Diama1
Copy link
Collaborator Author

Diama1 commented Jan 28, 2025

Screenshot from 2025-01-28 17-54-28

$header["question_$i"] = t('Question @number', ['@number' => $i]);
}

$query = db_select('node', 'n')
Copy link
Collaborator

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:

  1. Generate appropriate EntityFieldQuery() - since there may be many results, use partial loading in batches.
  2. Load the surveys with node_load_multiple().
  3. 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]);
Copy link
Collaborator

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed?

Copy link
Collaborator Author

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.

Copy link
Collaborator

@anvmn anvmn Feb 2, 2025

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants