WP Survey And Quiz Tool
Two major problems with PDF certs (3 posts)

  1. Contemplative Computing
    Posted 3 years ago #

    I'm having a couple major issues with the PDF certs, which sadly are the main thing I need out of this plugin.

    I have a docraptor account set up and tested.

    The bugs are:

    1) Templates for individual quizes don't seem to do anything. I can only use the one "Default" template.

    2) None of the header goes through. I simply get a bunch of plain text with the table layout in the body section. No background, no styles from the <style></style> section, no title, etc. This doesn't work for the creation of professional certifications obviously.

    I put a lot of work into setting this up just assuming the DocRaptor API interface would be the least of my troubles. Oops. :(


  2. Contemplative Computing
    Posted 3 years ago #

    Joel Meador
    DEC 20, 2011 | 02:10PM EST
    Looks like the escaping being done is overly escape-y. Basically every element attribute is being escaped an extra time. So I'm seeing <style type=\"text/css\"> instead of <style type="text/css">

    DocRaptor Support

    Confirmed this in my own install. Clicking "Save Quiz" (wut) on the main "options page" causes the code to come back wrong, with extra backslashes and other oddities all around.

  3. Contemplative Computing
    Posted 3 years ago #

    Fixed issue #1 by editting pdf.php for the first part to look like this:

    Needed to fix up the way $quizDetails was being called and worked on.

    $quizDetails = $wpdb->get_row(
    						$wpdb->prepare("SELECT * FROM <code>&quot;.WPSQT_TABLE_QUIZ_SURVEYS.&quot;</code> WHERE id = %d", array($_GET['quizid'])),
    	$quizDetails['settings'] = unserialize($quizDetails['settings']);
    	$resultDetails = $wpdb->get_row(
    						$wpdb->prepare("SELECT * FROM <code>&quot;.WPSQT_TABLE_RESULTS.&quot;</code> WHERE id = %d", array($_GET['id'])),
    						ARRAY_A	);
    	$resultDetails['person'] = unserialize($resultDetails['person']);
    	$resultDetails['sections'] = unserialize($resultDetails['sections']);
    	$personName = ( isset($resultDetails['person']['name']) && !empty($resultDetails['person']['name']) ) ? $resultDetails['person']['name'] : 'Anonymous';
    	$timestamp = strtotime($resultDetails['timestamp']);
    	$pdfTemplate = $quizDetails['settings']['pdf_template'];

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Survey And Quiz Tool
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic