WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP Survey And Quiz Tool] Two major problems with PDF certs

[Plugin: WP Survey And Quiz Tool] Two major problems with PDF certs

  • 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. 🙁

    http://wordpress.org/extend/plugins/wp-survey-and-quiz-tool/

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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”>

    xxxx
    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.

    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'])),
    						ARRAY_A);
    
    	$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'];
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Survey And Quiz Tool] Two major problems with PDF certs’ is closed to new replies.