View Issue Details

IDProjectCategoryView StatusLast Update
06518Development Survey Designpublic2013-04-16 10:51
Reporteruser20342Assigned To 
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version2.00a 
Summary06518: Propose to Insert parameters maxremindercount and minreminderdelay into survey model
DescriptionParameters maxremindercount and minreminderdelay, currently used in reminders for tokens, might be better suited as part of the Survey object.
They can be set by survey edit and used in the reminder action of token application.
They can also be omitted from the input parameters in remind_participants function in remotecontrol API
Additional InformationSample patch for implementation
TagsNo tags attached.

Activities

user20342

2012-08-24 14:26

 

reminderParamsToSurveyModel.patch (4,581 bytes)   
diff --git a/application/controllers/admin/database.php b/application/controllers/admin/database.php
index a857d66..9d2c546 100644
--- a/application/controllers/admin/database.php
+++ b/application/controllers/admin/database.php
@@ -1024,6 +1024,8 @@ class database extends Survey_Common_Action
             'emailnotificationto'=>trim(Yii::app()->request->getPost('emailnotificationto')),
             'googleanalyticsapikey'=>trim(Yii::app()->request->getPost('googleanalyticsapikey')),
             'googleanalyticsstyle'=>trim(Yii::app()->request->getPost('googleanalyticsstyle')),
+            'maxremindercount'=> Yii::app()->request->getPost('maxremindercount'),
+            'minreminderdelay'=> Yii::app()->request->getPost('minreminderdelay'),            
             'tokenlength'=>$tokenlength
             );
 
diff --git a/application/views/admin/survey/subview/tabNotification_view.php b/application/views/admin/survey/subview/tabNotification_view.php
index 23d706b..b46e71d 100644
--- a/application/views/admin/survey/subview/tabNotification_view.php
+++ b/application/views/admin/survey/subview/tabNotification_view.php
@@ -168,4 +168,11 @@
                     ><?php $clang->eT("Survey name-[SID]/Group name"); ?></option>
             </select></li>
 
-    </ul></div>
\ No newline at end of file
+         <li><label for='maxremindercount'><?php $clang->eT("Max reminders :"); ?></label>
+            <input type='text' value="<?php echo $esrow['maxremindercount']; ?>" name='maxremindercount' id='maxremindercount' size='12' maxlength='2' onkeypress="return goodchars(event,'0123456789')" />
+        </li>
+                <li><label for='minreminderdelay'><?php $clang->eT("Min days between reminders :"); ?></label>
+            <input type='text' value="<?php echo $esrow['minreminderdelay']; ?>" name='minreminderdelay' id='minreminderdelay' size='12' maxlength='2' onkeypress="return goodchars(event,'0123456789')" />
+        </li>
+        
+    </ul></div>
diff --git a/application/views/admin/token/remind.php b/application/views/admin/token/remind.php
index a6c1fed..436afa8 100644
--- a/application/views/admin/token/remind.php
+++ b/application/views/admin/token/remind.php
@@ -78,11 +78,11 @@
         </select></li>
     <li><label for='minreminderdelay'>
 <?php $clang->eT("Min days between reminders"); ?>:</label>
-        <input type='text' value='' name='minreminderdelay' id='minreminderdelay' /></li>
+        <input type='text' value='<?php echo $thissurvey['minreminderdelay'];?>' name='minreminderdelay' id='minreminderdelay' /></li>
 
     <li><label for='maxremindercount'>
 <?php $clang->eT("Max reminders"); ?>:</label>
-        <input type='text' value='' name='maxremindercount' id='maxremindercount' /></li>
+        <input type='text' value='<?php echo $thissurvey['maxremindercount'];?>' name='maxremindercount' id='maxremindercount' /></li>
 </ul><p>
     <input type='submit' value='<?php $clang->eT("Send Reminders"); ?>' />
     <input type='hidden' name='ok' value='absolutely' />
diff --git a/installer/sql/create-mssql.sql b/installer/sql/create-mssql.sql
index 2206ae5..0e136d2 100644
--- a/installer/sql/create-mssql.sql
+++ b/installer/sql/create-mssql.sql
@@ -424,6 +424,8 @@ CREATE TABLE [prefix_surveys] (
   [alloweditaftercompletion] varchar(1) default 'N',
   [googleanalyticsstyle] varchar(1),
   [googleanalyticsapikey] varchar(25),
+  [maxremindercount] int,
+  [minreminderdelay] int,   
   PRIMARY KEY  ([sid])
 );
 
diff --git a/installer/sql/create-mysql.sql b/installer/sql/create-mysql.sql
index 8355794..2f84e63 100644
--- a/installer/sql/create-mysql.sql
+++ b/installer/sql/create-mysql.sql
@@ -429,6 +429,8 @@ CREATE TABLE `prefix_surveys` (
   `alloweditaftercompletion` varchar(1) default 'N',
   `googleanalyticsstyle` varchar(1) DEFAULT NULL,
   `googleanalyticsapikey` VARCHAR(25) DEFAULT NULL,
+  `maxremindercount` int(11) default NULL,
+  `minreminderdelay` int(11) default NULL,  
    PRIMARY KEY(`sid`)
 ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci;
 
diff --git a/installer/sql/create-pgsql.sql b/installer/sql/create-pgsql.sql
index 6a35ce9..d9cbcad 100644
--- a/installer/sql/create-pgsql.sql
+++ b/installer/sql/create-pgsql.sql
@@ -435,6 +435,8 @@ CREATE TABLE prefix_surveys (
     alloweditaftercompletion character varying(1) DEFAULT 'N',
     googleanalyticsstyle character varying(1),
     googleanalyticsapikey character varying(25),
+    maxremindercount integer,
+    minreminderdelay integer,    
     CONSTRAINT prefix_surveys_pkey PRIMARY KEY (sid)
 );
 
mdekker

mdekker

2012-11-16 14:56

reporter   ~22276

Currently we are working on a new 2.1 version where a lot will change and we are no longer accepting new or changed features for 2.0

If you would like this added to limesurvey, could you provide a github pull request for the 2.1 branch?

Issue History

Date Modified Username Field Change
2012-08-24 14:26 user20342 New Issue
2012-08-24 14:26 user20342 File Added: reminderParamsToSurveyModel.patch
2012-11-16 14:53 mdekker Project @2@ => Development
2012-11-16 14:53 mdekker Category Survey design => Survey Design
2012-11-16 14:56 mdekker Note Added: 22276
2012-11-16 14:56 mdekker Assigned To => mdekker
2012-11-16 14:56 mdekker Status new => assigned
2013-04-16 10:51 mdekker Assigned To mdekker =>