本文整理汇总了PHP中Question::getTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Question::getTitle方法的具体用法?PHP Question::getTitle怎么用?PHP Question::getTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Question
的用法示例。
在下文中一共展示了Question::getTitle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateQuestion
/**
* @return int
* @param Question $q
*/
public static function updateQuestion($q)
{
$db = DB::getConn();
$stm = $db->prepare('update Question set title=:title, category=:cate, point=:point, explain=:explain where id=:id');
$stm->bindParam(':title', $q->getTitle());
$stm->bindParam(':cate', $q->getCategory());
$stm->bindParam(':point', $q->getPoint());
$stm->bindParam(':explain', $q->getExplain());
$stm->bindParam(':id', $q->getId());
$stm->execute();
return QuestionCtrl::getLastID();
}
示例2: floor
} else {
$reminder = 26;
$reminderChar = $alphas[$reminder];
$floor = floor($numberColumns / 26);
$floor--;
}
return divideBy26($floor) . $reminderChar;
} else {
return;
}
}
// set sheets
foreach ($survey_questions as $survey_question_id) {
$question = new Question();
$question->get_from_db($survey_question_id);
$question_title = $question->getTitle();
$question_answers = $question->get_answers();
// Add question title
$objPHPExcel->setActiveSheetIndex($sheetId)->mergeCells('A1:N1');
$objPHPExcel->setActiveSheetIndex($sheetId)->setCellValue('A1', $question_title);
// list answers
$columnId = 2;
$alphabetIteration = 0;
foreach ($question_answers as $question_answer_id) {
$answer = new Answer();
$answer->get_from_db($question_answer_id);
$cell = divideBy26($columnId) . "2";
$cell_value = $answer->getValue();
// Add some data
$objPHPExcel->setActiveSheetIndex($sheetId)->setCellValue($cell, $cell_value);
$objPHPExcel->getActiveSheet()->getColumnDimension(divideBy26($columnId))->setWidth(15);
示例3: foreach
</h4>
</div>
<?php
$survey_questions = get_survey_questions($survey->getId());
if (!empty($survey_questions)) {
?>
<div class="accordion">
<?php
foreach ($survey_questions as $question_id) {
$question = new Question();
$question->get_from_db($question_id);
if ($question->getType() == 1) {
?>
</div>
<h3 class="no-float ac"><?php
print_r($question->getTitle());
?>
</h3>
<div class="al">
<?php
$answers = get_survey_answers($question->getId());
foreach ($answers as $answer_id) {
$answer = new Answer();
$answer->get_from_db($answer_id);
?>
<p>   <?php
print_r($answer->getValue());
?>
</p>
<?php
}
示例4: foreach
if (!empty($rightCode) && !empty($leftCode)) {
if (isset($rowTitlePosition[$leftCode]) && isset($columnTitlePosition[$rightCode])) {
$results[$rowTitlePosition[$leftCode]][$columnTitlePosition[$rightCode]] = $trackedAnswer['nbr'];
}
}
}
}
}
//-- DISPLAY (common)
//-- display a resume of the selected question
// several questions have to be shown on the page
if (isset($questionIterator)) {
$out .= '<tr class="headerX">' . "\n" . '<th>' . get_lang('Question') . ' ' . $questionIterator . '</th>' . "\n" . '</tr>' . "\n\n" . '<tr>' . '<td>' . "\n";
$questionIterator++;
}
$out .= '<p><strong>' . $question->getTitle() . '</strong></p>' . "\n" . '<blockquote>' . $displayedStatement . '</blockquote>' . "\n\n" . '<center>';
//-- DISPLAY (by question type)
// prepare list to display
if ($question->getType() == 'MCUA' || $question->getType() == 'MCMA') {
// display tab header
$out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . "\n" . '<tr class="headerX" align="center" valign="top">' . "\n" . '<th>' . get_lang('Expected choice') . '</th>' . "\n" . '<th width="60%">' . get_lang('Answer') . '</th>' . "\n" . '<th colspan="2">#</th>' . "\n" . '</tr>' . "\n" . '<tbody>' . "\n\n";
// display tab content
foreach ($results as $result) {
$out .= '<tr>' . "\n" . '<td align="center">';
// expected choice image
$out .= '<img src="';
// choose image to display
if ($question->getType() != 'MCMA') {
if ($result['correct']) {
$out .= get_icon_url('radio_on') . '" alt="(X)"';
} else {