Closed (fixed)
Project:
Survey
Version:
master
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2006 at 20:43 UTC
Updated:
10 Jul 2006 at 06:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
edrex commentedRemoved some commented code.
The line which calls formapi at the end of forms_field_form:
is commented, because I wasn't sure how to treat it. The formapi hooks aren't actually used by survey module.
Comment #2
DaveNotik commentedNew to patching. Got this:
Comment #3
edrex commentedCheck the header of each file and make sure that you have the versions listed above (should be the latest cvs head).
Lemme know otherwise, I'll see if I can coax diff into generating something more compatible. There is probably a doc on drupal.org somewhere that lays out standards for patch formats.
Comment #4
DaveNotik commentedI do have those exact versions, according to the header in the respective .module files.
(Trying to run the patch with only one of the two modules in my /patchfiles/ directory obviously results in an error too.)
Can you send me the patched 1.15 and 1.10 modules temporarily? I'd love to be able to get this working for this one project.
Thanks so much! I'll message you via your contact form to alert you of my reply as well.
--Dave
Comment #5
edrex commentedRecent changes to core broke forms module again. This updated patch was generated via `diff -up` as suggested in the section on patches in the "Developing for Drupal" handbook. Please review.
Comment #6
Kieg Khan commentedHello, I hope I am posting in the right place. I previously was using Drupal 4.6.5 and Forms & Survey, but I am trying Drupal 4.7.0 Beta 3 and the Forms & Survey do not work in that version. I have great interest in 4.7.x as it provides for more security and seems to operate a lot better than 4.6.5 on my IIS powered site.
What I have done is to use the Forms & Survey modules from 4.6.0 modules, created the applicable tables and changed the forms.module and survey.module in the following manner:
My forms.module is headed:
// $Id: forms.module,v 1.14.2.1 2005/10/24 20:47:07 walkah Exp $Which I am not sure is the same as the ones listed in the attachments on this post
Also, I have not yet worked out the diff process on Windows, so I made the assumption that all code with - in front means remove this code, while all code with + in front means add this code. I also assume that @@ means there is a break in the code and to jump to the next point where code is to be changed. If this is not correct, then I guess I need a lot of help.
When I try to access the module menu I get the following error:
Parse error: syntax error, unexpected '*' in c:\Inetpub\wwwroot\drupal4.7\modules\survey\survey.module on line 25
Call Stack
# Function Location
1 {main}() c:\Inetpub\wwwroot\drupal4.7\index.php:0
2 menu_execute_active_handler() c:\Inetpub\wwwroot\drupal4.7\index.php:15
3 call_user_func_array() c:\Inetpub\wwwroot\drupal4.7\includes\menu.inc:360
4 system_modules() c:\Inetpub\wwwroot\drupal4.7\includes\menu.inc:360
5 drupal_load() c:\Inetpub\wwwroot\drupal4.7\modules\system.module:903
I am sorry I am not a PHP programmer, but I would like to see if I can get these modules going under 4.7.x as they provide really good functionality.
When I use the straight 4.6.5 module, then the module can be activated and the survey appears in the Content->Create Content menu, but nothing happens when I try to create a survey. The forms and survey databases also remain un-altered.
If anyone has gotten this working under 4.7.x, is it possible to just have a file attachment of the working modules rather than the diff file? At least this would ensure that there was no error in my diff processing.
Thanks for any help,
Comment #7
Kieg Khan commentedHello, sorry for the previous post. I sat down and had another look at the error and it seems I had not included the /* on a comment line. The survey works now.
One other enhancement I would like to see with this would be to check the current user against users who have previously posted. This way a user could only submit a survey once (a check box in the survey design could be used to enable this checking feature).
I would see this as working with surveys that require a user to be logged in, but when the survey is open to anonymous users, then this check would be disabled.
I do not know how hard this would be to implement, but given that the user details are saved in the survey response and that the survey is IDed in the database, I would think it would be a simple check when the submit button is pressed or when the survey is originally opened. If you did the check immediately the survey was opened, then it might cause problems with the editor not being able to edit the survey if they had filled one in, so when the submit button is clicked would be the best time.
Thanks.
Comment #8
starflyer commentedthanks for updating this module. does the excel output work with the patch?
Comment #9
seanrexcel output works fine for me, but I'm still testing it. I have not found any other bugs in it yet (but haven't yet tested validation). +1 for this patch. I think this needs to be committed - 4.7 is almost out and we still don't have a 4.7 version of this module. It's time to change that. ;-)
Comment #10
evelien commentedcvs is showing me survey.module v1.11, which isn't working with 4.7beta6. Any news on when 1.11 will be updated? So I can decide what to do (try 1.10 with this patch or wait for the next edition of survey.module)
Comment #11
starflyer commentedhey sean. could you post your updated survey/forms modules? i'm using 4.7 and have the forms_survey_4_7_1.patch installed, but there are 2 critical issues:
- it isn't saving the results when i submit a survey
- excel download isn't working
Comment #12
jmiccolis commentedI just got forms and survey working on the 4.7rc. I used the patch above and made a bunch additional changes myself. Attached is a patch that should apply cleanly to forms.module,v 1.15 and survey.module,v 1.11
Comment #13
cvining commentedJust upgraded to Drupal 4.7. This patch worked perfectly for me. Thx so much!
Comment #14
DaveNotik commentedtablesort_pager() recently went, so it seems survey.module is once again broken on 4.7.0 -- can't export Excel file, and can't save a survey.
Comment #15
jmiccolis commentedyea, both node_validate_title() and tablesort_pager() have been removed. Thankfully updating a module for both these changes is pretty simple. http://drupal.org/node/22218#node_validate_title
I'll try to put another patch up this weekend.
Also, I'm raising this to critical as 4.7 is now the stable drupal release.
Comment #16
DaveNotik commentedThanks so much for the tip. :)
Changing line 384 from:
to:
did the trick for me.
--Dave
Comment #17
urbanfalcon commentedUsing jmiccolis's patch on CVS versions of forms and survey (forms.module,v 1.15 and survey.module,v 1.11) worked for me as well, although I did need to clean up that one tablesort_pager issue. Other than that, two thumbs up. Now forms and survey just need install files...
Comment #18
pcwick commentedI seem to have just learned how to patch files ha, ha, ha. And to think when I started all this I just wanted to make websites.
I used the the patch in message #12 by jmiccolis on survey.module v1.11 and forms.module v1.15. I split the patch into two files to reduce the number of errors that patch returned, ha.
I also included the install and database files in message #17 by urbanfalcon.
Database seems to have updated cleanly and everything seems to be working well except I cannot download excel files. I get a "page not found" error when I click on the "download to excel" link. Nice feature though not essential. I'm wondering if anyone else is still having difficulty downloading excel files, or if I missed something?
Thanks all for bringing this module up to speed.
Comment #19
seanrCan we PLEASE get this committed?
http://drupal.org/files/issues/forms_survey_4.7.patch
It's working just fine here!
Comment #20
Kimeros commentedThere appears to be a bug in the survey module which stops you from downloading the results in Excel format. This bug only occurs when all of the questions in the survey have the same Weight. The problem has been isolated to function survey_excel() - the code does not return from the following line if the weights are all the same:
while ($response = db_fetch_object($res)) {
This was with Drupal 4.7 and the patched version of the Survey module. MySQL version 4.0.24, PHP version 4.3.10-16
Comment #21
pcwick commentedI am unable to download an excel file even though the survey has weights assigned to the form items. Getting "Page Not Found" error.
Comment #22
Zack Rosen commentedTeste this patch. Everything works fine except for viewing the responses of a survey. The code was calling tablesort_pager() which has been removed. I added a fix for this to the patchfile.
Comment #23
robin monks commentedI tested Zack's copy of the patch on fresh HEAD copies of forms and survey, the patch b0rked:
Robin
Comment #24
Zack Rosen commentedThink I fixed it. Seems to work fine for me now...
Comment #25
crashpoint commentedhi i was going through the code submitted by zacker for the patch of survey_form. I want to thank you all for pooling in and make the necessary changes in the form module. However I am confused about one thing.
function forms_validate($form, $edit) {
Index: survey/survey.module
===================================================================
--- survey/survey.module (revision 246)
+++ survey/survey.module (revision 248)
@@ -28,10 +28,10 @@
}
The function forms_validate. What does that above part mean? As in I know that add the line survey/survey.module. But where is the code that needs to be replaced for the forms_validate function? We have to put the patches of forms and survey in 2 different modules.
I am not all that conversant with patching and know that the - lines are to be removed and + to be added.
thanks a lot for putting in so much effort for patching the modules. We all users really appreciate that.
Comment #26
seanrExcel export is broken with this patch. It seems to be getting stuck in a loop but I can;t figure out why. It ends up causing a memory limit error even with memory_limit set to 96MB.
Comment #27
seanrBTW, this problem is not related to the weights issue described above - mine are not all different since -5 to 5 is an insufficient range for the number of fields I've got (15), but they're not all the same either.
Comment #28
seanrThe attached patch fixes the excel export issue.
Comment #29
pcwick commentedThanks seanr. I'll try it as soon as I get a chance. Does your patch, Attachment: forms_survey_4_7_3.patch (18.24 KB), replace all the previous patches in this thread (except the install.zip file)?
Comment #30
robin monks commentedPatch fails:
http://pastebin.ca/67829
Survey patches correctly however.
Robin
Comment #31
puregin commentedFor what it's worth, here is a another patch of survey module only, (generated using
diff -u -F^f) based on edrex's original patch plus some of my fixes/cleanup.I'll attach a patch for
forms.modulein a separate issue for the forms module.Comment #32
jasonwhat commentedIs there a patched version of this up in CVS yet? If not (I don't see any cvs messages since Feb.) when can we expect it?
Comment #33
walkah commentedcommitted thanks all!
Comment #34
(not verified) commented