Module Does Not Work With Latest Release of Webform
bfdexp - May 25, 2008 - 22:47
| Project: | Webform (Show Own Form Results) |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Description
The April release of Webform does not work with this module. It generates an error when attempting to load a page....

#1
Here's an version of webform_own_results_results() that seems to work with the new webform module. It's barely tested so use with caution.
<?php
function webform_own_results_results() {
//drupal_set_message("welcome to webform_own_results_results");
include_once (drupal_get_path('module', 'webform')."/webform_submissions.inc");
include_once (drupal_get_path('module', 'webform')."/webform_report.inc");
$nid= arg(1);
$node= node_load(array('nid' => $nid));
$title= $node->title;
drupal_set_title($title);
if (arg(2) == 'ownresults') {
//drupal_set_message("Looking for ownresults");
switch (arg(3)) {
case 'analysis' :
$content= webform_results_analysis($node);
break;
case 'clear' :
$content= drupal_get_form('_webform_results_clear', $nid);
break;
case 'delete' :
$sid= arg(4);
$content= drupal_get_form('_webform_submission_delete', $nid, $sid);
break;
case 'table' :
$content= webform_results_table($node);
break;
case 'download' :
$content= webform_results_download($node);
break;
case 'submissions' :
default :
//drupal_set_message("looking to show submissions");
$content= webform_results_submissions($node);
break;
}
return $content;
}
}
?>
#2
This patch worked for me.
I'm using:
Drupal 5.10
Webform 5.x-2.1.3
Thank you very much!
#3
Attached is a patch file that implements the above code as well as code that allows the "own webform" user to see the individual results. Not edit individual results, just view them.
This works for me using:
Drupal 5.10
Webform 5.x-2.1.3
I also cleaned up some of the code and ran it through coder module so it is now compliant with Drupal coding standards.
#4
The module nor the patch is not working for me. for some reason it is still trying to find webform.inc even with it not in the module. I even tried deleting everything out off the module and i get an error on line 81 still. When i run the update script it doesn't show up on the list of modules. I've deleted the module and reinstalled and still nothing. How were you able to get this module working?
#5
Its working for me too :-)