View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 04955 | Bug reports | Survey participants (Tokens) | public | 2011-02-15 07:04 | 2011-04-11 11:30 |
| Reporter | Assigned To | c_schmitz | |||
| Priority | normal | Severity | partial_block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 1.90+ | ||||
| Fixed in Version | 1.91RC6 | ||||
| Summary | 04955: GSOC - email invites to a subset of tokens result in emails to random tokens | ||||
| Description | in my survey i have ~200 tokens. my mail server limits me to 10 emails at a time, which I've set in the global settings of lime survey. if i check ~30 tokens and scroll to the bottom of the tokens page and click on the "invite selected tokens" button it sends the first 10 correctly then pauses and says ~20 emails left, as i would expect. however when clicking on continue it sends another ten emails and says ~180 emails left, ie its now sending to the entire list. upon further inspection the second batch of emails was sent to people i had NOT originally selected. this is not expected behavior | ||||
| Steps To Reproduce | set email settings to send 10 emails at a time. 10 MORE emails are sent. there should only be 5. furthermore it should say 0 emails left. instead it lists 10 emails left (all tokens minus the 20 youve sent) | ||||
| Tags | No tags attached. | ||||
| Attached Files | 04955_debugged_limesurvey_stable.patch (1,265 bytes)
Index: tokens.php
===================================================================
--- tokens.php (revision 9887)
+++ tokens.php (working copy)
@@ -1622,6 +1622,10 @@
}
if ($ctcount > $emcount)
{
+ $i = 0;
+ while($i < $maxemails)
+ { array_shift($tokenids); $i++; }
+ $tids = '|'.implode('|',$tokenids);
$lefttosend = $ctcount-$maxemails;
$tokenoutput .= "</ul>\n"
."<div class='warningheader'>".$clang->gT("Warning")."</div><br />\n"
@@ -1634,7 +1638,8 @@
."<input type='hidden' name='subaction' value=\"email\" />\n"
."<input type='hidden' name='action' value=\"tokens\" />\n"
."<input type='hidden' name='bypassbademails' value=\"".$_POST['bypassbademails']."\" />\n"
- ."<input type='hidden' name='sid' value=\"{$surveyid}\" />\n";
+ ."<input type='hidden' name='sid' value=\"{$surveyid}\" />\n"
+ ."<input type='hidden' name='tids' value=\"{$tids}\" />\n";
foreach ($surveylangs as $language)
{
$message = html_escape($_POST['message_'.$language]);
| ||||
| Bug heat | 6 | ||||
| Complete LimeSurvey version number (& build) | 9642 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | chrome | ||||
| Database type & version | mysql Ver 14.14 Distrib 5.5.8, for Win32 (x86) | ||||
| Server OS (if known) | window server 2003 standard | ||||
| Webserver software & version (if known) | apache 2.2 | ||||
| PHP Version | 5.3.5 | ||||
|
it apears that the variable tokenids in tokens.php gets its value from $tokenids=returnglobal('tids'); // line 32 on line 1384 each email is sent. if successful should the $tokenids/tids be updated? that seems to be the crux of the problem; when you click on continue tokenids is reset to all tokens. |
|
|
Patch looks fine to me. Thank you! |
|
|
Thank you for for consent. |
|
|
1.91RC6 released. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-02-15 07:04 |
|
New Issue | |
| 2011-02-15 16:55 | Mazi | Assigned To | => c_schmitz |
| 2011-02-15 16:55 | Mazi | Status | new => assigned |
| 2011-02-15 16:55 | Mazi | Summary | email invites to a subset of tokens result in emails to random tokens => GSOC - email invites to a subset of tokens result in emails to random tokens |
| 2011-02-15 17:21 |
|
Note Added: 14186 | |
| 2011-03-20 17:19 | nehiljain | File Added: 04955_debugged_limesurvey_stable.patch | |
| 2011-03-29 15:20 | c_schmitz | Note Added: 14597 | |
| 2011-03-29 15:20 | c_schmitz | Status | assigned => resolved |
| 2011-03-29 15:20 | c_schmitz | Fixed in Version | => 1.91RC6 |
| 2011-03-29 15:20 | c_schmitz | Resolution | open => fixed |
| 2011-04-01 06:51 | nehiljain | Note Added: 14627 | |
| 2011-04-11 11:30 | c_schmitz | Note Added: 14753 | |
| 2011-04-11 11:30 | c_schmitz | Status | resolved => closed |
| 2016-12-08 10:39 | c_schmitz | Category | Tokens => Survey participants (Tokens) |