function writePrePostRow($pptest)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $lPPTestID = $pptest->lKeyID;
    $bHidden = $pptest->bHidden;
    $bPublished = $pptest->bPublished;
    if ($bHidden) {
        $strHideStyle = 'color: #999; font-style: italic;';
    } else {
        $strHideStyle = '';
    }
    echoT('
            <tr class="makeStripe">
               <td class="enpRpt" style="text-align: center;' . $strHideStyle . '" nowrap>' . str_pad($lPPTestID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_CPPTestView($lPPTestID, 'View pre/post test record', true) . '
               </td>
               <td class="enpRpt" style="width: 130pt;' . $strHideStyle . '">' . htmlspecialchars($pptest->strTestName) . '
               </td>
               <td class="enpRpt" style="width: 190pt;' . $strHideStyle . '">' . nl2br(htmlspecialchars($pptest->strDescription)) . '
               </td>
               <td class="enpRpt" style="text-align: center;' . $strHideStyle . '">' . $pptest->lNumQuest . '&nbsp;' . strLinkView_CPPQuestions($lPPTestID, 'View Questions', true) . '
               </td>
               <td class="enpRpt" nowrap style="' . $strHideStyle . '">
                  Visibility: ' . ($bHidden ? 'Hidden' : 'Visible') . '<br>
                  Published: ' . ($bPublished ? 'Yes' : 'No') . '<br>
               </td>
            </tr>');
}
 function strHTMLPPTestSummaryDisplay()
 {
     //---------------------------------------------------------------------
     //  caller must first load the test
     //---------------------------------------------------------------------
     $params = array('enumStyle' => 'terse');
     $clsRpt = new generic_rpt($params);
     $strOut = '';
     $pptest =& $this->pptests[0];
     $lPPTestID = $pptest->lKeyID;
     $clsRpt->setEntrySummary();
     $strOut .= $clsRpt->openReport();
     $strOut .= $clsRpt->openRow() . $clsRpt->writeLabel('Pre/Post Test:', '115pt') . $clsRpt->writeCell(htmlspecialchars($pptest->strTestName) . '&nbsp;' . strLinkView_CPPTestView($lPPTestID, 'View pre/post test', true)) . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow() . $clsRpt->writeLabel('Category:') . $clsRpt->writeCell(htmlspecialchars($pptest->strPPTestCat), '350pt;') . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow() . $clsRpt->writeLabel('Pre/Post Test ID:', '115pt') . $clsRpt->writeCell(str_pad($lPPTestID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow() . $clsRpt->writeLabel('Description:') . $clsRpt->writeCell(nl2br(htmlspecialchars($pptest->strDescription)), '350pt;') . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow() . $clsRpt->writeLabel('Questions:') . $clsRpt->writeCell($pptest->lNumQuest . '&nbsp;' . strLinkView_CPPQuestions($lPPTestID, 'View questions', true), '') . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow() . $clsRpt->writeLabel('Status:') . $clsRpt->writeCell(($pptest->bHidden ? 'Hidden' : 'Visible') . ' / ' . ($pptest->bPublished ? 'Published' : 'Not published'), '350pt;') . $clsRpt->closeRow();
     $strOut .= $clsRpt->closeReport();
     return $strOut;
 }