From: angek p. <ang...@ip...> - 2002-03-17 11:20:47
|
All, There are a few other files that need to be changed that I have not mentioned. The changes mentioned below (in my original post) suppress a question number from appearing next to the Statement, however this means that the next valid question will appear to not have a consecutive Question number appearing next to it. for example, assume our survey has 5 questions which includes the Statement. If our Statement is question 3 then our survey will show the following: (1) Question text (2) Question text Statement (4) Question text (5) Question text To correct this the code should be: <?php if ($tid != '11') echo ("<A NAME=\"Q($i)\">($i).</A>"); else $i--; ?> Once this is done you will notice that viewing survey results, and viewing a survey report will not be consistent with the above ammendment so the following further changes need to be made to provide consistency through the entire phpesp package. The following files must be changed: 1- /lib/esphtml.results.inc 2- /function/survey_results.inc 3- /function/survey_report.inc 4- /function/survey_merge.inc Changes to esphtml.results.inc line 188 : function mkreslist($counts,$total,$precision,$showTotals) { should be changed to : function mkreslist($counts,$total,$precision,$showTotals,$tid) { after line 191: <table width="90%" border="0" cellpadding="1"> add the following: <?php if ($tid != '11') echo "<tr><th align=\"left\">#</th><th>Response</th></tr>"; ?> then delete / comment out the line: <tr><th align="left"><?php echo(_('#')); ?></th><th><?php echo(_('Response')); ?></th></tr> Changes to survey_results.inc on about line 167 you should find the following 2 lines: <tr xbgcolor="<?php echo($bg); ?>"> <td> add the following straight after the above lines: <?php if ($tid != '11') echo ("<A NAME=\"Q($i)\">($i).</A>"); else $i--; ?> then delete / comment out the line: <A NAME="Q<?php echo($i); ?>"><?php echo($i); ?>.</A> on about line 324: mkreslist($counts,$total,$precision,$showTotals); change this to : mkreslist($counts,$total,$precision,$showTotals,$tid); Changes to survey_report.inc on about line 85: <tr bgcolor="<?php echo($bg); ?>"> add the following straight after this line: <?php if ($tid != '11'){ echo "<td align=\"right\">$i</td>"; } else{ $i--; echo "<td align=\"right\"></td>"; } ?> then delete / comment out the following line: <td align="right"><?php echo($i); ?></td> Finally, 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. line 350:mkreslist($counts,$total,$precision,$showTotals); needs to be changed to: mkreslist($counts,$total,$precision,$showTotals, $tid); This should be all. If you have any problems with these changes post them here....... Kon -----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. -----Original Message----- From: Kon Angelopoulos [ <mailto:ang...@ip...> mailto:ang...@ip...] Sent: Sunday, 17 March 2002 7:10 PM To: 'php...@li...' Subject: Adding Descriptive text in a survey. Hi All, One of the features I needed phpesp to have was the ability of adding descriptive text in a survey without having it be a question. I've also noticed that this has also appeared in the feature requests so I decided to do this myself. Here are the steps. 1. log into the phpesp database and issue the following sql statement: " insert into question_type values(11,'Statement','N','response_text'); " 2. now edit the /admin/include/function/survey_render.inc file. A:/ go to line 85. the original line (version 1.5) is: <?php if($question['required']=='Y') { echo('<font color="#FF0000">*</font>'); } ?><A NAME="Q<?php echo($i); ?>"><?php echo($i); ?>.</A> change this line to: <?php if($question['required']=='Y') { echo('<font color="#FF0000">*</font>'); } ?> and then add the following line 4 lines: <?php if ($tid != '11') echo ("<A NAME=\"Q($i)\">($i).</A>"); ?> This ensures that the Statement does not have a Question number displayed next to it. B:/ The next step is to find the following line: <td valign="TOP" aligh="LEFT"> - this should be line 87 in the original file or line 91 if you've added the above code. change it to: <td valign="TOP" aligh="LEFT" width="95%"> This will prevent large descriptive text or statements from messing up the formatting of your survey. and that is all.. Simply create or edit a survey, go to the Question tab where you will notice the new item "Statement" in the New Field's type dropdown list and enter your statement in the Text's text field. 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 tab page. Enjoy ! Regards Kon Angelopoulos |
From: Kon A. <an...@cp...> - 2002-03-17 21:25:08
|
Thanks Roman, A developers list on SF.net would be extremely beneficial because some = of the other=20 things I am or others are developing for this tool may already be in = development and if I=20 could contribute to this development I would be glad to. Some of the things I'm working on include: 1/ Viewing results per respondent 2/ Style templates for surveys 3/ cross analysis - after you showed me how its done I quickly figured = out that you can only pass a single qid on the query string although you are not = limited with the number of cods passed so I made changes to my version of phpesp and = can now peform cross analysis using multiple qid values as well. I look forward to learning of James' decision .......... Kon Angelopoulos |
From: Roman J. <cit...@ma...> - 2002-03-17 12:11:39
|
Good job there, but we have a problem now. There is another branch that=20= is being developed for ESP where Statement question is being used for=20= something else. In fact it has the same id(11). This presents a problem=20= for the developers. I guess the solution would be to discuss details=20 with James first, since he is the Chief Yahoo here, and than put in a=20 developers list on the SF.net. This way we should be able to make sure=20= 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=20 > mentioned. > =A0=A0=A0 The changes mentioned below (in my original post)=A0suppress = a=20 > question number from appearing > =A0=A0=A0 next to the Statement, however this means that=A0the next = valid=20 > 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=20 > 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 > =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=20 > viewing a survey report will > =A0=A0=A0not be consistent with the above ammendment so the following = further=20 > 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=20 > mkreslist($counts,$total,$precision,$showTotals) { > =A0=A0=A0=A0=A0=A0=A0 should be changed to : function=20 > 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=20 > 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=20 > 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:=20 > mkreslist($counts,$total,$precision,$showTotals); > =A0=A0=A0=A0=A0=A0=A0 change this to :=20 > 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=20 > mkreslist function in both esphtml.results.inc and survey_results.inc=20= > 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);=20 > 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=20= > them here....... > > Kon=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 > > > =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=20 > 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=20 > 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=20 > statement: > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 " insert into = question_type=20 > 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')=20 > { echo('<font color=3D"#FF0000">*</font>'); } ?><A NAME=3D"Q<?php = echo($i);=20 > ?>"><?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=20 > 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=A0=A0 This ensures that the = Statement does not have a=20 > 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=20 > 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=20 > 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=20 > 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=20 > 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=20 > 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 > |
From: James E. F. <jf...@ac...> - 2002-03-18 04:49:06
|
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, > > > > There are a few other files that need to be changed that I have not > > mentioned. > > The changes mentioned below (in my original post) suppress a > > question number from appearing > > next to the Statement, however this means that the next valid > > question will appear to not > > have a consecutive Question number appearing next to it. > > for example, > > assume our survey has 5 questions which includes the Statement. > > If our Statement is question 3 then our survey will show the > > following: > > (1) Question text > > (2) Question text > > Statement > > (4) Question text > > (5) Question text > > > > To correct this the code should be: > > > > <?php > > if ($tid != '11') > > echo ("<A NAME=\"Q($i)\">($i).</A>"); > > else > > $i--; > > ?> > > > > Once this is done you will notice that viewing survey results, and > > viewing a survey report will > > not be consistent with the above ammendment so the following further > > changes need to be made > > to provide consistency through the entire phpesp package. > > > > The following files must be changed: > > 1- /lib/esphtml.results.inc > > 2- /function/survey_results.inc > > 3- /function/survey_report.inc > > 4- /function/survey_merge.inc > > > > Changes to esphtml.results.inc > > line 188 : function > > mkreslist($counts,$total,$precision,$showTotals) { > > should be changed to : function > > mkreslist($counts,$total,$precision,$showTotals,$tid) { > > > > after line 191: <table width="90%" border="0" cellpadding="1"> > > add the following: > > <?php if ($tid != '11') > > echo "<tr><th > > align=\"left\">#</th><th>Response</th></tr>"; ?> > > then delete / comment out the line: <tr><th align="left"><?php > > echo(_('#')); ?></th><th><?php echo(_('Response')); ?></th></tr> > > > > Changes to survey_results.inc > > on about line 167 you should find the following 2 lines: > > <tr xbgcolor="<?php echo($bg); ?>"> > > <td> > > add the following straight after the above lines: > > <?php > > if ($tid != '11') > > echo ("<A NAME=\"Q($i)\">($i).</A>"); > > else > > $i--; > > ?> > > then delete / comment out the line: > > <A NAME="Q<?php echo($i); ?>"><?php echo($i); ?>.</A> > > > > on about line 324: > > mkreslist($counts,$total,$precision,$showTotals); > > change this to : > > mkreslist($counts,$total,$precision,$showTotals,$tid); > > Changes to survey_report.inc > > on about line 85: <tr bgcolor="<?php echo($bg); ?>"> > > add the following straight after this line: > > <?php > > if ($tid != '11'){ > > echo "<td align=\"right\">$i</td>"; > > } > > else{ > > $i--; > > echo "<td align=\"right\"></td>"; > > } > > > > ?> > > > > then delete / comment out the following line: > > > > <td align="right"><?php echo($i); ?></td> > > > > Finally, > > > > 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. > > > > line 350:mkreslist($counts,$total,$precision,$showTotals); > > needs to be changed to: > > > > mkreslist($counts,$total,$precision,$showTotals, $tid); > > > > > > > > This should be all. If you have any problems with these changes post > > them here....... > > > > Kon > > > > > > > > > > -----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. > > > > > > > > -----Original Message----- > > From: Kon Angelopoulos [mailto:ang...@ip...] > > Sent: Sunday, 17 March 2002 7:10 PM > > To: 'php...@li...' > > Subject: Adding Descriptive text in a survey. > > > > Hi All, > > > > One of the features I needed phpesp to have was the ability of > > adding descriptive text in a survey without having it > > > > be a question. I've also noticed that this has also appeared in > > the feature requests so I decided to do this myself. > > > > Here are the steps. > > > > 1. log into the phpesp database and issue the following sql > > statement: > > " insert into question_type > > values(11,'Statement','N','response_text'); " > > > > 2. now edit the /admin/include/function/survey_render.inc file. > > A:/ > > go to line 85. > > the original line (version 1.5) is: > > <?php if($question['required']=='Y') > > { echo('<font color="#FF0000">*</font>'); } ?><A NAME="Q<?php echo($i); > > ?>"><?php echo($i); ?>.</A> > > > > change this line to: > > <?php if($question['required']=='Y') { echo('<font > > color="#FF0000">*</font>'); } ?> > > and then add the following line 4 lines: > > <?php > > if ($tid != '11') > > echo ("<A NAME=\"Q($i)\">($i).</A>"); > > ?> > > This ensures that the Statement does not have a > > Question number displayed next to it. > > > > B:/ > > The next step is to find the following line: > > <td valign="TOP" aligh="LEFT"> - this should be line 87 > > in the original file or line 91 if you've added the above code. > > > > change it to: > > <td valign="TOP" aligh="LEFT" width="95%"> > > This will prevent large descriptive text or statements > > from messing up the formatting of your survey. > > > > and that is all > > > > Simply create or edit a survey, go to the Question tab > > where you will notice the new item "Statement" in the New Field's > > > > type dropdown list and enter your statement in the > > Text's text field. > > 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 > > > > tab page. > > > > Enjoy ! > > Regards > > Kon Angelopoulos > > > > > _______________________________________________ > phpESP-general mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-general > |
From: angek p. <ang...@ip...> - 2002-03-18 09:41:56
|
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...]=20 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=20 > that is being developed for ESP where Statement question is being=20 > 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=20 > put in a developers list on the SF.net. This way we should be able to=20 > 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=20 > > not mentioned. > > =A0=A0=A0 The changes mentioned below (in my original = post)=A0suppress a=20 > > question number from appearing > > =A0=A0=A0 next to the Statement, however this means that=A0the next = valid=20 > > 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=20 > > 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,=20 > > and viewing a survey report will > > =A0=A0=A0not be consistent with the above ammendment so the = following=20 > > 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"=20 > > 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:=20 > > mkreslist($counts,$total,$precision,$showTotals); > > =A0=A0=A0=A0=A0=A0=A0 change this to :=20 > > 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=20 > > mkreslist function in both esphtml.results.inc and=20 > > survey_results.inc we need to make the same change to the=20 > > 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,=20 > > $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=20 > > 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=20 > > 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=20 > > 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=20 > > 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=20 > > 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=20 > > tab where you will notice the new item "Statement" in the New=20 > > 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=20 > > 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=20 > > statement so you do not need to fill in the rest of the fields in=20 > > 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 > |
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 |