View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
07531 | Feature requests | Survey participants (Tokens) | public | 2011-11-30 07:47 | 2013-03-12 14:35 |
Reporter | JEfromCanada | Assigned To | |||
Priority | normal | Severity | feature | ||
Status | acknowledged | Resolution | open | ||
Summary | 07531: To alleviate the problems caused by survey URL's split by email program | ||||
Description | If Lime Survey is installed in such a way that the root url for the survey is a long character string, the generated SURVEYURL may be longer than the line size of the email program. This results in the email program splitting the survey link over multiple lines, and in many email programs, these split URL's no longer function (i.e. the portion of the URL that does not fit on the first line is visible, but no longer part of the actual URL). Clicking on such a broken link will lead to a failed attempt to access the survey, frustrating the invitee. | ||||
Additional Information | A possible solution: Add a new variable SHORTSURVEYURL which can be used as the invitation link The user would have the option of using the SHORTSURVEYURL in email templates to guarantee that survey urls generated by Lime Survey would be shorter than the "typical" line size of an email program. After initially posting this idea, I came across an existing API for the tinyurl service. Rather than repeating the code here, I will reference the page where it can be found... http://www.richardcastera.com/blog/creating-a-tinyurl-with-tinyurl-api The fact that this API already exists means that Lime Survey does not need to search for a URL shortening API! | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Story point estimate | |||||
Users affected % | |||||
Immediately after posting this suggestion, I came across an existing API for the tinyurl service. Rather than repeating the code here, I will reference the page where it can be found... http://www.richardcastera.com/blog/creating-a-tinyurl-with-tinyurl-api |
|
Addition to Solution 1: |
|
With respect for the good ideas of vierundzwanzig, it doesn't make sense to display the SHORTSURVEYURL on the overview page as suggested; because the SHORTSURVEYURL should be generated from the complete URL, including the "token=xxxx" clause specific to a particular invitation. The Survey URL (lang) shown on the survey overview page is only a partial URL (it doesn't contain the "token=xxxx" portion of the complete URL), and is not equivalent to the string substitution variable SURVEYURL. Since tinyurl will be used to compress the entire URL (including the "token=xxxx" clause), any short URL generated without this information will be meaningless. |
|
Using build 11379 as a starting point, I have written all the code necessary to implement this idea. I just need to create the "deltas" for the updated modules so it can be easily submitted to LimeSurvey for inclusion/testing. The modules affected are as follows: common_functions.php - add new function getshorturl fck_LimeReplacementFields.php - added new items to dropdown list of available user substitution variables register.php, tokens.php, lsrc.help.php - added code to each module to define the replacement strings for new tokens: The only thing I did not do is to check whether there is a translation function change needed to make the new UI strings: "Short URL of the survey" and |
|
Now that I've upgraded my installation to the latest build, I've been able to test my code. There are errors in the HTML generated tokens (stupid mistake) which I am working on correcting. I'll post an updated zip file when I've fixed the problem. |
|
Errors have all been corrected and the feature works perfectly. I will be uploading the code change for hopeful inclusion in the trunk. |
|
I have uploaded a zipfile containing the patched programs that implement the current idea. You can find them here: If someone on the development team wishes to verify that this patch works, maybe you would consider adding it to the trunk. (I also corrected an error in line 159 of the original register.php file - the "?" was missing between the "optout.php" module name and the first input parameter). |
|
@JEfromCanada: |
|
I've created a user patch in the bug tracker system: #5621 |
|