From: Robert A. V. II <bo...@pi...> - 2002-10-02 06:00:16
|
The following patch (to the current CVS version) will allow answers to questions to "carry over" to new question fields: diff -ur phpESP/admin/include/tab/questions_options.inc phpESP-patched/admin/include/tab/questions_options.inc --- phpESP/admin/include/tab/questions_options.inc 2002-09-06 14:39:02.000000000 -0400 +++ phpESP-patched/admin/include/tab/questions_options.inc 2002-10-02 01:58:20.000000000 -0400 @@ -41,11 +41,11 @@ for($i=1; $i<$num_choices+1; ++$i) { if ($updated && $curr_q) { list($choice_id, $choice_content) = mysql_fetch_row($result); - } elseif ($curr_q) { + } else { + if ($curr_q) { $choice_id = intval($HTTP_POST_VARS["choice_id_$i"]); + } $choice_content = $HTTP_POST_VARS["choice_content_$i"]; - } else { - $choice_id = $choice_content = ''; } ?> <tr> -- Robert August Vincent, II (pronounced "bob" or "bob-vee") bo...@pi..., geek@large, com...@bo... |
From: James E. F. <jf...@ac...> - 2002-10-02 15:11:28
|
I am not sure if this is desired behavior or not. Clearly in some cases it is, but I can see several cases where it would be a pain... Anyone else have comments on it? I believe the idea is that when creating a survey, the question option lines will not be cleared when you click on the "New Question" button. (Correct me if I am wrong.) -James On Wed, 2 Oct 2002, Robert August Vincent II wrote: > The following patch (to the current CVS version) will allow answers to > questions to "carry over" to new question fields: > > diff -ur phpESP/admin/include/tab/questions_options.inc phpESP-patched/admin/include/tab/questions_options.inc > --- phpESP/admin/include/tab/questions_options.inc 2002-09-06 14:39:02.000000000 -0400 > +++ phpESP-patched/admin/include/tab/questions_options.inc 2002-10-02 01:58:20.000000000 -0400 > @@ -41,11 +41,11 @@ > for($i=1; $i<$num_choices+1; ++$i) { > if ($updated && $curr_q) { > list($choice_id, $choice_content) = mysql_fetch_row($result); > - } elseif ($curr_q) { > + } else { > + if ($curr_q) { > $choice_id = intval($HTTP_POST_VARS["choice_id_$i"]); > + } > $choice_content = $HTTP_POST_VARS["choice_content_$i"]; > - } else { > - $choice_id = $choice_content = ''; > } > ?> > <tr> > > |
From: Robert A. V. II <bo...@pi...> - 2002-10-02 16:08:53
|
On Wed, Oct 02, 2002 at 11:11:23AM -0400, James E. Flemer wrote: > I am not sure if this is desired behavior or not. Clearly > in some cases it is, but I can see several cases where it > would be a pain... Anyone else have comments on it? > > I believe the idea is that when creating a survey, the > question option lines will not be cleared when you click on > the "New Question" button. (Correct me if I am wrong.) That is correct. And you have a button to clear the question lines if that is desired. My client has upwards of thirty questions with the same six choices; it got pretty tedious typing in the same option lines over and over. The cool thing about this approach is that if I'm on question 30 (which has a different set of options) and I want to make a new question with the same options as question 2, then I simply click on the [2] button and then on the [New Field] button. > > -James > > On Wed, 2 Oct 2002, Robert August Vincent II wrote: > > > The following patch (to the current CVS version) will allow answers to > > questions to "carry over" to new question fields: > > > > diff -ur phpESP/admin/include/tab/questions_options.inc phpESP-patched/admin/include/tab/questions_options.inc > > +++ phpESP-patched/admin/include/tab/questions_options.inc 2002-10-02 01:58:20.000000000 -0400 > > @@ -41,11 +41,11 @@ > > for($i=1; $i<$num_choices+1; ++$i) { > > if ($updated && $curr_q) { > > list($choice_id, $choice_content) = mysql_fetch_row($result); > > - } elseif ($curr_q) { > > + } else { > > + if ($curr_q) { > > $choice_id = intval($HTTP_POST_VARS["choice_id_$i"]); > > + } > > $choice_content = $HTTP_POST_VARS["choice_content_$i"]; > > - } else { > > - $choice_id = $choice_content = ''; > > } > > ?> > > <tr> > > > > > > > > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > phpESP-devel mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel -- Robert August Vincent, II (pronounced "bob" or "bob-vee") bo...@pi..., geek@large, com...@bo... |
From: James E. F. <jf...@ac...> - 2002-10-03 00:39:04
|
Oh, that sounds a lot better with the button to clear the fields. :-) -James On Wed, 2 Oct 2002, Robert August Vincent II wrote: > On Wed, Oct 02, 2002 at 11:11:23AM -0400, James E. Flemer wrote: > > I am not sure if this is desired behavior or not. Clearly > > in some cases it is, but I can see several cases where it > > would be a pain... Anyone else have comments on it? > > > > I believe the idea is that when creating a survey, the > > question option lines will not be cleared when you click on > > the "New Question" button. (Correct me if I am wrong.) > > That is correct. And you have a button to clear the question lines if > that is desired. > > My client has upwards of thirty questions with the same six choices; > it got pretty tedious typing in the same option lines over and over. > > The cool thing about this approach is that if I'm on question 30 > (which has a different set of options) and I want to make a new > question with the same options as question 2, then I simply click on > the [2] button and then on the [New Field] button. |