$page_elements = 6; $qtype = array('S', 'M', 'T', '0'); // question types $qright = array(' ', '*'); // question types // --- create pdf document if ($l['a_meta_dir'] == 'rtl') { $dirlabel = 'L'; $dirvalue = 'R'; } else { $dirlabel = 'R'; $dirvalue = 'L'; } $isunicode = strcasecmp($l['a_meta_charset'], 'UTF-8') == 0; //create new PDF document (document units are set by default to millimeters) $pdf = new TCPDFEX(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, $isunicode); switch ($expmode) { case 1: // Set backlink QR-Code $pdf->setTCExamBackLink(K_PATH_URL . 'admin/code/tce_show_all_questions.php?subject_module_id=' . $module_id . '&subject_id=' . $subject_id); break; case 2: // Set backlink QR-Code $pdf->setTCExamBackLink(K_PATH_URL . 'admin/code/tce_show_all_questions.php?subject_module_id=' . $module_id); break; case 3: // Set backlink QR-Code $pdf->setTCExamBackLink(K_PATH_URL . 'admin/code/tce_show_all_questions.php'); break; } // set document information
$doc_title = unhtmlentities($l['w_test']); $doc_description = F_compact_string(unhtmlentities($l['h_test'])); $page_elements = 6; $qtype = array('S', 'M', 'T', 'O'); // question types // --- create pdf document if ($l['a_meta_dir'] == 'rtl') { $dirlabel = 'L'; $dirvalue = 'R'; } else { $dirlabel = 'R'; $dirvalue = 'L'; } $isunicode = strcasecmp($l['a_meta_charset'], 'UTF-8') == 0; //create new PDF document (document units are set by default to millimeters) $pdf = new TCPDFEX(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, $isunicode); // set header backlink QR-Code $header_backlink = K_PATH_URL . 'admin/code/tce_edit_test.php?test_id=' . $test_id; $pdf->setTCExamBackLink($header_backlink); // set document information $pdf->SetCreator('TC' . 'Ex' . 'am' . ' ver.' . K_TCEXAM_VERSION . ''); $pdf->SetAuthor(PDF_AUTHOR); $pdf->SetTitle($doc_title); $pdf->SetSubject($doc_description); $pdf->SetKeywords('TCExam, ' . $doc_title); $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set image scale factor $pdf->setHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); //set auto page breaks
case 4: // detailed report for all users // detailed report for all users case 5: // detailed report for all users with only open questions $doc_title = unhtmlentities($l['t_result_user']); $doc_description = F_compact_string(unhtmlentities($l['hp_result_user'])); break; default: echo $l['m_authorization_denied']; exit; } // --- create pdf document $isunicode = strcasecmp($l['a_meta_charset'], 'UTF-8') == 0; //create new PDF document (document units are set by default to millimeters) $pdf = new TCPDFEX(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, $isunicode); // Set backlink QR-Code if ($pubmode) { $pdf->setTCExamBackLink(K_PATH_URL . 'public/code/tce_test_allresults.php?' . $filter); } else { $pdf->setTCExamBackLink(K_PATH_URL . 'admin/code/tce_show_result_allusers.php?' . $filter); } // set document information $pdf->SetCreator('TCExam ver.' . K_TCEXAM_VERSION . ''); $pdf->SetAuthor(PDF_AUTHOR); $pdf->SetTitle($doc_title); $pdf->SetSubject($doc_description); $pdf->SetKeywords('TCExam, ' . $doc_title); $pdf->setHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$doc_description = F_compact_string(unhtmlentities($l['hp_result_user'])); $page_elements = 7; $temp_order_field = ''; $qtype = array('S', 'M', 'T', 'O'); // question types // --- create pdf document if ($l['a_meta_dir'] == 'rtl') { $dirlabel = 'L'; $dirvalue = 'R'; } else { $dirlabel = 'R'; $dirvalue = 'L'; } $isunicode = strcasecmp($l['a_meta_charset'], 'UTF-8') == 0; //create new PDF document (document units are set by default to millimeters) $pdf = new TCPDFEX(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, $isunicode); // set document information $pdf->SetCreator('TCExam ver.' . K_TCEXAM_VERSION . ''); $pdf->SetAuthor(PDF_AUTHOR); $pdf->SetTitle($doc_title); $pdf->SetSubject($doc_description); $pdf->SetKeywords('TCExam, ' . $doc_title); $pdf->setHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); //set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); $pdf->setHeaderMargin(PDF_MARGIN_HEADER); $pdf->setFooterMargin(PDF_MARGIN_FOOTER); //set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$numberfont = 'courier'; $doc_title = unhtmlentities($l['t_all_results_user']); $doc_description = F_compact_string(unhtmlentities($l['hp_allresults_user'])); $page_elements = 9; $temp_order_field = 'total_score, user_lastname, user_firstname'; // --- create pdf document if ($l['a_meta_dir'] == 'rtl') { $dirlabel = 'L'; $dirvalue = 'R'; } else { $dirlabel = 'R'; $dirvalue = 'L'; } $isunicode = strcasecmp($l['a_meta_charset'], 'UTF-8') == 0; //create new PDF document (document units are set by default to millimeters) $pdf = new TCPDFEX(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, $isunicode); // Set backlink QR-Code //$pdf->setTCExamBackLink(K_PATH_URL.'admin/code/tce_pdf_user_results.php?user_id='.$user_id.'&startdate='.urlencode($startdate).'&enddate='.urlencode($enddate).'&orderfield='.urlencode($order_field)); $pdf->setTCExamBackLink(K_PATH_URL . 'admin/code/tce_pdf_user_results.php?user_id=' . $user_id); // set document information $pdf->SetCreator('TCExam ver.' . K_TCEXAM_VERSION . ''); $pdf->SetAuthor(PDF_AUTHOR); $pdf->SetTitle($doc_title); $pdf->SetSubject($doc_description); $pdf->SetKeywords('TCExam, ' . $doc_title); $pdf->setHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); //set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); $pdf->setHeaderMargin(PDF_MARGIN_HEADER);