From: Roman J. <cit...@ma...> - 2002-03-18 12:09:20
|
Kon, this sound like a very good resolution to me, I hope it works for you=20 too. Just s suggestion. What you did for question type 100 is great, I=20= was in fact going to make a patch myself, but never got around it. I was=20= going to call it Section, but I guess Description works too. It's very cool what you're doing for ESP. If you ever need to talk about=20= it in real time I can e-mail you (off the list) my AIM and/or ICQ names=20= so we can communicate more effectively. Keep up the good work, -Roman On Monday, March 18, 2002, at 11:41 AM, angek productions wrote: > This sounds fine with me. > I'll use 100. > How about I call mine "Description". > > I'll also create a diff with my patches as send them to you in the = next > couple of days as I want to also see if I can make some changes to > the survey_export_csv file so that the "Descriptions" don't appear as > empty columns in the csv file. I'll also include an updated Help file > explaining > things. > > Yes I am interested in doing many more fixes and adding new features = so > I'll organise my account asap. > > > Kon > > -----Original Message----- > From: James E. Flemer [mailto:jf...@ac...] > Sent: Monday, 18 March 2002 3:49 PM > To: php...@li... > Cc: Roman Jasins; angek productions > Subject: Re: [phpesp-general] RE: Adding Descriptive text in a survey. > > > Haha... this is fun. Ok, Roman, you keep using #11, and > Kon, please use #100 (yes that big). Since there is no user response = to > Kon's "Statement" it should be in the same catagory as a "Page Break". > As far as the names, since you both independantly picked "Statement" = -- > you figure it out. I cannot come up with a different name for either = of > you, so if you have any alternates let me know. > > Kon, if you are interested in doing many more fixes, get a SF.net > account and then email me off list and I will give you CVS access so = you > can work directly. > > -James > > > On Sun, 17 Mar 2002, Roman Jasins wrote: > >> Good job there, but we have a problem now. There is another branch >> that is being developed for ESP where Statement question is being >> used for something else. In fact it has the same id(11). This = presents > >> a problem for the developers. I guess the solution would be to = discuss > >> details with James first, since he is the Chief Yahoo here, and than >> put in a developers list on the SF.net. This way we should be able to >> make sure that no one will have to go back and rewrite his code. >> >> -Roman >> >> >> On Sunday, March 17, 2002, at 01:20 PM, angek productions wrote: >> >>> All, >>> =A0 >>> =A0=A0=A0 There are a few other files that need to be changed that I = have >>> not mentioned. >>> =A0=A0=A0 The changes mentioned below (in my original post)=A0suppress= a >>> question number from appearing >>> =A0=A0=A0 next to the Statement, however this means that=A0the next = valid >>> question will appear to not >>> =A0=A0=A0 have a consecutive Question number appearing next to it. >>> =A0=A0=A0 for example, >>> =A0=A0=A0=A0=A0=A0=A0 assume our survey has 5 questions which = includes the >>> Statement. >>> =A0=A0=A0=A0=A0=A0=A0 If our Statement is question 3 then our survey = will show the >>> following: >>> =A0=A0=A0=A0=A0=A0=A0 (1) Question text >>> =A0=A0=A0=A0=A0=A0=A0 (2) Question text >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Statement >>> =A0=A0=A0=A0=A0=A0=A0 (4) Question text >>> =A0=A0=A0=A0=A0=A0=A0 (5) Question text >>> =A0 >>> =A0=A0=A0To correct this the code should be: >>> =A0 >>> =A0=A0=A0 <?php >>> =A0=A0=A0 if ($tid !=3D '11') >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = echo ("<A NAME=3D\"Q($i)\">($i).</A>"); >>> =A0=A0=A0=A0else >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0$i--; >>> =A0=A0=A0 ?> >>> =A0 >>> =A0=A0=A0 Once this is done you will notice that=A0viewing survey = results, >>> and viewing a survey report will >>> =A0=A0=A0not be consistent with the above ammendment so the = following >>> further changes need to be made >>> =A0=A0=A0to provide consistency through the entire phpesp package. >>> =A0 >>> =A0=A0=A0The following files must be changed: >>> =A0=A0=A01- /lib/esphtml.results.inc >>> =A0=A0=A02- /function/survey_results.inc >>> =A0=A0=A03- /function/survey_report.inc >>> =A0=A0=A04- /function/survey_merge.inc >>> =A0 >>> =A0=A0=A0Changes to esphtml.results.inc >>> =A0=A0=A0=A0=A0=A0=A0 line 188 : function >>> mkreslist($counts,$total,$precision,$showTotals) { >>> =A0=A0=A0=A0=A0=A0=A0 should be changed to : function >>> mkreslist($counts,$total,$precision,$showTotals,$tid) { >>> =A0 >>> =A0=A0=A0=A0=A0=A0=A0 after line 191: <table width=3D"90%" = border=3D"0" >>> cellpadding=3D"1"> >>> =A0=A0=A0=A0=A0=A0=A0 add the following: >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <?php if ($tid !=3D '11') >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 echo = "<tr><th >>> align=3D\"left\">#</th><th>Response</th></tr>"; ?> >>> =A0=A0=A0=A0=A0=A0=A0then delete / comment out the line: <tr><th > align=3D"left"><?php >>> echo(_('#')); ?></th><th><?php echo(_('Response')); ?></th></tr> >>> =A0 >>> =A0=A0=A0Changes to survey_results.inc >>> =A0=A0=A0=A0=A0=A0=A0 on about line 167 you should find the = following 2 lines: >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <tr xbgcolor=3D"<?php echo($bg); = ?>"> >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <td> >>> =A0=A0=A0=A0=A0=A0=A0 add the following straight after the above = lines: >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <?php >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if ($tid !=3D '11') >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 echo ("<A = NAME=3D\"Q($i)\">($i).</A>"); >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 $i--; >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ?> >>> =A0=A0=A0=A0=A0=A0=A0 then delete / comment out the line: >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <A NAME=3D"Q<?php echo($i); = ?>"><?php echo($i); ?>.</A> >>> =A0 >>> =A0=A0=A0=A0=A0=A0=A0 on about line 324: >>> mkreslist($counts,$total,$precision,$showTotals); >>> =A0=A0=A0=A0=A0=A0=A0 change this to : >>> mkreslist($counts,$total,$precision,$showTotals,$tid); >>> =A0=A0=A0 Changes to survey_report.inc >>> =A0=A0=A0=A0=A0=A0=A0 on about line 85: <tr bgcolor=3D"<?php = echo($bg); ?>"> >>> =A0=A0=A0=A0=A0=A0=A0 add the following straight after this line: >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <?php >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if ($tid !=3D '11'){ >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 echo "<td = align=3D\"right\">$i</td>"; >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else{ >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 $i--; >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 echo "<td = align=3D\"right\"></td>"; >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } >>> >>> =A0=A0=A0=A0=A0=A0=A0?> >>> >>> =A0=A0=A0=A0=A0=A0=A0 then delete / comment out=A0the following = line: >>> >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0<td align=3D"right"><?php echo($i); = ?></td> >>> >>> Finally, >>> >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 just to be consistent with the = changes made to the >>> mkreslist function in both esphtml.results.inc and >>> survey_results.inc we need to make the same change to the >>> survey_merge file. >>> >>> =A0=A0=A0=A0=A0=A0=A0 line = 350:mkreslist($counts,$total,$precision,$showTotals); >>> needs to be changed to: >>> >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = mkreslist($counts,$total,$precision,$showTotals, >>> $tid); >>> >>> =A0 >>> >>> This should be all. If you have any problems with these changes post > >>> them here....... >>> >>> Kon >>> >>> >>> =A0 >>> >>> -----Original Message----- >>> From: Kon Angelopoulos [mailto:ang...@ip...] >>> Sent: Sunday, 17 March 2002 7:40 PM >>> To: an...@cp... >>> Subject: FW: Adding Descriptive text in a survey. >>> >>> >>> >>> =A0-----Original Message----- >>> From: =A0 Kon Angelopoulos [mailto:ang...@ip...] >>> Sent:=A0=A0 Sunday, 17 March 2002 7:10 PM >>> To:=A0=A0=A0=A0 'php...@li...' >>> Subject:=A0=A0=A0=A0=A0=A0=A0 Adding Descriptive text in a survey. >>> >>> Hi All, >>> >>> =A0=A0=A0=A0=A0=A0=A0 One of the features I needed phpesp to have = was the ability >>> of adding descriptive text in a survey without having it >>> >>> =A0=A0=A0=A0=A0=A0=A0 be a question. I've also noticed that this has = also appeared > >>> in the feature requests so I decided to do this myself. >>> >>> =A0=A0=A0=A0=A0=A0=A0 Here are the steps. >>> >>> =A0=A0=A0=A0=A0=A0=A0 1. log into the phpesp database and issue the = following sql >>> statement: >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 " insert into = question_type >>> values(11,'Statement','N','response_text'); " >>> =A0=A0=A0=A0=A0=A0=A0 >>> =A0=A0=A0=A0=A0=A0=A0 2. now edit the = /admin/include/function/survey_render.inc >>> file. >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0A:/ >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 go to line 85. >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 the original line = (version 1.5) is: >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = <?php if($question['required']=3D=3D'Y') >>> { echo('<font color=3D"#FF0000">*</font>'); } ?><A NAME=3D"Q<?php > echo($i); >>> ?>"><?php echo($i); ?>.</A> >>> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 change this line to: >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 <?php = if($question['required']=3D=3D'Y') { echo('<font >>> color=3D"#FF0000">*</font>'); } ?> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 and then add the = following line 4 lines: >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 <?php >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 if ($tid !=3D '11') >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = echo ("<A NAME=3D\"Q($i)\">($i).</A>"); >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 ?> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 This ensures that the = Statement does not have a >>> Question number displayed next to it. >>> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 B:/ >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 The next step is to find = the following line: >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 <td valign=3D"TOP" = aligh=3D"LEFT"> - this should be line > >>> 87 in the original file or line 91 if you've added the above code. >>> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 change it to: >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 <td valign=3D"TOP" = aligh=3D"LEFT" width=3D"95%"> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 This will prevent large = descriptive text or >>> statements from messing up the formatting of your survey. >>> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 and that is all=85=85 >>> =A0=A0=A0=A0=A0=A0=A0 >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 Simply create or edit a = survey, go to the Question >>> tab where you will notice the new item "Statement" in the New >>> Field's >>> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 type dropdown list and = enter your statement in the >>> Text's text field. >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 There can not be any = possible answers to this >>> statement so you do not need to fill in the rest of the fields in >>> the Question >>> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 tab page. >>> >>> =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 Enjoy ! >>> Regards >>> Kon Angelopoulos >>> >> >> >> _______________________________________________ >> phpESP-general mailing list php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpesp-general >> > > > > _______________________________________________ > phpESP-general mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-general |