コード例 #1
0
ファイル: ans_pdf_open.php プロジェクト: eduagdo/emarking
function BP_NewExam(BubPdf $BubPdf, $CorrectAnswersProvided = FALSE)
{
    global $examtitle, $teacher, $exam_id, $grade, $subject, $instancedate;
    // StudentCode bubbles removed whenever CorrectAnswers are provided
    if ($CorrectAnswersProvided) {
        $BubPdf->CorrectAnswersProvided = TRUE;
    }
    $BubPdf->getAliasNbPages();
    //Defines an alias for the total number of pages. It will be substituted as the document is closed.
    $BubPdf->SetTopMargin($BubPdf->AreaTopMargin);
    $BubPdf->SetLeftMargin($BubPdf->AreaLeftMargin);
    $BubPdf->SetAutoPageBreak(TRUE, $BubPdf->AreaBotMargin);
    // bottom margin (if columns seem offset funny, this number could be to blame)
    // fill in some of the PDF meta data
    $BubPdf->SetTitle($examtitle);
    $BubPdf->SetAuthor($teacher);
    $BubPdf->SetSubject($exam_id);
    $BubPdf->SetKeywords("{$grade} {$subject} {$instancedate}");
}