Check out the LimeSurvey source code on GitHub!

title name in name file of export

5 years 2 days ago #74740 by Lemercier
I add this in exportresult.php to get the name of survey in the file name of export result
case "doc":
//insert for add title name in the export file .doc
$query="SELECT * FROM {$dbprefix}surveys_languagesettings WHERE surveyls_survey_id=".$surveyid;
$result=db_execute_assoc($query) or safe_die("Couldn't get privacy data<br />$query<br />".$connect->ErrorMsg());
$row=substr(str_replace(array('*', ':', '/', '\\', '?', ''),array(' '),$row),0,31); // Remove invalid characters
$titrefichier=str_replace("surveyls_title", "", $row);
$titrefichier=str_replace(' ', '_', $titrefichier);

header("Content-Disposition: attachment; filename=results-quest-".$surveyid."-".$titrefichier.".doc");
// end
for .xls same above just change :

if that can help somebody

I look to find the solution for adding the text result inside the statistics
results instead of clicking on the button
If anybody has already the solution, thanks for your help

Please Log in to join the conversation.

4 years 11 months ago #74940 by Mazi
Thanks for your feedback. Please open a ticket at our Bugtracker, section user patches, and add your patch there.

A short question: Why do you only deal with the first 31 characters at
$row=substr(str_replace(array('*', ':', '/', '\\', '?', ''),array(' '),$row),0,31);

If I remember correclty, a feature to add text comments at statistics will be available at Limesurvey 2.0.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form