Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Allow user to return to assessment results and/or create pdf from results

Allow user to return to assessment results and/or create pdf from results 4 years 4 months ago #70825

  • mlyter
  • mlyter's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
I have created a survey that can be taken without any registration/token,etc (basically anyone with the link). I have used javascript to give feedback according to group score throughout the survey, but have also turned on assessments to give additional information at the end of the survey. This additional information includes some links that we would like the user of the survey to have access to after the survey is completed.

We can print the assessment results but this does not allow the user easy access to the links. Is there a way to create a link using the ID of the survey in conjunction with the ID assigned to the user that would allow the user access to the assessment results at a later time?

If not, is there a way to allow the user to export the assessment results in a pdf?
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 4 years 4 months ago #71047

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
In 1.92RC1, you can create tailored reports, like the feedback and links you are describing. Users could print out any desired page with that report information. Also, that same tailoring works in print_answers at the end - they'll see their raw answers, plus any tailored reports.

The first page of the Demo for 1.92RC1 shows a sample of such custom reports.
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 4 years 4 months ago #71084

  • mlyter
  • mlyter's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
TMSWhite, thanks for your response.

I ended up passing the SAVEDID and SID in the end url and querying the mySQL database from a separate page.
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 3 days ago #134069

  • mattheoh
  • mattheoh's Avatar
  • Offline
  • Senior Lime
  • Posts: 68
  • Thank you received: 5
  • Karma: 2
mlyter wrote:
TMSWhite, thanks for your response.

I ended up passing the SAVEDID and SID in the end url and querying the mySQL database from a separate page.

Hi, I m trying to do the same thing you did, I mean :
- Save Assessment (to permit users to consult it later)
- export assessment in a pdf file

Could you tell me more, about your solution ?
Thanks per advance.
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 2 days ago #134185

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5914
  • Thank you received: 357
  • Karma: 262
Did you think about just displaying custom assessment results at the "thank you"-page using the Expression Manager and placeholders?

You could easily add a "Print assessment results" button there which calls the browser's print option, see www.javascriptkit.com/howto/newtech2.shtml
Most modern browsers support direct PDF printing of any website.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 2 days ago #134189

  • mattheoh
  • mattheoh's Avatar
  • Offline
  • Senior Lime
  • Posts: 68
  • Thank you received: 5
  • Karma: 2
Mazi wrote:
Did you think about just displaying custom assessment results at the "thank you"-page using the Expression Manager and placeholders?

You could easily add a "Print assessment results" button there which calls the browser's print option, see www.javascriptkit.com/howto/newtech2.shtml
Most modern browsers support direct PDF printing of any website.

HI thanks for your answer.
I already finished my assessment - it works well, but it's in HTML and not saved.
Add a PDF button could be a good solution... But I also need to assign / save the assessment (PDF or HTML version) to each survey completed (accessible in the result list).
The aim is the admin can go in the back office and look at the assesments of each survey completed...
(hope I m clear enough - that was exactly what mlyter wanted to do, but I didn't understand is solution with ID and SQL Queries)
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 2 days ago #134190

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5914
  • Thank you received: 357
  • Karma: 262
I am not sure if mlyter finally created the PDF at all. The solution sounds like he only loads the details of the current data set into a custom script which is called at the end of the survey.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 2 days ago #134192

  • mattheoh
  • mattheoh's Avatar
  • Offline
  • Senior Lime
  • Posts: 68
  • Thank you received: 5
  • Karma: 2
Indeed, I think he made a custom SQL request when the assessment is generated, to insert it in the database.
I don't need to go until there.
I will put a pdf button as you said...
But I need to find a solution to add / assign this pdf, to the survey result, to make it accessible in the back office...
I didn't find anything about that on forums.... not easy. :blink:
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 2 days ago #134193

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5914
  • Thank you received: 357
  • Karma: 262
You are right, storing results as a PDF is pretty difficult and not that easy to automate with complex additional coding.

To assign a PDF to a certain survey is pretty easy, you can simply use survey ID (e.g. 12345) and data set ID (e.g. 333) as a file name when storing the file: "assessment_12345_33.pdf".
You could then e.g. send an email to the admin including such a dynamically created link to the PDF or provide users with a predefined link at which they just have to enter the data set (and survey) ID.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 2 days ago #134194

  • mattheoh
  • mattheoh's Avatar
  • Offline
  • Senior Lime
  • Posts: 68
  • Thank you received: 5
  • Karma: 2
seems a good idea to play with surveyr ID'S to generate the pDF name !
And maybe I could add an hidden equation question which the result would be : assessment_ID_DataID.pdf ...
In this way, I could directly access to the pdf file form the result list.
Do you think it would be possible ?
Last Edit: 3 weeks 2 days ago by mattheoh.
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 2 days ago #134197

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5914
  • Thank you received: 357
  • Karma: 262
The equation question sounds like a good idea. You could even hard code the complete path + file name there so an admin can copy - paste that at his browser to call the later created PDF.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 3 weeks 2 days ago #134199

  • mattheoh
  • mattheoh's Avatar
  • Offline
  • Senior Lime
  • Posts: 68
  • Thank you received: 5
  • Karma: 2
I m going to look forward into it.
I will let you know, if I can do something with all this stuff ! ;)
Thanks again for your help.
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 1 week 5 days ago #134716

  • mattheoh
  • mattheoh's Avatar
  • Offline
  • Senior Lime
  • Posts: 68
  • Thank you received: 5
  • Karma: 2
Hi again !
I m working for a few days on my needs to generate a pdf of the assessment.
I made some few tests with jspdf library but I can t have a good result 'cause my pdf has several pages (and the page split option makes it blurry)
Anyway, I m testing html2pdf (php script) and I need to call a php file from my assessment.pstpl.

So I added an ajax script
<script type="text/javascript">
var contenu=$("#canvas").html();
var filename = "{INFO1}-{SAVEDID}";
$.ajax({
     url:"/upload/templates/bpf-cosmed/views/html2pdf.php",
     type:"post",
     data: { data: contenu, filename: filename },
     complete: function (xhr,result){
           var msg=xhr.responseText;
     }
});
</script>

Unfortunatel, I don't know why I have an error 500 when the server is trying to execute my php file. (the link is good, I checked it)
Is there a security parameter with linesurvey or my code is maybe not good ? (I disabled xss option)

Thanks for your help :)
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 1 week 5 days ago #134719

  • mattheoh
  • mattheoh's Avatar
  • Offline
  • Senior Lime
  • Posts: 68
  • Thank you received: 5
  • Karma: 2
I had an error in my php script that caused error 500... sorry for the noise !
I can continue to advance ;)

PS : Sorry for the double post, but I can't no mor edit my previous post... Time is out I guess ^^
Last Edit: 1 week 5 days ago by mattheoh.
The administrator has disabled public write access.

Allow user to return to assessment results and/or create pdf from results 5 days 22 hours ago #135120

  • mattheoh
  • mattheoh's Avatar
  • Offline
  • Senior Lime
  • Posts: 68
  • Thank you received: 5
  • Karma: 2
Just to let you know , I managed to generate automatically a PDF of the assessment, whicj is compiled when the assessment page is displayed. I used the library HTML2PDF.
Also added a button to send, the PDF by mail.
The name of the PDF is : INFOX-IDSURVEY.PDF which permits to add it an equation question to display it in the board.
if someone needs the script I can post it here.
Thanks again for the help.
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.204 seconds