function webform_results_submissions in Webform 5.2
Same name and namespace in other branches
- 6.3 includes/webform.report.inc \webform_results_submissions()
- 6.2 webform_report.inc \webform_results_submissions()
- 7.4 includes/webform.report.inc \webform_results_submissions()
- 7.3 includes/webform.report.inc \webform_results_submissions()
Retrieve lists of submissions for a given webform.
1 call to webform_results_submissions()
- webform_results in ./
webform.module - Menu callback for all content under admin/content/webform.
File
- ./
webform_report.inc, line 15 - This file includes helper functions for creating reports for webform.module
Code
function webform_results_submissions($node, $user_filter, $pager_count) {
global $user;
if (isset($_GET['results']) && is_numeric($_GET['results'])) {
$pager_count = $_GET['results'];
}
$header = theme('webform_results_submissions_header', $node);
if ($user_filter) {
drupal_set_title(t('Submissions for %user', array(
'%user' => $user->name,
)));
$submissions = webform_get_submissions($node->nid, $header, $user->uid, $pager_count);
$count = webform_get_submission_count($node->nid, $user->uid);
}
else {
$submissions = webform_get_submissions($node->nid, $header, NULL, $pager_count);
$count = webform_get_submission_count($node->nid);
}
return theme('webform_results_submissions', $node, $submissions, $count, $pager_count);
}